-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Builds failing with NamespacePath has no attribute sort #4808
Comments
If this is a problem with pip So, our docker images are as follow:
So, if this bug is fixed on that version of pip, you can solve this problem by adding this in your rtd confifguration file: build:
image: latest |
IMHO, I think that we should force to install the latest
So, if we are going to update the Docker versions more frequently, this won't have any effect. On the other hand, if we tend to make our Docker images stable and do not upgrade them very often (as we are doing now), it will always upgrade to the latest version which is the maintained one. In the meanwhile, we could add a dated Feature flag for this so all new project start installing the latest |
I was able to reproduce this issue by importing If you take a closer look: the first command from this build https://readthedocs.org/projects/jaracocollections/builds/7963873/ is BUT after all the |
It shouldn't fail because of this. We don't have any kind of check to run the command if the venv doesn't exist or to not run it if it does. Actually, I did a simple local test:
|
In fact, by upgrading
and it still fail with the same problem and in the log I can see that it's still using pip 9.0.3 which I don't know why yet. |
I’m following loosely. Let me just say, thanks so much for the in-depth investigation.
|
I think I found the problem. Pip does support reading configurations from a So, I'm not sure what we can do here, maybe the new deps requires a new version of pip? The dep are incompatible somehow? |
This is weird, I'm installing the latest version of pip before the virtualenv is created, the build pass. BUT, if I build it again, the build fails... Also I noticed that the first time the latest version of pip is only downloaded, in the second time, the old pip version is uninstalled :_ |
I think we are messing up this #4808 (comment) with the env variables |
So, I have som code that "fixes" this AND install the latest version of pip. For the pyproject problem we can change the cwd of the command to other than the project's root (probably I wasn't able to install the latest version of pip before the virtualenv creation, because the command will need to be run with sudo (we don't have sudo anyway...). We could use this option https://virtualenv.pypa.io/en/stable/userguide/#the-extra-search-dir-option or more easy, create the virtual env with the old pip version, but update the pip version after the virtualenv creation, that way we are able to install the core and user requirements using the latest pip. |
I'm a little lost here. Can you explain in simple words/steps where is the current issue/bug and what's your proposal to fix it? It seems there are more than one specific problem (considering the |
The problem here is that we create the virtualenv with the cwd on the project's root, when creating the virtualenv, pip is triggered, pip reads the (instead of |
My other solution is for installing the latest pip always, but that isn't part of the solution |
If the project has a If we change the CWD we will be fixing this particular problem for this particular repository but breaking the general rule that it's to read that file (as the pip's documentation says). Still, I don't understand why this fails. It seems an incompatibility with the On the other hand, if the problem is just that CWD path, we should be able to reproduce it outside RTD and I didn't find a way yet (I tried installing different versions of |
Yeah, but when installing the packages, not when creating the virtualenv
Only for the virtualenv creation, installation of packages are still running the cwd on the project's root |
@stsewd you are right! It seems that you have been trying to say that in many comments but I wasn't getting it :) OK, so I suppose that a good place to point the CWD when creating the venv is the |
Pointing to home sounds better, not sure how to do that (yet), I think we don't allow shell expansions, I'll see what I can do |
\o/ Thanks all! |
Details
Expected Result
Build should succeed without error.
Actual Result
Build is failing during the virtualenv creation.
This issue started this evening sometime after this commit (which succeeded).
The code for configuring RTD is derived from the same code as many other similar projects.
I suspected that something was cached incorrectly, as this error message is due to a known issue that was fixed with later versions of pip, so I deleted and recreated the project, but the docs build is still failing.
Can you suggest a way to work around the issue?
The text was updated successfully, but these errors were encountered: