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

Permission denied fallback directory #70

Open
sbrugman opened this issue Mar 10, 2020 · 2 comments
Open

Permission denied fallback directory #70

sbrugman opened this issue Mar 10, 2020 · 2 comments

Comments

@sbrugman
Copy link

We use confuse for pandas-profiling. Multiple users have reported the same Permission Denied issue:
ydataai/ydata-profiling#214. This issue is blocking usage of the package effectively.

The directory creation is not surrounded with a try/except block:
https://github.com/beetbox/confuse/blob/master/confuse.py#L996
When it attempts to create a global directory, it might not be permitted to do so. It could fall back to the current directory for example.

Moreover, #61 fixes a problem where comments cannot be inline, which is also problematic, but non-blocking.

@sampsyo
Copy link
Member

sampsyo commented Mar 10, 2020

Got it; thanks for pointing this out! I think we should change either read or user_config_path, leaving config_dir alone (as its docstring says, the goal of that function is to ensure that the directory exists, so raising an OSError should be expected).

Any chance I could convince you or someone else involved in pandas-profiling to help out with an initial PR?

@sbrugman
Copy link
Author

It seems that initializing the confuse.Configuration object with read=False is a workaround for the way we are using confuse.

Confuse is in the pandas-profiling dependency tree, so it can expect to have 100k+ downloads a month. This might be motivation for anyone interested in picking this up ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants