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

PermissionError when opening "statistics" page #38

Closed
corani opened this issue Dec 15, 2015 · 3 comments
Closed

PermissionError when opening "statistics" page #38

corani opened this issue Dec 15, 2015 · 3 comments
Labels

Comments

@corani
Copy link
Contributor

corani commented Dec 15, 2015

The .webassets-cache folder should probably be created by setup.py, since that's run with the correct privileges.

Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/flask/app.py", line 1836, in __call__
    return self.wsgi_app(environ, start_response)
  File "/usr/local/lib/python3.4/dist-packages/flask/app.py", line 1820, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/usr/local/lib/python3.4/dist-packages/flask/app.py", line 1403, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.4/dist-packages/flask/_compat.py", line 33, in reraise
    raise value
  File "/usr/local/lib/python3.4/dist-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.4/dist-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.4/dist-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.4/dist-packages/flask/_compat.py", line 33, in reraise
    raise value
  File "/usr/local/lib/python3.4/dist-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.4/dist-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python3.4/dist-packages/beancount_web-0.1.0a2-py3.4.egg/beancount_web/application.py", line 117, in report
    return render_template('{}.html'.format(report_name))
  File "/usr/local/lib/python3.4/dist-packages/flask/templating.py", line 128, in render_template
    context, ctx.app)
  File "/usr/local/lib/python3.4/dist-packages/flask/templating.py", line 110, in _render
    rv = template.render(context)
  File "/usr/local/lib/python3.4/dist-packages/jinja2/environment.py", line 989, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/local/lib/python3.4/dist-packages/jinja2/environment.py", line 754, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.4/dist-packages/jinja2/_compat.py", line 37, in reraise
    raise value.with_traceback(tb)
  File "/usr/local/lib/python3.4/dist-packages/beancount_web-0.1.0a2-py3.4.egg/beancount_web/templates/statistics.html", line 2, in top-level template code
    {% set active_page = 'statistics' %}
  File "/usr/local/lib/python3.4/dist-packages/beancount_web-0.1.0a2-py3.4.egg/beancount_web/templates/_layout.html", line 70, in top-level template code
    {% assets
  File "/usr/local/lib/python3.4/dist-packages/webassets-0.11.1-py3.4.egg/webassets/ext/jinja2.py", line 186, in _render_assets
    urls = bundle.urls()
  File "/usr/local/lib/python3.4/dist-packages/webassets-0.11.1-py3.4.egg/webassets/bundle.py", line 787, in urls
    urls.extend(bundle._urls(new_ctx, extra_filters, *args, **kwargs))
  File "/usr/local/lib/python3.4/dist-packages/webassets-0.11.1-py3.4.egg/webassets/bundle.py", line 746, in _urls
    *args, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/webassets-0.11.1-py3.4.egg/webassets/bundle.py", line 600, in _build
    force, disable_cache=disable_cache, extra_filters=extra_filters)
  File "/usr/local/lib/python3.4/dist-packages/webassets-0.11.1-py3.4.egg/webassets/bundle.py", line 474, in _merge_and_apply
    ctx.cache, no_cache_read=actually_skip_cache_here,
  File "/usr/local/lib/python3.4/dist-packages/webassets-0.11.1-py3.4.egg/webassets/bundle.py", line 50, in __getattr__
    return self.getattr(self._parent, item)
  File "/usr/local/lib/python3.4/dist-packages/webassets-0.11.1-py3.4.egg/webassets/bundle.py", line 58, in getattr
    return getattr(object, item)
  File "/usr/local/lib/python3.4/dist-packages/webassets-0.11.1-py3.4.egg/webassets/env.py", line 438, in _get_cache
    cache = get_cache(self._storage['cache'], self)
  File "/usr/local/lib/python3.4/dist-packages/webassets-0.11.1-py3.4.egg/webassets/cache.py", line 231, in get_cache
    os.makedirs(directory)
  File "/usr/lib/python3.4/os.py", line 237, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.4/dist-packages/beancount_web-0.1.0a2-py3.4.egg/beancount_web/static/.webassets-cache'
@corani
Copy link
Contributor Author

corani commented Dec 15, 2015

idem for the folder /usr/local/lib/python3.4/dist-packages/beancount_web-0.1.0a2-py3.4.egg/beancount_web/static/gen

@aumayr aumayr added the bug label Dec 15, 2015
@aumayr aumayr closed this as completed in 4f18514 Dec 15, 2015
@aumayr
Copy link
Member

aumayr commented Dec 15, 2015

Moved the target-folder for webassets to static/stylesheets because this folder already get's installed.

@aumayr
Copy link
Member

aumayr commented Dec 20, 2015

See also 8068d4c

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

No branches or pull requests

3 participants