question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

sphinx build fails with "cannot import name 'TYPE_CHECKING' "

See original GitHub issue

Details

Expected Result

build with success

Actual Result

error in the sphinx step with this error message:

 python /home/docs/checkouts/readthedocs.org/user_builds/bioconvert/conda/master/bin/sphinx-build -T -E -b readthedocs -d _build/doctrees-readthedocs -D language=en . _build/html
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/bioconvert/conda/master/bin/sphinx-build", line 11, in <module>
    load_entry_point('Sphinx==1.7.1', 'console_scripts', 'sphinx-build')()
  File "/home/docs/checkouts/readthedocs.org/user_builds/bioconvert/conda/master/lib/python3.5/site-packages/pkg_resources/__init__.py", line 587, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/docs/checkouts/readthedocs.org/user_builds/bioconvert/conda/master/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2800, in load_entry_point
    return ep.load()
  File "/home/docs/checkouts/readthedocs.org/user_builds/bioconvert/conda/master/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2431, in load
    return self.resolve()
  File "/home/docs/checkouts/readthedocs.org/user_builds/bioconvert/conda/master/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2437, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/docs/checkouts/readthedocs.org/user_builds/bioconvert/conda/master/lib/python3.5/site-packages/sphinx/cmd/build.py", line 13, in <module>
    from typing import TYPE_CHECKING
ImportError: cannot import name 'TYPE_CHECKING' 

I have looked around but could find much information.

Worked locally on a Linux box with Python 3.5 with sphinx 1.7.1 using make clean, make html. It used to work 3 weeks ago when it broke suddenly. We did not change the configuration file on our side.

I believe I currently have the same issue with another package called sequana also on RTD. thanks

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
cokelaercommented, Mar 19, 2018

it works. thanks. I’m closing this issue.

0reactions
cokelaercommented, Mar 19, 2018

I see. I will try updating my recipes and let you know the outcome. thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

sphinx build fails with "cannot import name 'TYPE_CHECKING' "
Worked locally on a Linux box with Python 3.5 with sphinx 1.7.1 using make clean, make html. It used to work 3 weeks...
Read more >
Common issues and solutions - mypy 0.991 documentation
These can result in some of the following errors when trying to run your code: ImportError from circular imports. NameError: name "X" is ......
Read more >
Sphinx doc struggling with import typing - python
WARNING: autodoc: failed to import module 'myname.mymodule'; the following exception was raised: cannot import name 'MyClass'.
Read more >
Configuration - Sphinx documentation
Builder" means the Builder class in the sphinx.builders module. Remember that document names use / as the path separator and don't contain the...
Read more >
Pylint features - Pylint 2.16.0-dev documentation
Disallowed name "%s" Used when the name matches bad-names or bad-names-rgxs- (unauthorized names). empty-docstring (C0112). Empty %s docstring Used when a ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found