readthedocs.org: Build failing: installing wrong package as flask

Details

Expected Result

A successful build of the docs.

Actual Result

The build for my project’s docs is failing. And, its…weird

When the build get’s to the python setup.py install --force stage, it fails to find the correct flask package:

Installed /home/docs/checkouts/readthedocs.org/user_builds/flask-praetorian/envs/latest/lib/python3.5/site-packages/PyJWT-1.6.1-py3.5.egg
Searching for flask
Downloading https://files.pythonhosted.org/packages/f8/41/24cddeaaf02e599bb4be168afa01a852b3577f87104d0b2012f69d895539/flask-buzz-0.1.4.tar.gz#sha256=d58e07b1975aaf8b6a1380bb2e0480c5452d0d26ba4d0a6775ff1536873a98d2
Best match: flask buzz-0.1.4
Processing flask-buzz-0.1.4.tar.gz
Writing /tmp/easy_install-5rlaieu5/flask-buzz-0.1.4/setup.cfg
Running flask-buzz-0.1.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-5rlaieu5/flask-buzz-0.1.4/egg-dist-tmp-6jxpcnhc
zip_safe flag not set; analyzing archive contents...
Removing /home/docs/checkouts/readthedocs.org/user_builds/flask-praetorian/envs/latest/lib/python3.5/site-packages/flask_buzz-0.1.4-py3.5.egg
Moving flask_buzz-0.1.4-py3.5.egg to /home/docs/checkouts/readthedocs.org/user_builds/flask-praetorian/envs/latest/lib/python3.5/site-packages
flask-buzz 0.1.4 is already the active version in easy-install.pth

Installed /home/docs/checkouts/readthedocs.org/user_builds/flask-praetorian/envs/latest/lib/python3.5/site-packages/flask_buzz-0.1.4-py3.5.egg
error: The 'flask' distribution was not found and is required by flask-praetorian, flask-buzz

I have no idea why this is happening. I’ve looked around the configuration of flask-buzz, and I don’t see any place where the name has a space that might confuse the python installer.

I really want to get this issue fixed because I just released my 0.4.0 version of my package, and it was a huge milestone. I really want to get the docs up and building so I can share with folks.

Thanks!

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (6 by maintainers)

Most upvoted comments

Can you try wiping the environment? You can do this on the versions section (edit button)

Hi I get the same error when I tried to build devartoria/flask (fork of pallets/flask for translation.) docs. It absolutely appears to be a matter of pallets-sphinx theme.

Running Sphinx v1.6.5
making output directory...
loading translations [ko]... done
loading pickled environment... not yet created

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/flask-kr/envs/kor_docs/local/lib/python2.7/site-packages/sphinx/cmdline.py", line 305, in main
    opts.warningiserror, opts.tags, opts.verbosity, opts.jobs)
  File "/home/docs/checkouts/readthedocs.org/user_builds/flask-kr/envs/kor_docs/local/lib/python2.7/site-packages/sphinx/application.py", line 234, in __init__
    self._init_builder()
  File "/home/docs/checkouts/readthedocs.org/user_builds/flask-kr/envs/kor_docs/local/lib/python2.7/site-packages/sphinx/application.py", line 311, in _init_builder
    self.builder.init()
  File "/home/docs/checkouts/readthedocs.org/user_builds/flask-kr/envs/kor_docs/local/lib/python2.7/site-packages/sphinx/builders/html.py", line 202, in init
    self.init_templates()
  File "/home/docs/checkouts/readthedocs.org/user_builds/flask-kr/envs/kor_docs/local/lib/python2.7/site-packages/sphinx/builders/html.py", line 245, in init_templates
    self.theme = theme_factory.create(themename)
  File "/home/docs/checkouts/readthedocs.org/user_builds/flask-kr/envs/kor_docs/local/lib/python2.7/site-packages/sphinx/theming.py", line 276, in create
    self.load_extra_theme(name)
  File "/home/docs/checkouts/readthedocs.org/user_builds/flask-kr/envs/kor_docs/local/lib/python2.7/site-packages/sphinx/theming.py", line 198, in load_extra_theme
    self.load_external_theme(name)
  File "/home/docs/checkouts/readthedocs.org/user_builds/flask-kr/envs/kor_docs/local/lib/python2.7/site-packages/sphinx/theming.py", line 226, in load_external_theme
    self.app.registry.load_extension(self.app, entry_point.module_name)
  File "/home/docs/checkouts/readthedocs.org/user_builds/flask-kr/envs/kor_docs/local/lib/python2.7/site-packages/sphinx/registry.py", line 207, in load_extension
    metadata = mod.setup(app)
  File "/home/docs/checkouts/readthedocs.org/user_builds/flask-kr/envs/kor_docs/local/lib/python2.7/site-packages/Pallets_Sphinx_Themes-1.0.1-py2.7.egg/pallets_sphinx_themes/__init__.py", line 30, in setup
    VersionManager(app)
  File "/home/docs/checkouts/readthedocs.org/user_builds/flask-kr/envs/kor_docs/local/lib/python2.7/site-packages/Pallets_Sphinx_Themes-1.0.1-py2.7.egg/pallets_sphinx_themes/versions.py", line 38, in __init__
    if self.current is None and version.slug == current_slug:
AttributeError: 'tuple' object has no attribute 'slug'

Exception occurred:
  File "/home/docs/checkouts/readthedocs.org/user_builds/flask-kr/envs/kor_docs/local/lib/python2.7/site-packages/Pallets_Sphinx_Themes-1.0.1-py2.7.egg/pallets_sphinx_themes/versions.py", line 38, in __init__
    if self.current is None and version.slug == current_slug:
AttributeError: 'tuple' object has no attribute 'slug'
The full traceback has been saved in /tmp/sphinx-err-rkRbUm.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!

I was able to work-around this issue by pinning my flask dependency. However, this is a less than desirable way of dealing with the issue. I’d still like to figure out why this is happening

I dug into it a bit more. It seems like the issue here is using the “flask” theme. This is a requirement for “approved flask extensions”. Talking with the lead dev on flask, it sounds like these requirements aren’t as strict as they once were. Transitioning to the ‘alabaster’ theme let the docs build.

Closing this. Thanks for help

Have you tried running python setup.py install in your local machine with a fresh virtualenv? It must fail because you have added flask with small charector. It seems like pypi is case sensitive so its not finding the package. I have tried changing the name locally and the installation seems to be successful.

So change the name to Flask will solve your problem.

Try with the name Flask (uppercase F), that’s the registered name on pypi https://pypi.org/project/Flask/