Package: python-sagetex
Version: 3.0+ds-6
Severity: serious
User: helm...@debian.org
Usertags: python-import

After installing python-sagetex importing the module sagetex
into a python interpreter fails with the following error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/sagetex.py", line 31, in <module>
    from sage.misc.latex import latex
  File "/usr/lib/python2.7/dist-packages/sage/misc/latex.py", line 67, in 
<module>
    from sage.misc.cachefunc import cached_function, cached_method
  File "sage/misc/function_mangling.pxd", line 1, in init sage.misc.cachefunc
  File "sage/misc/function_mangling.pyx", line 41, in init 
sage.misc.function_mangling
  File "/usr/lib/python2.7/dist-packages/sage/misc/sageinspect.py", line 129, 
in <module>
    from sage.env import SAGE_SRC
  File "/usr/lib/python2.7/dist-packages/sage/env.py", line 123, in <module>
    _add_variable_or_fallback('SAGE_ETC',        opj('$SAGE_LOCAL', 'etc'))
  File "/usr/lib/python2.7/dist-packages/sage/env.py", line 103, in 
_add_variable_or_fallback
    value = sep.join(components)
TypeError: sequence item 0: expected string, NoneType found
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/usr/lib/python2.7/dist-packages/sage/misc/temporary_file.py", line 51, 
in delete_tmpfiles
    from sage.misc.misc import SAGE_TMP
  File "/usr/lib/python2.7/dist-packages/sage/misc/misc.py", line 53, in 
<module>
    from sage.env import DOT_SAGE, HOSTNAME
  File "/usr/lib/python2.7/dist-packages/sage/env.py", line 123, in <module>
    _add_variable_or_fallback('SAGE_ETC',        opj('$SAGE_LOCAL', 'etc'))
  File "/usr/lib/python2.7/dist-packages/sage/env.py", line 103, in 
_add_variable_or_fallback
    value = sep.join(components)
TypeError: sequence item 0: expected string, NoneType found
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/usr/lib/python2.7/dist-packages/sage/misc/temporary_file.py", line 51, 
in delete_tmpfiles
    from sage.misc.misc import SAGE_TMP
  File "/usr/lib/python2.7/dist-packages/sage/misc/misc.py", line 53, in 
<module>
    from sage.env import DOT_SAGE, HOSTNAME
  File "/usr/lib/python2.7/dist-packages/sage/env.py", line 123, in <module>
    _add_variable_or_fallback('SAGE_ETC',        opj('$SAGE_LOCAL', 'etc'))
  File "/usr/lib/python2.7/dist-packages/sage/env.py", line 103, in 
_add_variable_or_fallback
    value = sep.join(components)
TypeError: sequence item 0: expected string, NoneType found

The vast majority of import failures is attributed to missing dependencies.
Often times that manifests as an ImportError or ModuleNotFoundError.
Typically, dependencies should be inserted by dh-python via ${python:Depends}
or ${python3:Depends}. Thus a missing dependency can be caused by incomplete
install_requires in setup.py. Sometimes a missing dependency of a dependency
is the cause, in such cases this bug should be reassigned.

Helmut

Reply via email to