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 issues with current location of cache directory #225

Closed
pacoispaco opened this issue Oct 8, 2015 · 0 comments · Fixed by #231
Closed

Permission issues with current location of cache directory #225

pacoispaco opened this issue Oct 8, 2015 · 0 comments · Fixed by #231

Comments

@pacoispaco
Copy link

I'm running proselint on a Linux (Ubuntu 12.04) machine. I get file permission denied when proselint tries to create the cache directory. I installed proselint with pip.

Reason: proselint attempts to create the cache directory in the install directory of proselint and that directory is owned by root.

Suggested solution: Create cache directory in a) current working directory or in b) /var/lib/proselint. Or provide a command line option to specify where to create the cache directory

To reproduce:
$ proselint /usr/local/lib/python2.7/dist-packages/proselint/demo.md
/usr/local/lib/python2.7/dist-packages/proselint
Traceback (most recent call last):
File "/usr/local/bin/proselint", line 9, in
load_entry_point('proselint==0.3.4', 'console_scripts', 'proselint')()
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 700, in call
return self.main(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 680, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 873, in invoke
return ctx.invoke(self.callback, *_ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 508, in invoke
return callback(_args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/proselint/command_line.py", line 166, in proselint
errors = lint(file, debug=debug)
File "/usr/local/lib/python2.7/dist-packages/proselint/command_line.py", line 65, in lint
module = importlib.import_module("checks." + check_name)
File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
File "/usr/local/lib/python2.7/dist-packages/proselint/checks/garner/archaism.py", line 19, in
@memoize
File "/usr/local/lib/python2.7/dist-packages/proselint/tools.py", line 26, in memoize
os.mkdir(cache_dirname)
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/proselint/cache'

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

Successfully merging a pull request may close this issue.

2 participants