You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`traceback.format_exception()` returns a list of strings containing already newlines.
Sphinx just logs the repr of that list, which makes it impossible to read tracebacks easily.
the real and helpful exception trace would be:
```
Traceback (most recent call last):
File "/usr/local/lib/python3.11/dist-packages/sphinx/ext/autodoc/importer.py", line 175, in import_module
module = importlib.import_module(modname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/root/module.py", line 58, in <module>
...
AttributeError: 'NoneType' object has no attribute 'lower'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/dist-packages/sphinx/ext/autodoc/importer.py", line 269, in import_object
module = import_module(modname, try_reload=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/sphinx/ext/autodoc/importer.py", line 187, in import_module
raise ImportError(exc, traceback.format_exc()) from exc
ImportError: (AttributeError("'NoneType' object has no attribute 'lower'"),
```
0 commit comments