Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not import extension readthedocs_ext.readthedocs #1926

Closed
ivoflipse opened this issue Jan 14, 2016 · 8 comments
Closed

Could not import extension readthedocs_ext.readthedocs #1926

ivoflipse opened this issue Jan 14, 2016 · 8 comments
Labels
Bug A bug
Milestone

Comments

@ivoflipse
Copy link

While building the docs for one of our projects on RTD.com we get the following error and this step:

python /home/docs/checkouts/readthedocs.org/user_builds/clinical-graphics-articulis3/conda/latest/bin/sphinx-build -T -b readthedocs -d _build/doctrees-readthedocs -D language=en . _build/html

Running Sphinx v1.3.3
making output directory...

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/clinical-graphics-articulis3/conda/latest/lib/python3.5/site-packages/Sphinx-1.3.3-py3.5.egg/sphinx/application.py", line 431, in setup_extension
    mod = __import__(extension, None, None, ['setup'])
ImportError: No module named 'readthedocs_ext'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/clinical-graphics-articulis3/conda/latest/lib/python3.5/site-packages/Sphinx-1.3.3-py3.5.egg/sphinx/cmdline.py", line 239, in main
    opts.warningiserror, opts.tags, opts.verbosity, opts.jobs)
  File "/home/docs/checkouts/readthedocs.org/user_builds/clinical-graphics-articulis3/conda/latest/lib/python3.5/site-packages/Sphinx-1.3.3-py3.5.egg/sphinx/application.py", line 144, in __init__
    self.setup_extension(extension)
  File "/home/docs/checkouts/readthedocs.org/user_builds/clinical-graphics-articulis3/conda/latest/lib/python3.5/site-packages/Sphinx-1.3.3-py3.5.egg/sphinx/application.py", line 435, in setup_extension
    err)
sphinx.errors.ExtensionError: Could not import extension readthedocs_ext.readthedocs (exception: No module named 'readthedocs_ext')

Extension error:
Could not import extension readthedocs_ext.readthedocs (exception: No module named 'readthedocs_ext')

Any idea what might be causing this issue?

@agjohnson
Copy link
Contributor

This might be another issue related to conda usage. Looks like our extension wasn't installed.

@agjohnson agjohnson added the Bug A bug label Jan 14, 2016
@agjohnson agjohnson added this to the Conda milestone Jan 14, 2016
@ericholscher
Copy link
Member

We should be pip installing the readthedocs extension, I'm not sure why it wouldn't be picked up in the conda environment. We just deployed some conda fixes yesterday that might fix this. Are you still seeing it?

@ivoflipse
Copy link
Author

Just did another build and still seeing it

@ericholscher
Copy link
Member

What is the readthedocs.yml and environment.yml file you're using?

On Fri, Jan 15, 2016 at 3:22 PM, Ivo Flipse notifications@github.com
wrote:

Just did another build and still seeing it


Reply to this email directly or view it on GitHub
#1926 (comment)
.

Eric Holscher
Maker of the internet residing in Portland, Oregon
http://ericholscher.com

@ivoflipse
Copy link
Author

The readthedocs.yml is:

conda:
    file: environment.yml

python:
   version: 3

python:
   setup_py_install: false

The environment.yml is:

channels:
  - clinicalgraphics
dependencies:
  - python >=3.5,<3.6
  - future >=0.15,<0.16
  - django >=1.9,<1.10
  - django-pyodbc-azure >=1.9,<1.10
  - djangorestframework >=3.3,<3.4
  - celery >=3.1,<3.2
  - redis >=2.10,<2.11
  - numpy >=1.10,<1.11
  - azure >=1.0,<1.1
  - azure-storage >=0.20.3,<0.21
  - jupyter >=1.0,<1.1
  - notebook >=4.0,<4.1
  - flake8 >=2.3,<2.4
  - flake8-future-import >=0.3.2,<0.4
  - pep8-naming >=0.3.3,<0.4
  - anaconda-client >=1.2.1,<1.3
  - pyyaml >=3.11,<3.12
  - jinja2 >=2.8,<2.9
  - invoke >=0.11.1,<0.12
  - six >=1.10,<1.11
  - pytest >=2.8.4,<2.9
  - mock >=1.3,<1.4
  - sphinx >=1.3.1,<1.4
  - numpydoc >=0.5,<0.6
  - recommonmark >=0.2,<0.3

@ericholscher
Copy link
Member

I believe this is overriding the Python key in the yaml file. Try using this:

conda:
    file: environment.yml

python:
   version: 3
   setup_py_install: false

The issue is likely that it's installing the pip dependencies into the Python 2 conda environment, then when the environment upgrades it to 3, it isn't found.

@Korijn
Copy link

Korijn commented Jan 19, 2016

We'll try this today. We weren't aware of this behaviour of YAML:

>>> yaml.load('python:\n- test')
{'python': ['test']}
>>> yaml.load('python:\n- test\npython:\n- test2')
{'python': ['test2']}
>>> yaml.load('python:\n- test\n- test2')
{'python': ['test', 'test2']}

@ivoflipse
Copy link
Author

It seems we're no longer getting this error, but now get this issue: #1901

Which seems an indication that indeed Python 3 is now chosen, as our readthedocs.yml file indicates. So I'm closing this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug
Projects
None yet
Development

No branches or pull requests

4 participants