WikiFormatting: Sage_crash_report.txt

File Sage_crash_report.txt, 28.1 KB (added by gh-Hrishabh-yadav, 7 months ago)
Line 
1***************************************************************************
2
3IPython post-mortem report
4
5{'commit_hash': u'033ab93c7',
6 'commit_source': 'installation',
7 'default_encoding': 'UTF-8',
8 'ipython_path': '/home/hrishabh/sage/local/lib/python2.7/site-packages/IPython',
9 'ipython_version': '5.8.0',
10 'os_name': 'posix',
11 'platform': 'Linux-4.15.0-46-generic-x86_64-with-debian-buster-sid',
12 'sys_executable': '/home/hrishabh/sage/local/bin/python2',
13 'sys_platform': 'linux2',
14 'sys_version': '2.7.15 (default, Mar 10 2019, 20:33:22) \n[GCC 7.3.0]'}
15
16***************************************************************************
17
18
19
20***************************************************************************
21
22Crash traceback:
23
24---------------------------------------------------------------------------
25---------------------------------------------------------------------------
26ImportError            Python 2.7.15: /home/hrishabh/sage/local/bin/python2
27                                                   Thu Mar 21 20:28:50 2019
28A problem occurred executing Python code.  Here is the sequence of function
29calls leading up to the error, with the most recent (innermost) call last.
30/home/hrishabh/sage/src/bin/sage-ipython in <module>()
31      1 #!/usr/bin/env sage-python23
32      2 # -*- coding: utf-8 -*-
33      3 """
34      4 Sage IPython startup script.
35      5 """
36      6
37      7 # Display startup banner. Do this before anything else to give the user
38      8 # early feedback that Sage is starting.
39      9 from sage.misc.banner import banner
40     10 banner()
41     11
42     12 from sage.repl.interpreter import SageTerminalApp
43     13
44     14 app = SageTerminalApp.instance()
45---> 15 app.initialize()
46        global app.initialize = <bound method SageTerminalApp.initialize of <sage.repl.interpreter.SageTerminalApp object at 0x7f90185f4c50>>
47     16 app.start()
48
49<decorator-gen-110> in initialize(self=<sage.repl.interpreter.SageTerminalApp object>, argv=None)
50
51/home/hrishabh/sage/local/lib/python2.7/site-packages/traitlets/config/application.pyc in catch_config_error(method=<function initialize>, app=<sage.repl.interpreter.SageTerminalApp object>, *args=(None,), **kwargs={})
52     72     TRAITLETS_APPLICATION_RAISE_CONFIG_FILE_ERROR = False
53     73 else:
54     74     raise ValueError("Unsupported value for environment variable: 'TRAITLETS_APPLICATION_RAISE_CONFIG_FILE_ERROR' is set to '%s' which is none of  {'0', '1', 'false', 'true', ''}."% _envvar )
55     75
56     76
57     77 @decorator
58     78 def catch_config_error(method, app, *args, **kwargs):
59     79     """Method decorator for catching invalid config (Trait/ArgumentErrors) during init.
60     80
61     81     On a TraitError (generally caused by bad config), this will print the trait's
62     82     message, and exit the app.
63     83
64     84     For use on init methods, to prevent invoking excepthook on invalid input.
65     85     """
66     86     try:
67---> 87         return method(app, *args, **kwargs)
68        method = <function initialize at 0x7f90131ea9b0>
69        app = <sage.repl.interpreter.SageTerminalApp object at 0x7f90185f4c50>
70        args = (None,)
71        kwargs = {}
72     88     except (TraitError, ArgumentError) as e:
73     89         app.print_help()
74     90         app.log.fatal("Bad config encountered during initialization:")
75     91         app.log.fatal(str(e))
76     92         app.log.debug("Config at the time: %s", app.config)
77     93         app.exit(1)
78     94
79     95
80     96 class ApplicationError(Exception):
81     97     pass
82     98
83     99
84    100 class LevelFormatter(logging.Formatter):
85    101     """Formatter with additional `highlevel` record
86    102
87
88/home/hrishabh/sage/local/lib/python2.7/site-packages/IPython/terminal/ipapp.pyc in initialize(self=<sage.repl.interpreter.SageTerminalApp object>, argv=None)
89    301
90    302         return super(TerminalIPythonApp, self).parse_command_line(argv)
91    303     
92    304     @catch_config_error
93    305     def initialize(self, argv=None):
94    306         """Do actions after construct, but before starting the app."""
95    307         super(TerminalIPythonApp, self).initialize(argv)
96    308         if self.subapp is not None:
97    309             # don't bother initializing further, starting subapp
98    310             return
99    311         # print self.extra_args
100    312         if self.extra_args and not self.something_to_run:
101    313             self.file_to_run = self.extra_args[0]
102    314         self.init_path()
103    315         # create the shell
104--> 316         self.init_shell()
105        self.init_shell = <bound method SageTerminalApp.init_shell of <sage.repl.interpreter.SageTerminalApp object at 0x7f90185f4c50>>
106    317         # and draw the banner
107    318         self.init_banner()
108    319         # Now a variety of things that happen after the banner is printed.
109    320         self.init_gui_pylab()
110    321         self.init_extensions()
111    322         self.init_code()
112    323
113    324     def init_shell(self):
114    325         """initialize the InteractiveShell instance"""
115    326         # Create an InteractiveShell instance.
116    327         # shell.display_banner should always be False for the terminal
117    328         # based app, because we call shell.show_banner() by hand below
118    329         # so the banner shows *before* all extension loading stuff.
119    330         self.shell = self.interactive_shell_class.instance(parent=self,
120    331                         profile_dir=self.profile_dir,
121
122/home/hrishabh/sage/local/lib/python2.7/site-packages/sage/repl/interpreter.pyc in init_shell(self=<sage.repl.interpreter.SageTerminalApp object>)
123    743         self.shell.has_sage_extensions = SAGE_EXTENSION in self.extensions
124    744
125    745         # Load the %lprun extension if available
126    746         try:
127    747             import line_profiler
128    748         except ImportError:
129    749             pass
130    750         else:
131    751             self.extensions.append('line_profiler')
132    752
133    753         if self.shell.has_sage_extensions:
134    754             self.extensions.remove(SAGE_EXTENSION)
135    755
136    756             # load sage extension here to get a crash if
137    757             # something is wrong with the sage library
138--> 758             self.shell.extension_manager.load_extension(SAGE_EXTENSION)
139        self.shell.extension_manager.load_extension = <bound method ExtensionManager.load_extension of <IPython.core.extensions.ExtensionManager object at 0x7f9003dd6f10>>
140        global SAGE_EXTENSION = 'sage'
141    759
142    760
143
144/home/hrishabh/sage/local/lib/python2.7/site-packages/IPython/core/extensions.pyc in load_extension(self=<IPython.core.extensions.ExtensionManager object>, module_str='sage')
145     70
146     71         Returns the string "already loaded" if the extension is already loaded,
147     72         "no load function" if the module doesn't have a load_ipython_extension
148     73         function, or None if it succeeded.
149     74         """
150     75         if module_str in self.loaded:
151     76             return "already loaded"
152     77         
153     78         from IPython.utils.syspathcontext import prepended_to_syspath
154     79         
155     80         with self.shell.builtin_trap:
156     81             if module_str not in sys.modules:
157     82                 with prepended_to_syspath(self.ipython_extension_dir):
158     83                     __import__(module_str)
159     84             mod = sys.modules[module_str]
160---> 85             if self._call_load_ipython_extension(mod):
161        self._call_load_ipython_extension = <bound method ExtensionManager._call_load_ipython_extension of <IPython.core.extensions.ExtensionManager object at 0x7f9003dd6f10>>
162        mod = <module 'sage' from '/home/hrishabh/sage/local/lib/python2.7/site-packages/sage/__init__.pyc'>
163     86                 self.loaded.add(module_str)
164     87             else:
165     88                 return "no load function"
166     89
167     90     def unload_extension(self, module_str):
168     91         """Unload an IPython extension by its module name.
169     92
170     93         This function looks up the extension's name in ``sys.modules`` and
171     94         simply calls ``mod.unload_ipython_extension(self)``.
172     95         
173     96         Returns the string "no unload function" if the extension doesn't define
174     97         a function to unload itself, "not loaded" if the extension isn't loaded,
175     98         otherwise None.
176     99         """
177    100         if module_str not in self.loaded:
178
179/home/hrishabh/sage/local/lib/python2.7/site-packages/IPython/core/extensions.pyc in _call_load_ipython_extension(self=<IPython.core.extensions.ExtensionManager object>, mod=<module 'sage' from '/home/hrishabh/sage/local/lib/python2.7/site-packages/sage/__init__.pyc'>)
180    117         """
181    118         from IPython.utils.syspathcontext import prepended_to_syspath
182    119
183    120         if (module_str in self.loaded) and (module_str in sys.modules):
184    121             self.unload_extension(module_str)
185    122             mod = sys.modules[module_str]
186    123             with prepended_to_syspath(self.ipython_extension_dir):
187    124                 reload(mod)
188    125             if self._call_load_ipython_extension(mod):
189    126                 self.loaded.add(module_str)
190    127         else:
191    128             self.load_extension(module_str)
192    129
193    130     def _call_load_ipython_extension(self, mod):
194    131         if hasattr(mod, 'load_ipython_extension'):
195--> 132             mod.load_ipython_extension(self.shell)
196        mod.load_ipython_extension = <function load_ipython_extension at 0x7f901a7c97d0>
197        self.shell = <sage.repl.interpreter.SageTerminalInteractiveShell object at 0x7f90131914d0>
198    133             return True
199    134
200    135     def _call_unload_ipython_extension(self, mod):
201    136         if hasattr(mod, 'unload_ipython_extension'):
202    137             mod.unload_ipython_extension(self.shell)
203    138             return True
204    139
205    140     def install_extension(self, url, filename=None):
206    141         """Download and install an IPython extension.
207    142
208    143         If filename is given, the file will be so named (inside the extension
209    144         directory). Otherwise, the name from the URL will be used. The file must
210    145         have a .py or .zip extension; otherwise, a ValueError will be raised.
211    146
212    147         Returns the full path to the installed file.
213
214/home/hrishabh/sage/local/lib/python2.7/site-packages/sage/__init__.pyc in load_ipython_extension(*args=(<sage.repl.interpreter.SageTerminalInteractiveShell object>,))
215      1 __all__ = ['all']
216      2
217      3 # Set sage.__version__ to the current version number. This is analogous
218      4 # to many other Python packages.
219      5 from sage.version import version as __version__
220      6
221      7 # Make sure that the correct zlib library is loaded. This is needed
222      8 # to prevent the system zlib to be loaded instead of the Sage one.
223      9 # See https://trac.sagemath.org/ticket/23122
224     10 import zlib
225     11
226     12 # IPython calls this when starting up
227     13 def load_ipython_extension(*args):
228     14     import sage.repl.ipython_extension
229---> 15     sage.repl.ipython_extension.load_ipython_extension(*args)
230        sage.repl.ipython_extension.load_ipython_extension = <function load_ipython_extension at 0x7f900390d7d0>
231        args = (<sage.repl.interpreter.SageTerminalInteractiveShell object at 0x7f90131914d0>,)
232     16
233     17
234     18 # Monkey-patch inspect.isfunction() to support Cython functions.
235     19 def isfunction(obj):
236     20     """
237     21     Check whether something is a function.
238     22
239     23     We assume that anything which has a genuine ``__code__``
240     24     attribute (not using ``__getattr__`` overrides) is a function.
241     25     This is meant to support Cython functions.
242     26
243     27     EXAMPLES::
244     28
245     29         sage: from inspect import isfunction
246     30         sage: def f(): pass
247     31         sage: isfunction(f)
248
249/home/hrishabh/sage/local/lib/python2.7/site-packages/sage/repl/ipython_extension.pyc in wrapper(*args=(<sage.repl.interpreter.SageTerminalInteractiveShell object>,), **kwargs={})
250    547         ....:     if work:
251    548         ....:         return 'foo worked'
252    549         ....:     raise RuntimeError("foo didn't work")
253    550         sage: foo(False)
254    551         Traceback (most recent call last):
255    552         ...
256    553         RuntimeError: foo didn't work
257    554         sage: foo(True)
258    555         'foo worked'
259    556         sage: foo(False)
260    557         sage: foo(True)
261    558     """
262    559     @wraps(func)
263    560     def wrapper(*args, **kwargs):
264    561         if not wrapper.has_run:
265--> 562             result = func(*args, **kwargs)
266        result = undefined
267        global func = undefined
268        args = (<sage.repl.interpreter.SageTerminalInteractiveShell object at 0x7f90131914d0>,)
269        kwargs = {}
270    563             wrapper.has_run = True
271    564             return result
272    565     wrapper.has_run = False
273    566     return wrapper
274    567
275    568
276    569 @run_once
277    570 def load_ipython_extension(ip):
278    571     """
279    572     Load the extension in IPython.
280    573     """
281    574     # this modifies ip
282    575     SageCustomizations(shell=ip)
283
284/home/hrishabh/sage/local/lib/python2.7/site-packages/sage/repl/ipython_extension.pyc in load_ipython_extension(ip=<sage.repl.interpreter.SageTerminalInteractiveShell object>)
285    560     def wrapper(*args, **kwargs):
286    561         if not wrapper.has_run:
287    562             result = func(*args, **kwargs)
288    563             wrapper.has_run = True
289    564             return result
290    565     wrapper.has_run = False
291    566     return wrapper
292    567
293    568
294    569 @run_once
295    570 def load_ipython_extension(ip):
296    571     """
297    572     Load the extension in IPython.
298    573     """
299    574     # this modifies ip
300--> 575     SageCustomizations(shell=ip)
301        global SageCustomizations = <class 'sage.repl.ipython_extension.SageCustomizations'>
302        global shell = undefined
303        ip = <sage.repl.interpreter.SageTerminalInteractiveShell object at 0x7f90131914d0>
304
305/home/hrishabh/sage/local/lib/python2.7/site-packages/sage/repl/ipython_extension.pyc in __init__(self=<sage.repl.ipython_extension.SageCustomizations object>, shell=<sage.repl.interpreter.SageTerminalInteractiveShell object>)
306    418     def __init__(self, shell=None):
307    419         """
308    420         Initialize the Sage plugin.
309    421         """
310    422         self.shell = shell
311    423
312    424         self.auto_magics = SageMagics(shell)
313    425         self.shell.register_magics(self.auto_magics)
314    426
315    427         import sage.misc.edit_module as edit_module
316    428         self.shell.set_hook('editor', edit_module.edit_devel)
317    429
318    430         self.init_inspector()
319    431         self.init_line_transforms()
320    432
321--> 433         import sage.all # until sage's import hell is fixed
322        sage.all = undefined
323    434
324    435         self.shell.verbose_quit = True
325    436         self.set_quit_hook()
326    437
327    438         self.register_interface_magics()
328    439
329    440         if SAGE_IMPORTALL == 'yes':
330    441             self.init_environment()
331    442
332    443     def register_interface_magics(self):
333    444         """
334    445         Register magics for each of the Sage interfaces
335    446         """
336    447         from sage.repl.interface_magic import InterfaceMagic
337    448         InterfaceMagic.register_all(self.shell)
338
339/home/hrishabh/sage/local/lib/python2.7/site-packages/sage/all.py in <module>()
340     87 from sage.misc.sh import sh
341     88
342     89 from sage.libs.all       import *
343     90 from sage.data_structures.all import *
344     91 from sage.doctest.all    import *
345     92
346     93 from sage.structure.all  import *
347     94 from sage.rings.all      import *
348     95 from sage.arith.all      import *
349     96 from sage.matrix.all     import *
350     97
351     98 from sage.symbolic.all   import *
352     99 from sage.modules.all    import *
353    100 from sage.monoids.all    import *
354    101 from sage.algebras.all   import *
355--> 102 from sage.modular.all    import *
356        global sage.modular.all = undefined
357    103 from sage.sat.all        import *
358    104 from sage.schemes.all    import *
359    105 from sage.graphs.all     import *
360    106 from sage.groups.all     import *
361    107 from sage.arith.power    import generic_power as power
362    108 from sage.databases.all  import *
363    109 from sage.categories.all import *
364    110 from sage.sets.all       import *
365    111 from sage.probability.all import *
366    112 from sage.interfaces.all import *
367    113
368    114 from sage.functions.all  import *
369    115 from sage.calculus.all   import *
370    116
371    117 lazy_import('sage.tests', 'all', as_='tests', deprecation=27337)
372
373/home/hrishabh/sage/local/lib/python2.7/site-packages/sage/modular/all.py in <module>()
374     39
375     40 lazy_import("sage.modular.buzzard", 'buzzard_tpslopes', deprecation=27066)
376     41
377     42 from .etaproducts import (EtaGroup, EtaProduct, EtaGroupElement,
378     43                           AllCusps, CuspFamily)
379     44 lazy_import("sage.modular.etaproducts", ['num_cusps_of_width', 'qexp_eta',
380     45                                          'eta_poly_relations'],
381     46             deprecation=26196)
382     47
383     48 from .overconvergent.all import *
384     49
385     50 from .local_comp.all import *
386     51
387     52 from .cusps_nf import NFCusp, NFCusps, Gamma0_NFCusps
388     53
389---> 54 from .btquotients.all import *
390        global btquotients.all = undefined
391     55
392     56 from .pollack_stevens.all import *
393     57
394     58 del absolute_import
395
396/home/hrishabh/sage/local/lib/python2.7/site-packages/sage/modular/btquotients/all.py in <module>()
397      1 from __future__ import absolute_import
398----> 2 from .btquotient import BruhatTitsQuotient
399        global btquotient = undefined
400        global BruhatTitsQuotient = undefined
401      3 #from pautomorphicform import pAdicAutomorphicForms
402      4 #from pautomorphicform import BruhatTitsHarmonicCocycles
403
404/home/hrishabh/sage/local/lib/python2.7/site-packages/sage/modular/btquotients/btquotient.py in <module>()
405     43 from sage.matrix.constructor import Matrix
406     44 from sage.matrix.matrix_space import MatrixSpace
407     45 from sage.structure.sage_object import SageObject
408     46 from sage.rings.all import ZZ, Zmod, QQ
409     47 from sage.misc.latex import latex
410     48 from sage.rings.padics.precision_error import PrecisionError
411     49 import collections
412     50 from sage.misc.misc_c import prod
413     51 from sage.structure.unique_representation import UniqueRepresentation
414     52 from sage.misc.cachefunc import cached_method
415     53 from sage.arith.all import gcd, xgcd, kronecker_symbol, fundamental_discriminant
416     54 from sage.rings.padics.all import Qp, Zp
417     55 from sage.rings.finite_rings.finite_field_constructor import GF
418     56 from sage.algebras.quatalg.all import QuaternionAlgebra
419     57 from sage.quadratic_forms.all import QuadraticForm
420---> 58 from sage.graphs.all import Graph
421        global sage.graphs.all = undefined
422        global Graph = undefined
423     59 from sage.libs.all import pari
424     60 from sage.interfaces.all import magma
425     61 from copy import copy
426     62 from sage.plot.colors import rainbow
427     63 from sage.rings.number_field.all import NumberField
428     64 from sage.modular.arithgroup.all import Gamma0
429     65 from sage.misc.lazy_attribute import lazy_attribute
430     66 from sage.modular.dirichlet import DirichletGroup
431     67 from sage.modular.arithgroup.congroup_gammaH import GammaH_constructor
432     68 from sage.misc.misc import verbose
433     69
434     70
435     71 class DoubleCosetReduction(SageObject):
436     72     r"""
437     73     Edges in the Bruhat-Tits tree are represented by cosets of
438
439/home/hrishabh/sage/local/lib/python2.7/site-packages/sage/graphs/all.py in <module>()
440      1 from __future__ import absolute_import
441      2
442      3 from sage.misc.lazy_import import lazy_import
443      4
444      5 lazy_import("sage.graphs.graph_generators", "graphs")
445      6 lazy_import("sage.graphs.digraph_generators", "digraphs")
446      7 lazy_import("sage.graphs.hypergraph_generators", "hypergraphs")
447----> 8 from .graph_database import GraphDatabase, GenericGraphQuery, GraphQuery
448        global graph_database = undefined
449        global GraphDatabase = undefined
450        global GenericGraphQuery = undefined
451        global GraphQuery = undefined
452      9 from .graph import Graph
453     10 from .digraph import DiGraph
454     11 from .bipartite_graph import BipartiteGraph
455     12 import sage.graphs.weakly_chordal
456     13 import sage.graphs.lovasz_theta
457     14 import sage.graphs.partial_cube
458     15 from . import graph_list as graphs_list
459     16 lazy_import("sage.graphs", "graph_coloring")
460     17 lazy_import("sage.graphs.cliquer", ['all_max_clique', 'max_clique',
461     18                                     'clique_number'],
462     19             deprecation=26200)
463     20 from .graph_database import graph_db_info
464     21 lazy_import("sage.graphs.graph_editor", "graph_editor")
465     22
466     23 from sage.graphs.isgci import graph_classes
467     24
468     25 """
469     26 TESTS:
470     27
471     28 Test that sagenb.misc.support is not imported (see :trac:`22941`)::
472     29
473     30     sage: import sage.graphs.graph_editor
474     31     sage: 'sagenb.misc.support' in sys.modules
475
476/home/hrishabh/sage/local/lib/python2.7/site-packages/sage/graphs/graph_database.py in <module>()
477     33 REFERENCES:
478     34
479     35 - Data provided by Jason Grout (Brigham Young University). [Online]
480     36   Available: http://artsci.drake.edu/grout/graphs/
481     37 """
482     38
483     39 ################################################################################
484     40 #           Copyright (C) 2007 Emily A. Kirkman
485     41 #
486     42 #
487     43 # Distributed  under  the  terms  of  the  GNU  General  Public  License (GPL)
488     44 #                         http://www.gnu.org/licenses/
489     45 ################################################################################
490     46 from __future__ import print_function, absolute_import
491     47
492---> 48 from . import graph
493        global graph = undefined
494     49 import os
495     50 import re
496     51 from sage.rings.integer import Integer
497     52 from sage.databases.sql_db import SQLDatabase, SQLQuery
498     53 from sage.env import GRAPHS_DATA_DIR
499     54 from sage.graphs.graph import Graph
500     55 dblocation = os.path.join(GRAPHS_DATA_DIR,'graphs.db')
501     56
502     57
503     58 def degseq_to_data(degree_sequence):
504     59     """
505     60     Convert a degree sequence list to a sorted (max-min) integer data type.
506     61
507     62     The input degree sequence list (of Integers) is converted to a sorted
508     63     (max-min) integer data type, as used for faster access in the underlying
509
510/home/hrishabh/sage/local/lib/python2.7/site-packages/sage/graphs/graph.py in <module>()
511    406 import six
512    407 from six.moves import range
513    408
514    409 from copy import copy
515    410 from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
516    411 from sage.misc.superseded import deprecation
517    412 from sage.rings.integer import Integer
518    413 from sage.rings.integer_ring import ZZ
519    414 import sage.graphs.generic_graph_pyx as generic_graph_pyx
520    415 from sage.graphs.generic_graph import GenericGraph
521    416 from sage.graphs.digraph import DiGraph
522    417 from sage.graphs.independent_sets import IndependentSets
523    418 from sage.misc.rest_index_of_methods import doc_index, gen_thematic_rest_table_index
524    419
525    420
526--> 421 class Graph(GenericGraph):
527        global Graph = undefined
528        global GenericGraph = None
529    422     r"""
530    423     Undirected graph.
531    424
532    425     A graph is a set of vertices connected by edges. See the
533    426     :wikipedia:`Graph_(mathematics)` for more information. For a collection of
534    427     pre-defined graphs, see the :mod:`~sage.graphs.graph_generators` module.
535    428
536    429     A :class:`Graph` object has many methods whose list can be obtained by
537    430     typing ``g.<tab>`` (i.e. hit the 'tab' key) or by reading the documentation
538    431     of :mod:`~sage.graphs.graph`, :mod:`~sage.graphs.generic_graph`, and
539    432     :mod:`~sage.graphs.digraph`.
540    433
541    434     INPUT:
542    435
543    436     By default, a :class:`Graph` object is simple (i.e. no *loops* nor *multiple
544
545/home/hrishabh/sage/local/lib/python2.7/site-packages/sage/graphs/graph.py in Graph()
546   8179                 p.solve(log=verbose)
547   8180                 return True
548   8181             except MIPSolverException:
549   8182                 return False
550   8183         else:
551   8184             raise ValueError('algorithm must be set to "Edmonds", "LP_matching" or "LP"')
552   8185
553   8186     # Aliases to functions defined in other modules
554   8187     from sage.graphs.weakly_chordal import is_long_hole_free, is_long_antihole_free, is_weakly_chordal
555   8188     from sage.graphs.asteroidal_triples import is_asteroidal_triple_free
556   8189     from sage.graphs.chrompoly import chromatic_polynomial
557   8190     from sage.graphs.graph_decompositions.rankwidth import rank_decomposition
558   8191     from sage.graphs.graph_decompositions.vertex_separation import pathwidth
559   8192     from sage.graphs.matchpoly import matching_polynomial
560   8193     from sage.graphs.cliquer import all_max_clique as cliques_maximum
561-> 8194     from sage.graphs.spanning_tree import random_spanning_tree
562        global sage.graphs.spanning_tree = undefined
563        global random_spanning_tree = undefined
564   8195     from sage.graphs.graph_decompositions.graph_products import is_cartesian_product
565   8196     from sage.graphs.distances_all_pairs import is_distance_regular
566   8197     from sage.graphs.base.static_dense_graph import is_strongly_regular
567   8198     from sage.graphs.line_graph import is_line_graph
568   8199     from sage.graphs.tutte_polynomial import tutte_polynomial
569   8200     from sage.graphs.lovasz_theta import lovasz_theta
570   8201     from sage.graphs.partial_cube import is_partial_cube
571   8202     from sage.graphs.orientations import strong_orientations_iterator, random_orientation
572   8203     from sage.graphs.connectivity import bridges, cleave, spqr_tree
573   8204
574   8205
575   8206 _additional_categories = {
576   8207     "is_long_hole_free"         : "Graph properties",
577   8208     "is_long_antihole_free"     : "Graph properties",
578   8209     "is_weakly_chordal"         : "Graph properties",
579
580/home/hrishabh/sage/local/lib/python2.7/site-packages/sage/graphs/spanning_tree.pyx in init sage.graphs.spanning_tree (build/cythonized/sage/graphs/spanning_tree.c:13928)()
581     53 #       Copyright (c) 2009 Mike Hansen <mhansen@gmail.com>
582     54 #       Copyright (c) 2010 Gregory McWhirter <gmcwhirt@uci.edu>
583     55 #       Copyright (c) 2010 Minh Van Nguyen <nguyenminh2@gmail.com>
584     56 #
585     57 # This program is free software: you can redistribute it and/or modify
586     58 # it under the terms of the GNU General Public License as published by
587     59 # the Free Software Foundation, either version 2 of the License, or
588     60 # (at your option) any later version.
589     61 #                  https://www.gnu.org/licenses/
590     62 # ****************************************************************************
591     63 from __future__ import absolute_import
592     64
593     65 cimport cython
594     66
595     67 from sage.sets.disjoint_set cimport DisjointSet_of_hashables
596---> 68 from sage.graphs.graph import Graph
597        global sage.graphs.graph = undefined
598        global Graph = undefined
599     69 cpdef kruskal(G, wfunction=None, bint check=False):
600     70     r"""
601     71     Minimum spanning tree using Kruskal's algorithm.
602     72
603     73     This function assumes that we can only compute minimum spanning trees for
604     74     undirected graphs. Such graphs can be weighted or unweighted, and they can
605     75     have multiple edges (since we are computing the minimum spanning tree, only
606     76     the minimum weight among all `(u,v)`-edges is considered, for each pair
607     77     of vertices `u`, `v`).
608     78
609     79     INPUT:
610     80
611     81     - ``G`` -- an undirected graph.
612     82
613     83     - ``weight_function`` (function) - a function that inputs an edge ``e``
614
615ImportError: cannot import name Graph
616
617***************************************************************************
618
619History of session input:
620*** Last line of input (may not be in above history):