-
Notifications
You must be signed in to change notification settings - Fork 29
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
An error occurred while retrieving available packages #201
Comments
Thanks for reporting the issue @johnne The error originated from gator/mamba_gator/envmanager.py Line 662 in 0279570
The easy fix would be to ignore invalid version number. Then a follow up could be to handle invalid version. Would you be willing to open a PR? The first step would be to wrap the version parsing with a try-except: try:
version = parse(entry.get("version", ""))
except InvalidVersion:
name = entry.get("name")
version = entry.get("version")
self.log.warning(f"Unable to parse version '{version}' of '{name}'")
continue With |
Thank you! I edited the installation I have and that seems to get rid of the error message. I will open a PR |
Thanks for trying the fix. Would you mind posting here the log about which package failed to be parsed? |
This is what I get when running |
Thanks a lot @johnne So as expected most packages failing are none-python ones as they do not require to conform to Python version syntax. And in recent version of Basically we should internalize the old See: https://github.com/pypa/packaging/blob/20.9/packaging/version.py The code was try:
return Version(version)
except InvalidVersion:
return LegacyVersion(version) So the follow-up PR would be to change the raw_version = entry.get("version", "")
try:
version = parse(raw_version)
except InvalidVersion:
name = entry.get("name")
msg = f"Falling back to 'LegacyVersion' for version '{raw_version}' of '{name}'"
self.log.debug(msg)
version = LegacyVersion(raw_version) and copying the definition of Would you be willing to do the follow-up PR?
|
Description
I'm getting an error message saying "An error occurred while retrieving available packages" as well as "I know you want to give up, but wait a bit longer.." which never ends. In my terminal I get
I'm able to run both
conda search --json
andmamba search --json
which I saw could be a problem in another issue (#127)Reproduce
jupyter lab
Expected behavior
No error messages
Context
Command Line Output
Browser Output
The text was updated successfully, but these errors were encountered: