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

Problem with 1.7.5 on Travis CI ("No module named roman") #5022

Closed
randombit opened this issue May 28, 2018 · 4 comments
Closed

Problem with 1.7.5 on Travis CI ("No module named roman") #5022

randombit opened this issue May 28, 2018 · 4 comments
Milestone

Comments

@randombit
Copy link

Running Sphinx v 1.7.5 on Travis I am seeing this error:

"Could not import extension sphinx.builders.latex (exception: No module named roman)"

Ubuntu 14.04 ships with a very old version of Sphinx (it has problems parsing the C++ declarations in my docs) so my CI script installs a new version of Sphinx via pip.

        sudo apt-get -qq update
        sudo apt-get install doxygen python-docutils
        sudo apt-get remove python-requests python-openssl
        sudo pip install requests pyopenssl
        sudo pip install sphinx

The removal/reinstall of requests and python-openssl is to workaround the bug described in
https://stackoverflow.com/questions/32779919/no-module-named-for-requests

We are not actually trying to build a PDF during CI, but it looks like the missing module causes sphinx-build to exit with a non-zero error code which causes the whole build to fail.

Something I do not understand about this error is that the Ubuntu python-roman package is already installed (it is a dependency of python-docutils).

Error logs / results

https://travis-ci.org/randombit/botan/jobs/384926972

In the build logs the pip/apt-get operations are run from the subscript ./src/scripts/ci/setup_travis.sh at line 474

Expected results

Version 1.7.4 and earlier work fine. I only investigated this after my build suddenly broke. After I set pip to install ==1.7.4 my build worked again https://travis-ci.org/randombit/botan/builds/384949254

Reproducible project / your project

Environment info

  • OS: Ubuntu 14.04 (Travis CI)
  • Python version: 2.7.5
  • Sphinx version: 1.7.5

Let me know if there is any additional info I can provide, and thanks for this great tool.

@tk0miya
Copy link
Member

tk0miya commented May 29, 2018

OMG... It seems python-docutils package on Debian/Ubuntu is modified by package maintainers.
It does not provide docutils.utils.roman package...

Docutils installed by pip (original):

root@7c121596759e:/# python
Python 2.7.6 (default, Nov 23 2017, 15:49:48)
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import docutils
>>> docutils
<module 'docutils' from '/usr/local/lib/python2.7/dist-packages/docutils/__init__.pyc'>
>>> import docutils.utils.roman
>>> docutils.utils.roman
<module 'docutils.utils.roman' from '/usr/local/lib/python2.7/dist-packages/docutils/utils/roman.pyc'>
>>>

Docutils installed by apt:

root@7c121596759e:/# python
Python 2.7.6 (default, Nov 23 2017, 15:49:48)
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import docutils
>>> docutils
<module 'docutils' from '/usr/lib/python2.7/dist-packages/docutils/__init__.pyc'>
>>> import docutils.utils.roman
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named roman
>>>

I suppose roman.py is redistribution of roman package. So it might have been removed by package maintainer on packaging.

As a workaround, please install it by pip.

@tk0miya tk0miya added this to the 1.7.6 milestone May 29, 2018
@randombit
Copy link
Author

Confirmed, uninstalling the Ubuntu python-roman package and installing roman via pip resolves the issue. Thank you! Should I close this issue?

@tk0miya
Copy link
Member

tk0miya commented May 31, 2018

Thank you for confirmation. Please keep as is.
This behavior is not good. So I'll work for it later.

tk0miya added a commit to tk0miya/sphinx that referenced this issue May 31, 2018
tk0miya added a commit to tk0miya/sphinx that referenced this issue Jun 7, 2018
tk0miya added a commit that referenced this issue Jun 7, 2018
Fix #5022: latex: crashed with docutils package provided by Debian/Ubuntu
@tk0miya
Copy link
Member

tk0miya commented Jun 7, 2018

Fixed by #5024 .
Thank you for reporting.

@tk0miya tk0miya closed this as completed Jun 7, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants