trustin / sphinx-gradle-plugin

Sphinx site generation plugin for Gradle
https://trustin.github.io/sphinx-gradle-plugin/
Apache License 2.0
18 stars 7 forks source link

Failure when run inside a docker container #2

Closed StFS closed 6 years ago

StFS commented 7 years ago

We're running the sphinx-gradle-plugin inside a docker container and we're getting the following error:

:documentation:generate
:documentation:sphinx
Running Sphinx v1.4.6
loading pickled environment... not yet created
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 68 source files that are out of date
updating environment: 68 added, 0 changed, 0 removed
reading sources... [  1%] Command

Exception occurred:
  File "/home/builder/.gradle/caches/modules-2/files-2.1/org.python/jython-standalone/2.7.0/cdfb38bc6f8343bcf1d6accc2e1147e8e7b63b75/jython-standalone-2.7.0.jar/Lib/os.py", line 172, in makedirs
    mkdir(name, mode)
OSError: [Errno 20000] Unknown error: 20000: u'/home/builder/gor/documentation/_build/.doctrees'
The full traceback has been saved in /tmp/sphinx-err-XpKG0P.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!
:documentation:sphinx FAILED

I realize that the problem is with jython (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=752357 - see last message in that thread, that is, I'm not getting this error if I use os.chmod but I do get this exception if I call os.mkdir multiple times on the same directory). However, I'm just hoping that you guys might be able to think of some workaround for this in the context of sphinx-gradle-plugin.

I'm attaching the full log file with the error stack trace. Any help would be much appreciated.

sphinx-err-XpKG0P.log.txt

jochenhebbrecht commented 6 years ago

Hi,

We're facing the same issue. Also interested in a fix for this (although, like you said, I think jython will be the component which needs to do the effort).

Jochen

trustin commented 6 years ago

Sorry, I didn't realize this issue was reported. Somehow I was not watching this project. Let me try to find a fix/workaround.

StFS commented 6 years ago

@trustin good to hear that you noticed it now. We just revisited this issue yesterday so this is a bit of a pleasant coincidence. We would really appreciate a fix for this, otherwise we're going to have to move away from jython and complicate our build scripts by calling python with a custom virtualenv etc.

trustin commented 6 years ago

@StFS I've just released sphinx-gradle-plugin 1.0.4 which contains various dependency updates, including Jython. Could you try it to see if the problem is solved?

jochenhebbrecht commented 6 years ago

Thanks @trustin ! I just tried again and it's solved!

trustin commented 6 years ago

Awesome! On the other hand, I may release another version which changes the build process and packaging. Please consider upgrading again once it's out and letting me know if there's any regression. :-)

jochenhebbrecht commented 6 years ago

Ok, fine! I'll keep an eye on it.

trustin commented 6 years ago

Just released sphinx-gradle-plugin 1.0.5 and sphinx-maven-plugin 1.6.1. :-)

jochenhebbrecht commented 6 years ago

Thanks @trustin. Just to be clear: the actual fix for the sphinx-maven-plugin is already in 1.6.0, right? Because in that version, you upgraded the Jython library?

trustin commented 6 years ago

@jochenhebbrecht Yes. That's correct.