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.

`ModuleNotFoundError: No module named 'six'` on build

See original GitHub issue

Details

I tried building my docs for my project, yet this fails with a ModuleNotFoundError

My conf file Build url

Expected Result

A successful build

Actual Result

The following error:

Running Sphinx v3.3.1

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/dblstats/envs/latest/lib/python3.7/site-packages/sphinx/config.py", line 319, in eval_config_file
    execfile_(filename, namespace)
  File "/home/docs/checkouts/readthedocs.org/user_builds/dblstats/envs/latest/lib/python3.7/site-packages/sphinx/util/pycompat.py", line 89, in execfile_
    exec(code, _globals)
  File "/home/docs/checkouts/readthedocs.org/user_builds/dblstats/checkouts/latest/docs/source/conf.py", line 82, in <module>
    from six import string_types
ModuleNotFoundError: No module named 'six'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/dblstats/envs/latest/lib/python3.7/site-packages/sphinx/cmd/build.py", line 279, in build_main
    args.tags, args.verbosity, args.jobs, args.keep_going)
  File "/home/docs/checkouts/readthedocs.org/user_builds/dblstats/envs/latest/lib/python3.7/site-packages/sphinx/application.py", line 219, in __init__
    self.config = Config.read(self.confdir, confoverrides or {}, self.tags)
  File "/home/docs/checkouts/readthedocs.org/user_builds/dblstats/envs/latest/lib/python3.7/site-packages/sphinx/config.py", line 174, in read
    namespace = eval_config_file(filename, tags)
  File "/home/docs/checkouts/readthedocs.org/user_builds/dblstats/envs/latest/lib/python3.7/site-packages/sphinx/config.py", line 332, in eval_config_file
    raise ConfigError(msg % traceback.format_exc()) from exc
sphinx.errors.ConfigError: There is a programmable error in your configuration file:

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/dblstats/envs/latest/lib/python3.7/site-packages/sphinx/config.py", line 319, in eval_config_file
    execfile_(filename, namespace)
  File "/home/docs/checkouts/readthedocs.org/user_builds/dblstats/envs/latest/lib/python3.7/site-packages/sphinx/util/pycompat.py", line 89, in execfile_
    exec(code, _globals)
  File "/home/docs/checkouts/readthedocs.org/user_builds/dblstats/checkouts/latest/docs/source/conf.py", line 82, in <module>
    from six import string_types
ModuleNotFoundError: No module named 'six'


Configuration error:
There is a programmable error in your configuration file:

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/dblstats/envs/latest/lib/python3.7/site-packages/sphinx/config.py", line 319, in eval_config_file
    execfile_(filename, namespace)
  File "/home/docs/checkouts/readthedocs.org/user_builds/dblstats/envs/latest/lib/python3.7/site-packages/sphinx/util/pycompat.py", line 89, in execfile_
    exec(code, _globals)
  File "/home/docs/checkouts/readthedocs.org/user_builds/dblstats/checkouts/latest/docs/source/conf.py", line 82, in <module>
    from six import string_types
ModuleNotFoundError: No module named 'six'

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:10
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
arunhpatilcommented, Nov 28, 2020

Hi, I had the same issue. At first, I followed the recommendation https://github.com/readthedocs/readthedocs.org/issues/7704#issuecomment-735030431 but it was not complete without specifying requirements in the settings.

Solved

Here is how I solved it, first follow https://github.com/readthedocs/readthedocs.org/issues/7704#issuecomment-735030431, and then click Admin, Advanced Settings and then under the section Requirements file add the file path you created docs/requirements.txt. Click on Save and build Version. I hope this works out for you.

Cheers.

1reaction
humitoscommented, Nov 30, 2020

Hi all! I deployed a quick fix for now that does not install latest sphinx version by default (3.3.1) but the previous one that Read the Docs pinned for years (1.8.x).

We enabled this feature (USE_LATEST_SPHINX for new projects) to start testing the builder with this new version of Sphinx, but we didn’t realize that six was not a dependency anymore. So, for now, I disabled this feature and your builds will use sphinx==1.8.x by default. If you want to use a different version of Sphinx, please specify it in your requirements.txt file as usual.

We will have a fix for this soon and we will re-enable USE_LATEST_SPHINX version for new projects.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ImportError: No module named six - python - Stack Overflow
With apt-get install python3-six I get "newest version" but with ipython I get ModuleNotFoundError: No module named 'six' . In /usr/lib/python3/dist-packages/ , ...
Read more >
ModuleNotFoundError: No module named 'six' in Python
The Python "ModuleNotFoundError: No module named 'six'" occurs when we forget to install the six module before importing it or install it in ......
Read more >
Python - ModuleNotFoundError: No module named 'six' [Solved]
The ModuleNotFoundError: No module named 'six' error occurs one of the following reasons: Using the six module without installing it. Installed ...
Read more >
How to Solve modulenotfounderror no module named six
modulenotfounderror no module named is one of the most famous errors in Python. This type of error appears when the program can't import...
Read more >
ImportError: No module named six - SyntaxFix
I'm trying to build OpenERP project, done with dependencies. It's giving this error now. Traceback (most recent call last): File "openerp-client.py", ...
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