SPAAM-community/AMDirT

packaging.version.InvalidVersion: Invalid version: 'latest'

Closed this issue · 4 comments

Hi, I've encountered an error while trying to run AMDirT. When I attempt to run AMDirT on my Mac M3 Pro (MacOS 14.1) regardless of which command I used I got the same error message:

commands:
AMDirT convert --curl --eager ./samples_to_download.tsv ancientsinglegenome-hostassociated
AMDirT --help

error message:

2024-07-25 10:34:02.488

Warning: to view this Streamlit app on a browser, run it with the following
command:

streamlit run /opt/anaconda3/bin/AMDirT [ARGUMENTS]

Traceback (most recent call last):
File "/opt/anaconda3/bin/AMDirT", line 5, in
from AMDirT.cli import cli
File "/opt/anaconda3/lib/python3.11/site-packages/AMDirT/cli.py", line 319, in
type=click.Choice(get_amdir_tags()),
^^^^^^^^^^^^^^^^
File "/opt/anaconda3/lib/python3.11/site-packages/streamlit/runtime/caching/cache_utils.py", line 165, in wrapper
return cached_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/anaconda3/lib/python3.11/site-packages/streamlit/runtime/caching/cache_utils.py", line 194, in call
return self._get_or_create_cached_value(args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/anaconda3/lib/python3.11/site-packages/streamlit/runtime/caching/cache_utils.py", line 221, in _get_or_create_cached_value
return self._handle_cache_miss(cache, value_key, func_args, func_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/anaconda3/lib/python3.11/site-packages/streamlit/runtime/caching/cache_utils.py", line 277, in _handle_cache_miss
computed_value = self._info.func(*func_args, **func_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/anaconda3/lib/python3.11/site-packages/AMDirT/core/init.py", line 63, in get_amdir_tags
return [
^
File "/opt/anaconda3/lib/python3.11/site-packages/AMDirT/core/init.py", line 66, in
if version.parse(tag["name"]) >= version.parse("v22.09")
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/anaconda3/lib/python3.11/site-packages/packaging/version.py", line 56, in parse
return Version(version)
^^^^^^^^^^^^^^^^
File "/opt/anaconda3/lib/python3.11/site-packages/packaging/version.py", line 202, in init
raise InvalidVersion(f"Invalid version: '{version}'")
packaging.version.InvalidVersion: Invalid version: 'latest'

I tried uninstalling and reinstalling with pip but this didn't change the error message, so I then attempted to install AMDirT on a linux machine with conda and I got the following error:

conda create -n eager_prep -c bioconda amdirt
Channels:

  • bioconda
  • defaults
    Platform: linux-64
    Collecting package metadata (repodata.json): done
    Solving environment: failed

LibMambaUnsatisfiableError: Encountered problems while solving:

  • nothing provides streamlit-aggrid needed by amdirt-1.4.3-pyhdfd78af_0

Could not solve for environment specs
The following packages are incompatible
└─ amdirt is not installable because there are no viable options
├─ amdirt [1.4.3|1.4.4|...|1.6.1] would require
│ └─ streamlit-aggrid, which does not exist (perhaps a missing channel);
└─ amdirt [1.6.1|1.6.2] would require
└─ streamlit-aggrid <=0.3.5 , which does not exist (perhaps a missing channel).

It is also worth noting that previously AMDirT was running correctly on my MacBook, any help you could provided to resolve this quickly would be greatly appreciated.

The error in the first message was fixed yesterday with v1.6.2. bioconda was updated last night I believe.

I'm not sure why you are getting the error on the Linux machine because it shouldn't have been able to build if the dependciew are missing. But I can try and see if I can replicate tomorrow on my own machine.

The only thing I can think of is your conda cache packages are not clean or something... You could try running conda clean , removing all old AMDirT environments, and try again from scratch

Just updated the version of AMDirT on my mac and that is now working normally, as for the linux machine its still experiencing the strange error with the conda install. AMDirT hasn't been installed on that machine before so I don't really have any ideas what might be causing it? regardless it is likely a problem on my side anyway, thanks for the help.

Just updated the version of AMDirT on my mac and that is now working normally, as for the linux machine its still experiencing the strange error with the conda install. AMDirT hasn't been installed on that machine before so I don't really have any ideas what might be causing it? regardless it is likely a problem on my side anyway, thanks for the help.

Good to know the Mac version works!

For Linux it could be a dependency that was installed within the base environment accidentally which then gets copied into the AmDirT environment on creation, if there is no pin saying thatbAMDIrT can't use that dependency (even though there apparently is).

Did you try the conda clean command?