I've just installed Sage from sources and it crashed. I'm not sure if
this may be an issue, but I've just installed IPython from sources as
user too.
Attached you can find the crash report as suggested by the message
Thanks in advance
Jose
--
Jose Guzman
http://www.ist.ac.at/~jguzman/
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.
***************************************************************************
IPython post-mortem report
{'codename': 'An Afternoon Hack',
'commit_hash': '02da31c',
'commit_source': 'installation',
'default_encoding': 'UTF-8',
'ipython_path': '/home/jguzman/.local/lib/python2.7/site-packages/IPython',
'ipython_version': '1.0.0',
'os_name': 'posix',
'platform': 'Linux-3.2.0-36-generic-x86_64-with-debian-wheezy-sid',
'sys_executable': '/home/jguzman/sage-5.11/local/bin/python',
'sys_platform': 'linux2',
'sys_version': '2.7.5 (default, Aug 26 2013, 12:55:34) \n[GCC 4.6.3]'}
***************************************************************************
***************************************************************************
Crash traceback:
---------------------------------------------------------------------------
TypeError Python 2.7.5: /home/jguzman/sage-5.11/local/bin/python
Sun Sep 8 15:49:08 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.
/home/jguzman/sage-5.11/local/bin/sage-ipython in <module>()
2 # -*- coding: utf-8 -*-
3 """
4 Sage IPython startup script.
5 """
6 from sage.misc.interpreter import SageTerminalApp
7
8 # installs the extra readline commands before the IPython
initialization begins.
9 from sage.misc.readline_extra_commands import *
10
11 # Make sure we're using the Sage profile if one isn't specified.
12 import sys
13 if '--profile' not in sys.argv:
14 sys.argv.extend(['--profile', 'sage'])
15
16 app = SageTerminalApp.instance()
---> 17 app.initialize()
global app.initialize = <bound method SageTerminalApp.initialize of
<sage.misc.interpreter.SageTerminalApp object at 0x17aaf90>>
18 app.start()
/home/jguzman/.local/lib/python2.7/site-packages/IPython/frontend/terminal/ipapp.pyc
in initialize(self=<sage.misc.interpreter.SageTerminalApp object>, argv=None)
/home/jguzman/.local/lib/python2.7/site-packages/IPython/config/application.pyc
in catch_config_error(method=<function initialize>,
app=<sage.misc.interpreter.SageTerminalApp object>, *args=(None,), **kwargs={})
74
75
#-----------------------------------------------------------------------------
76 # Application class
77
#-----------------------------------------------------------------------------
78
79 @decorator
80 def catch_config_error(method, app, *args, **kwargs):
81 """Method decorator for catching invalid config
(Trait/ArgumentErrors) during init.
82
83 On a TraitError (generally caused by bad config), this will print
the trait's
84 message, and exit the app.
85
86 For use on init methods, to prevent invoking excepthook on invalid
input.
87 """
88 try:
---> 89 return method(app, *args, **kwargs)
method = <function initialize at 0x21eacf8>
app = <sage.misc.interpreter.SageTerminalApp object at 0x17aaf90>
args = (None,)
kwargs = {}
90 except (TraitError, ArgumentError) as e:
91 app.print_help()
92 app.log.fatal("Bad config encountered during initialization:")
93 app.log.fatal(str(e))
94 app.log.debug("Config at the time: %s", app.config)
95 app.exit(1)
96
97
98 class ApplicationError(Exception):
99 pass
100
101 class LevelFormatter(logging.Formatter):
102 """Formatter with additional `highlevel` record
103
104 This field is empty if log level is less than highlevel_limit,
/home/jguzman/.local/lib/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 0x17aaf90>>
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,
/home/jguzman/sage-5.11/local/lib/python2.7/site-packages/sage/misc/interpreter.pyc
in init_shell(self=<sage.misc.interpreter.SageTerminalApp object>)
718 EXAMPLES::
719
720 sage: from sage.misc.interpreter import SageTerminalApp,
DEFAULT_SAGE_CONFIG
721 sage: app = SageTerminalApp(config=DEFAULT_SAGE_CONFIG)
722 sage: app.initialize(argv=[]) # indirect doctest
723 sage: app.shell
724 <sage.misc.interpreter.SageInteractiveShell object at 0x...>
725 """
726 # We need verbose crashes for the Sage crash handler. We set
it here
727 # so that we don't overwrite the traitlet attribute
728 self.verbose_crash = True
729
730 # Shell initialization
731 self.shell = SageInteractiveShell.instance(config=self.config,
732 display_banner=False,
profile_dir=self.profile_dir,
--> 733 ipython_dir=self.ipython_dir)
global ipython_dir = undefined
self.ipython_dir = u'/home/jguzman/.sage/ipython-0.12'
734 self.shell.configurables.append(self)
735
self.shell.extension_manager.load_extension('sage.misc.sage_extension')
/home/jguzman/.local/lib/python2.7/site-packages/IPython/config/configurable.pyc
in instance(cls=<class 'sage.misc.interpreter.SageInteractiveShell'>,
*args=(), **kwargs={'config': {'SageTerminalApp': {'profile': u'sage',
'force_...{'display_banner': False, 'verbose_crash': True}}, 'display_banner':
False, 'ipython_dir': u'/home/jguzman/.sage/ipython-0.12', 'profile_dir':
<IPython.core.profiledir.ProfileDir object>})
334 >>> class Foo(SingletonConfigurable): pass
335 >>> foo = Foo.instance()
336 >>> foo == Foo.instance()
337 True
338
339 Create a subclass that is retrived using the base class
instance::
340
341 >>> class Bar(SingletonConfigurable): pass
342 >>> class Bam(Bar): pass
343 >>> bam = Bam.instance()
344 >>> bam == Bar.instance()
345 True
346 """
347 # Create and save the instance
348 if cls._instance is None:
--> 349 inst = cls(*args, **kwargs)
inst = undefined
cls = <class 'sage.misc.interpreter.SageInteractiveShell'>
args = ()
kwargs = {'ipython_dir': u'/home/jguzman/.sage/ipython-0.12',
'display_banner': False, 'config': {'SageTerminalApp': {'profile': u'sage',
'force_interact': True}, 'TerminalInteractiveShell': {'separate_in': '',
'ast_node_interactivity': 'all', 'colors': 'LightBG', 'confirm_exit': False},
'ProfileDir': {}, 'PromptManager': {'out_template': '', 'in2_template': '....:
', 'in_template': 'sage: ', 'justify': False}, 'TerminalIPythonApp':
{'display_banner': False, 'verbose_crash': True}}, 'profile_dir':
<IPython.core.profiledir.ProfileDir object at 0x21f2d90>}
350 # Now make sure that the instance will also be returned by
351 # parent classes' _instance attribute.
352 for subclass in cls._walk_mro():
353 subclass._instance = inst
354
355 if isinstance(cls._instance, cls):
356 return cls._instance
357 else:
358 raise MultipleInstanceError(
359 'Multiple incompatible subclass instances of '
360 '%s are being created.' % cls.__name__
361 )
362
363 @classmethod
364 def initialized(cls):
/home/jguzman/.local/lib/python2.7/site-packages/IPython/frontend/terminal/interactiveshell.pyc
in __init__(self=<sage.misc.interpreter.SageInteractiveShell object>,
config={'SageTerminalApp': {'profile': u'sage', 'force_...{'display_banner':
False, 'verbose_crash': True}},
ipython_dir=u'/home/jguzman/.sage/ipython-0.12',
profile_dir=<IPython.core.profiledir.ProfileDir object>, user_ns=None,
user_module=None, custom_exceptions=((), None), usage=None, banner1=None,
banner2=None, display_banner=False)
345 )
346 term_title = CBool(False, config=True,
347 help="Enable auto setting the terminal title."
348 )
349
350 # In the terminal, GUI control is done via PyOS_InputHook
351 from IPython.lib.inputhook import enable_gui
352 enable_gui = staticmethod(enable_gui)
353
354 def __init__(self, config=None, ipython_dir=None, profile_dir=None,
355 user_ns=None, user_module=None,
custom_exceptions=((),None),
356 usage=None, banner1=None, banner2=None,
display_banner=None):
357
358 super(TerminalInteractiveShell, self).__init__(
359 config=config, profile_dir=profile_dir, user_ns=user_ns,
--> 360 user_module=user_module, custom_exceptions=custom_exceptions
user_module = None
custom_exceptions = ((), None)
361 )
362 # use os.system instead of utils.process.system by default,
363 # because piped system doesn't make sense in the Terminal:
364 self.system = self.system_raw
365
366 self.init_term_title()
367 self.init_usage(usage)
368 self.init_banner(banner1, banner2, display_banner)
369
370
#-------------------------------------------------------------------------
371 # Things related to the terminal
372
#-------------------------------------------------------------------------
373
374 @property
375 def usable_screen_length(self):
/home/jguzman/.local/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc
in __init__(self=<sage.misc.interpreter.SageInteractiveShell object>,
ipython_dir=None, profile_dir=<IPython.core.profiledir.ProfileDir object>,
user_module=None, user_ns=None, custom_exceptions=((), None),
**kwargs={'config': {'SageTerminalApp': {'profile': u'sage',
'force_...{'display_banner': False, 'verbose_crash': True}}})
482 # know whether readline is present or not system-wide to
configure the
483 # completers, since the completion machinery can now operate
484 # independently of readline (e.g. over the network)
485 self.init_completer()
486 # TODO: init_io() needs to happen before init_traceback handlers
487 # because the traceback handlers hardcode the stdout/stderr
streams.
488 # This logic in in debugger.Pdb and should eventually be
changed.
489 self.init_io()
490 self.init_traceback_handlers(custom_exceptions)
491 self.init_prompts()
492 self.init_display_formatter()
493 self.init_display_pub()
494 self.init_data_pub()
495 self.init_displayhook()
496 self.init_latextool()
--> 497 self.init_magics()
self.init_magics = <bound method SageInteractiveShell.init_magics of
<sage.misc.interpreter.SageInteractiveShell object at 0x21f2c10>>
498 self.init_logstart()
499 self.init_pdb()
500 self.init_extension_manager()
501 self.init_payload()
502 self.hooks.late_startup_hook()
503 atexit.register(self.atexit_operations)
504
505 def get_ipython(self):
506 """Return the currently running IPython instance."""
507 return self
508
509
#-------------------------------------------------------------------------
510 # Trait changed handlers
511
#-------------------------------------------------------------------------
512
/home/jguzman/.local/lib/python2.7/site-packages/IPython/frontend/terminal/interactiveshell.pyc
in init_magics(self=<sage.misc.interpreter.SageInteractiveShell object>)
704 """Handle interactive exit.
705
706 This method calls the ask_exit callback."""
707 if self.confirm_exit:
708 if self.ask_yes_no('Do you really want to exit
([y]/n)?','y'):
709 self.ask_exit()
710 else:
711 self.ask_exit()
712
713
#-------------------------------------------------------------------------
714 # Things related to magics
715
#-------------------------------------------------------------------------
716
717 def init_magics(self):
718 super(TerminalInteractiveShell, self).init_magics()
--> 719 self.register_magics(TerminalMagics)
self.register_magics = <bound method MagicsManager.register of
<IPython.core.magic.MagicsManager object at 0x21f4e90>>
global TerminalMagics = <class
'IPython.frontend.terminal.interactiveshell.TerminalMagics'>
720
721 def showindentationerror(self):
722 super(TerminalInteractiveShell, self).showindentationerror()
723 print("If you want to paste code into IPython, try the "
724 "%paste and %cpaste magic functions.")
725
726
727 InteractiveShellABC.register(TerminalInteractiveShell)
/home/jguzman/.local/lib/python2.7/site-packages/IPython/core/magic.pyc in
register(self=<IPython.core.magic.MagicsManager object>, *magic_objects=(<class
'IPython.frontend.terminal.interactiveshell.TerminalMagics'>,))
374
375 The provided arguments can be an arbitrary mix of classes and
instances.
376
377 Parameters
378 ----------
379 magic_objects : one or more classes or instances
380 """
381 # Start by validating them to ensure they have all had their
magic
382 # methods registered at the instance level
383 for m in magic_objects:
384 if not m.registered:
385 raise ValueError("Class of magics %r was constructed
without "
386 "the @register_magics class decorator")
387 if type(m) in (type, MetaHasTraits):
388 # If we're given an uninstantiated class
--> 389 m = m(shell=self.shell)
m = <class 'IPython.frontend.terminal.interactiveshell.TerminalMagics'>
global shell = undefined
self.shell = <sage.misc.interpreter.SageInteractiveShell object at
0x21f2c10>
390
391 # Now that we have an instance, we can register it and
update the
392 # table of callables
393 self.registry[m.__class__.__name__] = m
394 for mtype in magic_kinds:
395 self.magics[mtype].update(m.magics[mtype])
396
397 def register_function(self, func, magic_kind='line',
magic_name=None):
398 """Expose a standalone function as magic function for IPython.
399
400 This will create an IPython magic (line, cell or both) from a
401 standalone function. The functions should have the following
402 signatures:
403
404 * For line magics: `def f(line)`
/home/jguzman/.local/lib/python2.7/site-packages/IPython/frontend/terminal/interactiveshell.pyc
in __init__(self=<IPython.frontend.terminal.interactiveshell.TerminalMagics
object>, shell=<sage.misc.interpreter.SageInteractiveShell object>)
69 else:
70 yield l
71 except EOFError:
72 print '<EOF>'
73 return
74
75
76
#------------------------------------------------------------------------
77 # Terminal-specific magics
78
#------------------------------------------------------------------------
79
80 @magics_class
81 class TerminalMagics(Magics):
82 def __init__(self, shell):
83 super(TerminalMagics, self).__init__(shell)
---> 84 self.input_splitter = IPythonInputSplitter(input_mode='line')
self.input_splitter = undefined
global IPythonInputSplitter = <class
'IPython.core.inputsplitter.IPythonInputSplitter'>
global input_mode = undefined
85
86 def cleanup_input(self, block):
87 """Apply all possible IPython cleanups to an input block.
88
89 This means:
90
91 - remove any global leading whitespace (dedent)
92 - remove any email quotes ('>') if they are present in *all*
lines
93 - apply all static inputsplitter transforms and break into
sub-blocks
94 - apply prefilter() to each sub-block that is a single line.
95
96 Parameters
97 ----------
98 block : str
99 A possibly multiline input string of code.
TypeError: __init__() got an unexpected keyword argument 'input_mode'
***************************************************************************
History of session input: