-
-
Notifications
You must be signed in to change notification settings - Fork 531
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
OSError 'Not a directory' when creating env on Jython 2.7.0 #326
Comments
I just hit this bug or something very similar while trying to use Jython 2.7.0 under TravisCI/Tox https://travis-ci.org/peterjc/biopython/jobs/165876306
|
Line 112 in 04bbe3b
it seems this no lo longer accurate :/ - its not clear to me what python version fixes it |
My earlier comment used tox-2.3.1 virtualenv-15.0.3 on TravisCI, https://travis-ci.org/peterjc/biopython/jobs/165876306 Trying to debug this by pre-creating the directory made no difference, now using tox-2.4.0 virtualenv-15.0.3 on TravisCI, e.g. https://travis-ci.org/peterjc/biopython/jobs/167100293 or https://travis-ci.org/peterjc/biopython/jobs/167103643 |
@peterjc i believe a extra except clause is needed for jython, would you like to add it? (see the code path i linked) |
I'd want to be able to reproduce this locally first - debugging things on TravisCI is pretty hard, although you can ask them for temporary access to a VM for this kind of thing. |
Persists with Jython 2.7, tox-2.6.0, virtualenv-15.1.0, py-1.4.32 as tested under TravisCI, e.g. https://travis-ci.org/peterjc/biopython/jobs/201911071 I've looked at the code here and don't understand what an extra except clause would do under Jython. If
|
There is an implementation difference between CPython and Jython. On CPython, only ENOENT is raised when the directory does not exist (see posixmodule.c for instance). On Jython, ENOTDIR is raised when the directory does not exist, and EACCESS is raised when there is no read access. This patch also catches ENOTDIR, but not EACCESS. The code flow ensures that the logdir is created when it does not exist. Ref tox-dev#326 .
There is an implementation difference between CPython and Jython. On CPython, only ENOENT is raised when the directory does not exist (see posixmodule.c for instance). On Jython, ENOTDIR is raised when the directory does not exist, and EACCESS is raised when there is no read access. This patch also catches ENOTDIR, but not EACCESS. The code flow ensures that the logdir is created when it does not exist. Ref tox-dev#326 .
@RonnyPfannschmidt I have prepared #512 with the fix you proposed. It looks good in my local tests, and Travis is not complaining either. |
fixed in #512 |
Lovely. I don't know how/when you update the changelog, but this should be of interest to any Jython + tox users. |
@peterjc I think we can cut a new release soonish. |
Also mention this fixed tox-dev#326 (via pull request tox-dev#512)
Confirming fixed in tox 2.8.0rc1, which I installed using https://travis-ci.org/peterjc/biopython/jobs/267995703 (The test run timed out, but nevertheless, tox installed and ran under Jython for me) |
Thanks for testing and for your patience! |
Hi,
I cannot use tox with Jython. I'm using the latest tox 2.3.1, and Jython 2.7.0 on OS X 10.10.5 with Java 1.7.0_79.
I tried to clone this repository and run the test suite using jython. Below is the output from test_venv.py::test_create that shows my issue.
It seems that the subprocess call to
virtualenv
command that creates the new tox environment is failing because alistdir
call insession._initlogpath
raisesOSError
because theenvlogdir
(where the output from the subprocess is to be logged) does not exist. If I browse the.tox
directory in Finder, I can see there is no{envdir}/log
subfolder.Thank you for your support.
Cosimo
The text was updated successfully, but these errors were encountered: