Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generate fails if self.serverapp.root_dir not writable #326

Closed
jhgoebbert opened this issue Aug 9, 2023 · 2 comments
Closed

generate fails if self.serverapp.root_dir not writable #326

jhgoebbert opened this issue Aug 9, 2023 · 2 comments
Labels
bug Bugs reported by users status:triaged Issues that have been fully triaged

Comments

@jhgoebbert
Copy link

Hello and thank you for this great extension 👍

Description

We are facing a Permission denied-issue when jupyter-ai is asked to generate a notebook.
It tries to generate the file in the directory set by self.serverapp.root_dir which is not writable.
https://github.com/search?q=repo%3Ajupyterlab%2Fjupyter-ai%20root_dir&type=code

Reproduce

If one starts a JupyterLab on a multi-user-system and wants to be able to browse all files this is set to
c.ServerApp.root_dir = '/'
Of course this root_dir is not writable and so jupyter-ai fails with Permission denied.

Possible solution

Instead of self.serverapp.root_dir the current directory of the filebrowser could be used.
(perhaps similar to the jupyterlab-git extension?)

@jhgoebbert jhgoebbert added the bug Bugs reported by users label Aug 9, 2023
@welcome
Copy link

welcome bot commented Aug 9, 2023

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@JasonWeill JasonWeill added the scope:chat-ux Issues concerning the chat user experience label Aug 9, 2023
@dlqqq dlqqq added status:triaged Issues that have been fully triaged and removed scope:chat-ux Issues concerning the chat user experience labels Mar 3, 2025
@dlqqq
Copy link
Member

dlqqq commented Mar 3, 2025

Sorry that this issue went silent for so long! I'm establishing triage processes to ensure that this doesn't happen again in the future. #881 changed the behavior of chat handlers to use preferred_dir instead of root_dir, so this issue should be resolved.

If you're still encountering this, please let us know by opening a new issue. Thank you for using Jupyter AI!

@dlqqq dlqqq closed this as completed Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs reported by users status:triaged Issues that have been fully triaged
Projects
None yet
Development

No branches or pull requests

3 participants