refs/tags/3.4.0 - resolvelib # tinycss2 : raise Exception(f"couldn't parse: '{line}'") Exception: couldn't parse: 'tinycss2 (>=1.1.0<1.2) ; extra == 'css''

See original GitHub issue

“refs/tags/3.4.0”

warning: unknown setting 'experimental-features'
warning: unknown setting 'experimental-features'
building '/nix/store/lfw2pk77pz06lbcliv1zyfc60risp8bd-pypi-deps-db.drv'...
building '/nix/store/z1sdv415iv9kc9valkr0xbi56nkz5nr7-mach_nix_file.drv'...
Multiple nixpkgs attributes found for pip-21.1.3: ['bootstrapped-pip', 'pip']
Picking 'pip' as base attribute name.
Traceback (most recent call last):
  File "/nix/store/6dr20pzvf1k8y6804dw8q31nj4d7aamz-h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/generate.py", line 110, in <module>
    main()
  File "/nix/store/6dr20pzvf1k8y6804dw8q31nj4d7aamz-h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/generate.py", line 103, in main
    do()
  File "/nix/store/6dr20pzvf1k8y6804dw8q31nj4d7aamz-h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/generate.py", line 66, in do
    expr = generator.generate(reqs)
  File "/nix/store/6dr20pzvf1k8y6804dw8q31nj4d7aamz-h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/generators/overides_generator.py", line 36, in generate
    pkgs = self.resolver.resolve(reqs)
  File "/nix/store/6dr20pzvf1k8y6804dw8q31nj4d7aamz-h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/resolver/resolvelib_resolver.py", line 55, in resolve
    result = resolvelib.Resolver(Provider(self.nixpkgs, self.deps_provider), reporter).resolve(reqs, max_rounds=1000)
  File "/nix/store/0pbdnjk3mky2fd3qif5cspy37fzkmkll-python3-3.9.12-env/lib/python3.9/site-packages/resolvelib/resolvers.py", line 413, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/nix/store/0pbdnjk3mky2fd3qif5cspy37fzkmkll-python3-3.9.12-env/lib/python3.9/site-packages/resolvelib/resolvers.py", line 310, in resolve
    failure_causes = self._attempt_to_pin_criterion(name, criterion)
  File "/nix/store/0pbdnjk3mky2fd3qif5cspy37fzkmkll-python3-3.9.12-env/lib/python3.9/site-packages/resolvelib/resolvers.py", line 223, in _attempt_to_pin_criterion
    criteria = self._get_criteria_to_update(candidate)
  File "/nix/store/0pbdnjk3mky2fd3qif5cspy37fzkmkll-python3-3.9.12-env/lib/python3.9/site-packages/resolvelib/resolvers.py", line 214, in _get_criteria_to_update
    for r in self._p.get_dependencies(candidate):
  File "/nix/store/6dr20pzvf1k8y6804dw8q31nj4d7aamz-h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/resolver/resolvelib_resolver.py", line 39, in get_dependencies
    install_requires, setup_requires = self.provider.get_pkg_reqs(candidate)
  File "/nix/store/6dr20pzvf1k8y6804dw8q31nj4d7aamz-h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/data/providers.py", line 195, in get_pkg_reqs
    return provider.get_pkg_reqs(c)
  File "/nix/store/6dr20pzvf1k8y6804dw8q31nj4d7aamz-h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/data/providers.py", line 353, in get_pkg_reqs
    install_reqs = list(filter_reqs_by_eval_marker(parse_reqs(reqs_raw), self.context_wheel, c.selected_extras))
  File "/nix/store/6dr20pzvf1k8y6804dw8q31nj4d7aamz-h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/cache.py", line 14, in cache_wrapper
    result = tuple(result)
  File "/nix/store/6dr20pzvf1k8y6804dw8q31nj4d7aamz-h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/requirements.py", line 77, in parse_reqs
    yield Requirement(*parse_reqs_line(line))
  File "/nix/store/6dr20pzvf1k8y6804dw8q31nj4d7aamz-h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/requirements.py", line 143, in parse_reqs_line
    raise Exception(f"couldn't parse: '{line}'")
Exception: couldn't parse: 'tinycss2 (>=1.1.0<1.2) ; extra == 'css''
builder for '/nix/store/z1sdv415iv9kc9valkr0xbi56nkz5nr7-mach_nix_file.drv' failed with exit code 1
error: build of '/nix/store/z1sdv415iv9kc9valkr0xbi56nkz5nr7-mach_nix_file.drv' failed
(use '--show-trace' to show detailed location information)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
TyberiusPrimecommented, May 6, 2022

Is there a way to fix this locally?

I suppose adding ‘bleach==4.1.0’ to your requirements might (might!) be a workaround.

1reaction
otakucommented, May 2, 2022

I found the package: bleach

Reproduction:

{
  description = "python";

  inputs = {
    pypi-deps-db = {
      url = "github:DavHau/pypi-deps-db/cfa5e9c011254570d9296247064c8d65f5a0e93d";
      inputs.mach-nix.follows = "mach-nix";
    };

    mach-nix = {
      url = "github:DavHau/mach-nix/3.4.0";
      inputs.pypi-deps-db.follows = "pypi-deps-db";
    };
  };

  outputs = { self, nixpkgs, mach-nix, ... }@inputs:
    let
      l = nixpkgs.lib // builtins;
      supportedSystems = [ "x86_64-linux" "aarch64-darwin" ];
      forAllSystems = f: l.genAttrs supportedSystems
        (system: f system (import nixpkgs {inherit system;}));
    in
    {
      defaultPackage = forAllSystems (system: pkgs: mach-nix.lib."${system}".mkPython {
        requirements = "bleach==5.0.0";
      });
    };
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Kozea/tinycss2: A tiny CSS parser - GitHub
tinycss2 is a low-level CSS parser and generator written in Python: it can parse strings, return objects representing tokens and blocks, and generate...
Read more >
tinycss2 - PyPI
tinycss2 is a low-level CSS parser and generator written in Python: it can parse strings, return objects representing tokens and blocks, and generate...
Read more >
how to catch a non-fatal error in python - Stack Overflow
The documentation indicates that the error is not raised, but returned, i.e. try/except won't work here. Instead, you have to check the ...
Read more >
Going Further — tinycss2 1.2.1 documentation - CourtBouillon
tinycss2 has been created as a low-level parser, as it doesn't parse all of CSS: it doesn't know about the syntax of any...
Read more >
How to Fix werkzeug.exceptions.BadRequestKeyError / 400 ...
The werkzeug. exceptions.BadRequestKeyError or 400 Bad Request error is a very common error that you will encounter in Flask when working ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found