From: Thomas Kahle <tomka@gentoo.org>
To: gentoo-science@lists.gentoo.org
Subject: [gentoo-science] sage and babel
Date: Tue, 13 Aug 2013 16:56:49 +0200 [thread overview]
Message-ID: <520A4931.2040803@gentoo.org> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 204 bytes --]
Hi,
recently my sage-on-gentoo started to crash on startup. Something is
wrong with babel as can be seen in the end of the attached crash-report.
Any ideas?
Thanks,
Thomas
--
Thomas Kahle
[-- Attachment #1.2: Sage_crash_report.txt --]
[-- Type: text/plain, Size: 19054 bytes --]
***************************************************************************
IPython post-mortem report
{'commit_hash': '177894e',
'commit_source': 'installation',
'default_encoding': 'UTF-8',
'ipython_path': '/usr/lib64/python2.7/site-packages/IPython',
'ipython_version': '0.13.1',
'os_name': 'posix',
'platform': 'Linux-3.9.0-gentoo-x86_64-Intel-R-_Core-TM-_i5-2520M_CPU_@_2.50GHz-with-gentoo-2.2',
'sys_executable': '/usr/bin/python2.7',
'sys_platform': 'linux2',
'sys_version': '2.7.5 (default, Jul 2 2013, 15:56:57) \n[GCC 4.6.3]'}
***************************************************************************
***************************************************************************
Crash traceback:
---------------------------------------------------------------------------
ImportError Python 2.7.5: /usr/bin/python2.7
Tue Aug 13 16:54:25 2013
A problem occured executing Python code. Here is the sequence of function
calls leading up to the error, with the most recent (innermost) call last.
/usr/bin/sage-ipython-python2.7 in <module>()
1 #!/usr/bin/env python2.7
2 # -*- coding: utf-8 -*-
3 """
4 Sage IPython startup script.
5 """
6 from sage.misc.interpreter import SageTerminalApp
7
8 # Make sure we're using the Sage profile if one isn't specified.
9 import sys
10 if '--profile' not in sys.argv:
11 sys.argv.extend(['--profile', 'sage'])
12
13 app = SageTerminalApp.instance()
---> 14 app.initialize()
global app.initialize = <bound method SageTerminalApp.initialize of <sage.misc.interpreter.SageTerminalApp object at 0x6c4f90>>
15 app.start()
/usr/lib64/python2.7/site-packages/IPython/frontend/terminal/ipapp.pyc in initialize(self=<sage.misc.interpreter.SageTerminalApp object>, argv=None)
/usr/lib64/python2.7/site-packages/IPython/config/application.pyc in catch_config_error(method=<function initialize>, app=<sage.misc.interpreter.SageTerminalApp object>, *args=(None,), **kwargs={})
69
70 #-----------------------------------------------------------------------------
71 # Application class
72 #-----------------------------------------------------------------------------
73
74 @decorator
75 def catch_config_error(method, app, *args, **kwargs):
76 """Method decorator for catching invalid config (Trait/ArgumentErrors) during init.
77
78 On a TraitError (generally caused by bad config), this will print the trait's
79 message, and exit the app.
80
81 For use on init methods, to prevent invoking excepthook on invalid input.
82 """
83 try:
---> 84 return method(app, *args, **kwargs)
method = <function initialize at 0x11c3230>
app = <sage.misc.interpreter.SageTerminalApp object at 0x6c4f90>
args = (None,)
kwargs = {}
85 except (TraitError, ArgumentError) as e:
86 app.print_description()
87 app.print_help()
88 app.print_examples()
89 app.log.fatal("Bad config encountered during initialization:")
90 app.log.fatal(str(e))
91 app.log.debug("Config at the time: %s", app.config)
92 app.exit(1)
93
94
95 class ApplicationError(Exception):
96 pass
97
98
99 class Application(SingletonConfigurable):
/usr/lib64/python2.7/site-packages/IPython/frontend/terminal/ipapp.pyc in initialize(self=<sage.misc.interpreter.SageTerminalApp object>, argv=None)
309
310 @catch_config_error
311 def initialize(self, argv=None):
312 """Do actions after construct, but before starting the app."""
313 super(TerminalIPythonApp, self).initialize(argv)
314 if self.subapp is not None:
315 # don't bother initializing further, starting subapp
316 return
317 if not self.ignore_old_config:
318 check_for_old_config(self.ipython_dir)
319 # print self.extra_args
320 if self.extra_args and not self.something_to_run:
321 self.file_to_run = self.extra_args[0]
322 self.init_path()
323 # create the shell
--> 324 self.init_shell()
self.init_shell = <bound method SageTerminalApp.init_shell of <sage.misc.interpreter.SageTerminalApp object at 0x6c4f90>>
325 # and draw the banner
326 self.init_banner()
327 # Now a variety of things that happen after the banner is printed.
328 self.init_gui_pylab()
329 self.init_extensions()
330 self.init_code()
331
332 def init_shell(self):
333 """initialize the InteractiveShell instance"""
334 # Create an InteractiveShell instance.
335 # shell.display_banner should always be False for the terminal
336 # based app, because we call shell.show_banner() by hand below
337 # so the banner shows *before* all extension loading stuff.
338 self.shell = TerminalInteractiveShell.instance(config=self.config,
339 display_banner=False, profile_dir=self.profile_dir,
/usr/lib64/python2.7/site-packages/sage/misc/interpreter.pyc in init_shell(self=<sage.misc.interpreter.SageTerminalApp object>)
721 sage: from sage.misc.interpreter import SageTerminalApp, DEFAULT_SAGE_CONFIG
722 sage: app = SageTerminalApp(config=DEFAULT_SAGE_CONFIG)
723 sage: app.initialize(argv=[]) # indirect doctest
724 sage: app.shell
725 <sage.misc.interpreter.SageInteractiveShell object at 0x...>
726 """
727 # We need verbose crashes for the Sage crash handler. We set it here
728 # so that we don't overwrite the traitlet attribute
729 self.verbose_crash = True
730
731 # Shell initialization
732 self.shell = SageInteractiveShell.instance(config=self.config,
733 display_banner=False, profile_dir=self.profile_dir,
734 ipython_dir=self.ipython_dir)
735 self.shell.configurables.append(self)
--> 736 self.shell.extension_manager.load_extension('sage.misc.sage_extension')
self.shell.extension_manager.load_extension = <bound method ExtensionManager.load_extension of <IPython.core.extensions.ExtensionManager object at 0x12afd10>>
/usr/lib64/python2.7/site-packages/IPython/core/extensions.pyc in load_extension(self=<IPython.core.extensions.ExtensionManager object>, module_str='sage.misc.sage_extension')
75
76 def _on_ipython_dir_changed(self):
77 if not os.path.isdir(self.ipython_extension_dir):
78 os.makedirs(self.ipython_extension_dir, mode = 0777)
79
80 def load_extension(self, module_str):
81 """Load an IPython extension by its module name.
82
83 If :func:`load_ipython_extension` returns anything, this function
84 will return that object.
85 """
86 from IPython.utils.syspathcontext import prepended_to_syspath
87
88 if module_str not in sys.modules:
89 with prepended_to_syspath(self.ipython_extension_dir):
---> 90 __import__(module_str)
global __import__ = undefined
module_str = 'sage.misc.sage_extension'
91 mod = sys.modules[module_str]
92 return self._call_load_ipython_extension(mod)
93
94 def unload_extension(self, module_str):
95 """Unload an IPython extension by its module name.
96
97 This function looks up the extension's name in ``sys.modules`` and
98 simply calls ``mod.unload_ipython_extension(self)``.
99 """
100 if module_str in sys.modules:
101 mod = sys.modules[module_str]
102 self._call_unload_ipython_extension(mod)
103
104 def reload_extension(self, module_str):
105 """Reload an IPython extension by calling reload.
/usr/lib64/python2.7/site-packages/sage/misc/sage_extension.py in <module>()
35 2
36
37 In contrast, input to the ``%time`` magic command is preparsed::
38
39 sage: shell.run_cell('%time 594.factor()')
40 CPU times: user ...
41 Wall time: ...
42 2 * 3^3 * 11
43 """
44
45 from IPython.core.hooks import TryNext
46 from IPython.core.magic import Magics, magics_class, line_magic
47 import os
48 import sys
49 import sage
---> 50 import sage.all
global sage.all = undefined
51 from sage.misc.interpreter import preparser
52 from sage.misc.preparser import preparse
53
54 @magics_class
55 class SageMagics(Magics):
56
57 @line_magic
58 def runfile(self, s):
59 r"""
60 Loads the code contained in the file ``s``. This is designed
61 to be used from the command line as ``%runfile /path/to/file``.
62
63 :param s: file to be loaded
64 :type s: string
65
/usr/lib64/python2.7/site-packages/sage/all.py in <module>()
99 from sage.schemes.all import *
100 from sage.graphs.all import *
101 from sage.groups.all import *
102 from sage.databases.all import *
103 from sage.structure.all import *
104 from sage.categories.all import *
105 from sage.sets.all import *
106 from sage.probability.all import *
107 from sage.interfaces.all import *
108
109 from sage.symbolic.all import *
110
111 from sage.functions.all import *
112 from sage.calculus.all import *
113
--> 114 from sage.server.all import *
global sage.server.all = undefined
115 import sage.tests.all as tests
116
117 from sage.crypto.all import *
118 import sage.crypto.mq as mq
119
120 from sage.plot.all import *
121 from sage.plot.plot3d.all import *
122
123 from sage.coding.all import *
124 from sage.combinat.all import *
125
126 from sage.lfunctions.all import *
127
128 from sage.geometry.all import *
129 from sage.geometry.triangulation.all import *
/usr/lib64/python2.7/site-packages/sage/server/all.py in <module>()
1 #from server1.all import *
----> 2 from notebook.all import *
global notebook.all = undefined
3 from trac.all import *
4
/usr/lib64/python2.7/site-packages/sage/server/notebook/all.py in <module>()
7 # http://www.gnu.org/licenses/
8 #############################################################################
9
10 #from sage_email import email
11
12 #from sagenb.notebook.notebook_object import notebook, inotebook
13
14 #from interact import interact, input_box, slider, range_slider, selector, checkbox, input_grid, text_control
15
16 # We import the following two only for doctesting purposes
17 #import sage.server.notebook.notebook
18 #import sage.server.notebook.interact
19 #import sage.server.notebook.sage_email
20
21 # Import the new separated Sage notebook.
---> 22 from sagenb.notebook.all import *
global sagenb.notebook.all = undefined
/usr/lib64/python2.7/site-packages/sagenb/notebook/all.py in <module>()
1 # -*- coding: utf-8 -*
2 """nodoctest
3 """
4 #############################################################################
5 # Copyright (C) 2007 William Stein <wstein@gmail.com>
6 # Distributed under the terms of the GNU General Public License (GPL)
7 # The full text of the GPL is available at:
8 # http://www.gnu.org/licenses/
9 #############################################################################
10
11 #from test_notebook import notebook_playback
12
13 from sage_email import email
14
---> 15 from notebook_object import notebook, inotebook
global notebook_object = undefined
global notebook = undefined
global inotebook = undefined
16
17 from interact import interact, input_box, slider, range_slider, selector, checkbox, input_grid, text_control, color_selector
18
19 # For doctesting.
20 import sagenb
/usr/lib64/python2.7/site-packages/sagenb/notebook/notebook_object.py in <module>()
2 """nodoctest
3 Configure and Start a Notebook Server
4
5 The :class:`NotebookObject` is used to configure and launch a Sage
6 Notebook server.
7 """
8 #############################################################################
9 # Copyright (C) 2007 William Stein <wstein@gmail.com>
10 # Distributed under the terms of the GNU General Public License (GPL)
11 # The full text of the GPL is available at:
12 # http://www.gnu.org/licenses/
13 #############################################################################
14
15 import time, os, shutil, signal, tempfile
16
---> 17 import notebook as _notebook
global notebook = undefined
global _notebook = undefined
18
19 import run_notebook
20
21 class NotebookObject:
22 r"""
23 Start the Sage Notebook server. More details about using these
24 options, as well as tips and tricks, may be available at `this
25 Sage wiki page`_. If a notebook server is already running in the
26 directory, this will open a browser to the running notebook.
27
28 INPUT:
29
30 - ``directory`` -- string; directory that contains the Sage
31 notebook files; the default is
32 ``.sage/sage_notebook.sagenb``, in your home directory.
/usr/lib64/python2.7/site-packages/sagenb/notebook/notebook.py in <module>()
24 import random
25 import re
26 import shutil
27 import socket
28 import time
29 import bz2
30 import cPickle
31 from cgi import escape
32
33
34 # Sage libraries
35 from sagenb.misc.misc import (pad_zeros, cputime, tmp_dir, load, save,
36 ignore_nonexistent_files, unicode_str)
37
38 # Sage Notebook
---> 39 from . import css # style
global css = undefined
40 from . import js # javascript
41 from . import worksheet # individual worksheets (which make up a notebook)
42 from . import config # internal configuration stuff (currently, just keycodes)
43 from . import keyboards # keyboard layouts
44 from . import server_conf # server configuration
45 from . import user_conf # user configuration
46 from . import user # users
47 from template import template, prettify_time_ago
48 from flaskext.babel import gettext, lazy_gettext
49
50 try:
51 # sage is installed
52 import sage
53 # [(string: name, bool: optional)]
54 SYSTEMS = [('sage', False),
/usr/lib64/python2.7/site-packages/sagenb/notebook/css.py in <module>()
2 """nodoctest
3 Notebook Stylesheets (CSS)
4 """
5
6
7 #############################################################################
8 # Copyright (C) 2007 William Stein <wstein@gmail.com>
9 # Distributed under the terms of the GNU General Public License (GPL)
10 # The full text of the GPL is available at:
11 # http://www.gnu.org/licenses/
12 #############################################################################
13
14 import os
15
16 from sagenb.misc.misc import DOT_SAGENB
---> 17 from sagenb.notebook.template import template
global sagenb.notebook.template = undefined
global template = undefined
18 from hashlib import sha1
19
20 _css_cache = None
21 def css(color='default'):
22 r"""
23 Return the CSS header used by the Sage Notebook.
24
25 INPUT:
26
27
28 - ``color`` - string or pair of html colors, e.g.,
29 'gmail' 'grey' ``('#ff0000', '#0000ff')``
30
31
32 EXAMPLES::
/usr/lib64/python2.7/site-packages/sagenb/notebook/template.py in <module>()
9 - Timothy Clemans and Mike Hansen (2008-10-27): major update
10 """
11 #############################################################################
12 # Copyright (C) 2007 William Stein <wstein@gmail.com>
13 # Distributed under the terms of the GNU General Public License (GPL)
14 # The full text of the GPL is available at:
15 # http://www.gnu.org/licenses/
16 #############################################################################
17
18 import jinja2
19
20 import os, re, sys, json
21
22 from sagenb.misc.misc import SAGE_VERSION, DATA, unicode_str
23 from sagenb.notebook.cell import number_of_rows
---> 24 from flaskext.babel import gettext, ngettext, lazy_gettext
global flaskext.babel = undefined
global gettext = undefined
global ngettext = undefined
global lazy_gettext = undefined
25
26 if os.environ.has_key('SAGENB_TEMPLATE_PATH'):
27 if not os.path.isdir(os.environ['SAGENB_TEMPLATE_PATH']):
28 raise ValueError("Enviromental variable SAGENB_TEMPLATE_PATH points to\
29 a non-existant directory")
30 TEMPLATE_PATH = os.environ['SAGENB_TEMPLATE_PATH']
31 else:
32 TEMPLATE_PATH = os.path.join(DATA, 'sage')
33 env = jinja2.Environment(loader=jinja2.FileSystemLoader(TEMPLATE_PATH))
34
35 css_illegal_re = re.compile(r'[^-A-Za-z_0-9]')
36
37 def css_escape(string):
38 r"""
39 Returns a string with all characters not legal in a css name
ImportError: No module named babel
***************************************************************************
History of session input:
*** Last line of input (may not be in above history):
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 381 bytes --]
next reply other threads:[~2013-08-13 14:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-13 14:56 Thomas Kahle [this message]
2013-08-13 15:06 ` [gentoo-science] sage and babel Thomas Kahle
2013-08-13 22:44 ` François Bissey
2013-08-13 16:12 ` Steven Trogdon
2013-08-13 16:59 ` Thomas Kahle
2013-08-13 21:51 ` François Bissey
2013-08-14 5:36 ` Thomas Kahle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=520A4931.2040803@gentoo.org \
--to=tomka@gentoo.org \
--cc=gentoo-science@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox