Skip to content
This repository has been archived by the owner on Nov 7, 2023. It is now read-only.

Keep getting Invalid version: 'unstable-2022-01-20' #30

Open
CodeWithOz opened this issue Oct 20, 2023 · 0 comments
Open

Keep getting Invalid version: 'unstable-2022-01-20' #30

CodeWithOz opened this issue Oct 20, 2023 · 0 comments

Comments

@CodeWithOz
Copy link

I keep getting this error packaging.version.InvalidVersion: Invalid version: 'unstable-2022-01-20' when trying to start up my nix environment. Below is a more complete stack trace of the error:

Stack trace
building '/nix/store/911dvip5w647kdq0pxiwsahlgg01wqa7-mach_nix_file.drv'...
Traceback (most recent call last):
  File "/nix/store/bl1hg4jv6m0xqaqzlfifs4ykqqd0g9jv-596icq9xnd5b4qipna0rv458y4vgrq5r-mach-nix-src/mach_nix/generate.py", line 110, in <module>
    main()
  File "/nix/store/bl1hg4jv6m0xqaqzlfifs4ykqqd0g9jv-596icq9xnd5b4qipna0rv458y4vgrq5r-mach-nix-src/mach_nix/generate.py", line 103, in main
    do()
  File "/nix/store/bl1hg4jv6m0xqaqzlfifs4ykqqd0g9jv-596icq9xnd5b4qipna0rv458y4vgrq5r-mach-nix-src/mach_nix/generate.py", line 46, in do
    nixpkgs = NixpkgsIndex(nixpkgs_json)
  File "/nix/store/bl1hg4jv6m0xqaqzlfifs4ykqqd0g9jv-596icq9xnd5b4qipna0rv458y4vgrq5r-mach-nix-src/mach_nix/data/nixpkgs.py", line 32, in __init__
    version = parse_ver(nix_data["version"])
  File "/nix/store/ixxrk9r5yvdmqfcp4axk9nb6gzjaby5y-python3-3.9.16-env/lib/python3.9/site-packages/packaging/version.py", line 52, in parse
    return Version(version)
  File "/nix/store/ixxrk9r5yvdmqfcp4axk9nb6gzjaby5y-python3-3.9.16-env/lib/python3.9/site-packages/packaging/version.py", line 197, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
packaging.version.InvalidVersion: Invalid version: 'unstable-2022-01-20'
error: builder for '/nix/store/911dvip5w647kdq0pxiwsahlgg01wqa7-mach_nix_file.drv' failed with exit code 1;
       last 10 log lines:
       >     do()
       >   File "/nix/store/bl1hg4jv6m0xqaqzlfifs4ykqqd0g9jv-596icq9xnd5b4qipna0rv458y4vgrq5r-mach-nix-src/mach_nix/generate.py", line 46, in do
       >     nixpkgs = NixpkgsIndex(nixpkgs_json)
       >   File "/nix/store/bl1hg4jv6m0xqaqzlfifs4ykqqd0g9jv-596icq9xnd5b4qipna0rv458y4vgrq5r-mach-nix-src/mach_nix/data/nixpkgs.py", line 32, in __init__
       >     version = parse_ver(nix_data["version"])
       >   File "/nix/store/ixxrk9r5yvdmqfcp4axk9nb6gzjaby5y-python3-3.9.16-env/lib/python3.9/site-packages/packaging/version.py", line 52, in parse
       >     return Version(version)
       >   File "/nix/store/ixxrk9r5yvdmqfcp4axk9nb6gzjaby5y-python3-3.9.16-env/lib/python3.9/site-packages/packaging/version.py", line 197, in __init__
       >     raise InvalidVersion(f"Invalid version: '{version}'")
       > packaging.version.InvalidVersion: Invalid version: 'unstable-2022-01-20'
       For full logs, run 'nix log /nix/store/911dvip5w647kdq0pxiwsahlgg01wqa7-mach_nix_file.drv'.

This is my sources.json file:

sources.json
{
    "gitignore": {
        "branch": "master",
        "description": "Nix functions for filtering local git sources",
        "homepage": "",
        "owner": "hercules-ci",
        "repo": "gitignore.nix",
        "rev": "bff2832ec341cf30acb3a4d3e2e7f1f7b590116a",
        "sha256": "0va0janxvmilm67nbl81gdbpppal4aprxzb25gp9pqvf76ahxsci",
        "type": "tarball",
        "url": "https://github.com/hercules-ci/gitignore.nix/archive/bff2832ec341cf30acb3a4d3e2e7f1f7b590116a.tar.gz",
        "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
    },
    "mach-nix": {
        "branch": "3.5.0",
        "description": "Create highly reproducible python environments",
        "homepage": "",
        "owner": "DavHau",
        "repo": "mach-nix",
        "rev": "7e14360bde07dcae32e5e24f366c83272f52923f",
        "sha256": "185qf6d5xg8qk1hb1y0b5gggr71vdz8v9d5ga4zg7dmcb1aypxcg",
        "type": "tarball",
        "url": "https://github.com/DavHau/mach-nix/archive/7e14360bde07dcae32e5e24f366c83272f52923f.tar.gz",
        "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
    },
    "niv": {
        "branch": "master",
        "description": "Easy dependency management for Nix projects",
        "homepage": "https://github.com/nmattia/niv",
        "owner": "nmattia",
        "repo": "niv",
        "rev": "82e5cd1ad3c387863f0545d7591512e76ab0fc41",
        "sha256": "090l219mzc0gi33i3psgph6s2pwsc8qy4lyrqjdj4qzkvmaj65a7",
        "type": "tarball",
        "url": "https://github.com/nmattia/niv/archive/82e5cd1ad3c387863f0545d7591512e76ab0fc41.tar.gz",
        "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
    },
    "nixpkgs": {
        "branch": "nixos-23.05",
        "description": "Nix Packages collection",
        "homepage": "",
        "owner": "NixOS",
        "repo": "nixpkgs",
        "rev": "4ecab3273592f27479a583fb6d975d4aba3486fe",
        "sha256": "10wn0l08j9lgqcw8177nh2ljrnxdrpri7bp0g7nvrsn9rkawvlbf",
        "type": "tarball",
        "url": "https://github.com/NixOS/nixpkgs/archive/4ecab3273592f27479a583fb6d975d4aba3486fe.tar.gz",
        "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
    },
    "pypi-deps-db": {
        "branch": "master",
        "description": "Probably the most complete python dependency database",
        "homepage": "",
        "owner": "DavHau",
        "repo": "pypi-deps-db",
        "rev": "570d3543eb53dad7d1eb0bb88ecbcf450bc69847",
        "sha256": "1xhk812r208ppz325wxhzksqjalka6n1sdqgag5x8ilfj506pgr6",
        "type": "tarball",
        "url": "https://github.com/DavHau/pypi-deps-db/archive/570d3543eb53dad7d1eb0bb88ecbcf450bc69847.tar.gz",
        "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
    }
}

This began to happen after I updated the revs and sha sums of both nixpkgs and pypi-deps-db. The previous revs were e64df9c5c8ffa0c9a82006e410ad630e32e6063d and c6a6acdbc1320cbb36d0fee0be00a0c5baf76ad9, respectively. Any idea what's going on or suggestions I could try?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant