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

build_sphinx missing urlparse module #3539

Closed
3 tasks done
diggzhang opened this issue Sep 27, 2017 · 3 comments
Closed
3 tasks done

build_sphinx missing urlparse module #3539

diggzhang opened this issue Sep 27, 2017 · 3 comments

Comments

@diggzhang
Copy link
Contributor

Make sure these boxes are checked before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if any
  • I have reproduced the issue with at least the latest released version of superset
  • I have checked the issue tracker for the same issue and I haven't found one similar

Superset version

"version": "0.19.1"

Expected results

When users wanna build the docs follow CONTRIBUTING.md, execute command python setup.py build_sphinx hope to build the docs success.

Actual results

$ python setup.py build_sphinx
-==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
VERSION: 0.19.1
GIT SHA: b'255ea699770a98b8406a516d44fc7eac47d45ab6\n'
-==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
running build_sphinx
creating /path/to/incubator-superset/docs/_build
creating /path/to/incubator-superset/docs/_build/doctrees
creating /path/to/incubator-superset/docs/_build/html
Running Sphinx v1.6.3

Exception occurred:
  File "/path/to/superset-dev/lib/python3.6/site-packages/sphinxcontrib/youtube/youtube.py", line 3, in <module>
    import urlparse
ModuleNotFoundError: No module named 'urlparse'
The full traceback has been saved in /tmp/sphinx-err-wvwlr926.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!

The reason is:

The urlparse module is renamed to urllib.parse in Python 3. The 2to3 tool will automatically adapt imports when converting your sources to Python 3.

Accces to sphinxcontrib-youtub on pypi the latest package is 0.12, but the latest code version is 0.2.0 and fixed the url parse module. pip can't install the right package now.

Steps to reproduce

  1. create one clean virtulenv
  2. clone superset code from github
  3. run command to prepare sphinx packages pip install -r dev-reqs-for-docs.txt
  4. run command to build docs python setup.py build_sphinx
@mistercrunch
Copy link
Member

Notice: this issue has been closed because it has been inactive for 207 days. Feel free to comment and request for this issue to be reopened.

@leehwmj-junta
Copy link

This problem occurs because your python version is 3.x.
The urlparse module is renamed to urllib.parse in Python 3.

Lower the python version, or replace import urlparse with import urllib.parse.

@arthurkhlghatyan
Copy link

Hi,
just had the same issue on my end and seems suggested solution from @leehwmj-junta doesn't work because error appears to be from package dependencies.

Thanks.

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

No branches or pull requests

4 participants