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

sage-on-gentoo: flask-babel upgrade is breaking thing #437

Closed
kiwifb opened this issue Dec 25, 2017 · 4 comments

Comments

@kiwifb
Copy link
Contributor

commented Dec 25, 2017

I have just gone to flask-babel-0.11.2 (from 0.9) and a number of doctests just broke. All in the same way

Exception raised:
    Traceback (most recent call last):
      File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 520, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 923, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sagenb.notebook.worksheet.Worksheet.html[3]>", line 1, in <module>
        W.html()
      File "/usr/lib64/python2.7/site-packages/sagenb/notebook/worksheet.py", line 2608, in html
        worksheet=self, username=username)
      File "/usr/lib64/python2.7/site-packages/sagenb/notebook/template.py", line 135, in template
        default_context = {'sitename': gettext('Sage Notebook'),
      File "/usr/lib64/python2.7/site-packages/flask_babel/__init__.py", line 552, in gettext
        t = get_translations()
      File "/usr/lib64/python2.7/site-packages/flask_babel/__init__.py", line 227, in get_translations
        [get_locale()],
      File "/usr/lib64/python2.7/site-packages/flask_babel/__init__.py", line 257, in get_locale
        rv = babel.locale_selector_func()
      File "/usr/lib64/python2.7/site-packages/sagenb/flask_version/base.py", line 450, in get_locale
        return g.notebook.conf()['default_language']
      File "/usr/lib64/python2.7/site-packages/werkzeug/local.py", line 347, in __getattr__
        return getattr(self._get_current_object(), name)
    AttributeError: '_AppCtxGlobals' object has no attribute 'notebook'

Any quick fix ideas?

@dimpase

This comment has been minimized.

Copy link
Member

commented Jan 24, 2018

Google returns plenty for "AttributeError: '_AppCtxGlobals' object has no attribute", and none has a lot of sense to me (given that I'm not too much at home with the way notebook operates, with all sorts of delayed executions and callbacks).

See e.g. https://stackoverflow.com/questions/21138025/attributeerror-appctxglobals-object-has-no-attribute-user-in-flask

kiwifb referenced this issue in cschwan/sage-on-gentoo Jan 24, 2018
Package-Manager: Portage-2.3.19, Repoman-2.3.6
@kcrisman kcrisman added the Critical label May 22, 2018
@timokau

This comment has been minimized.

Copy link
Contributor

commented Jul 8, 2018

@fchapoton

This comment has been minimized.

Copy link
Contributor

commented Jul 12, 2018

see #450

@kiwifb

This comment has been minimized.

Copy link
Contributor Author

commented Oct 17, 2018

Now that #450 is merged we can close this.

@kiwifb kiwifb closed this Oct 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.