question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

error: infinite recursion encountered, 'dateutil', 'python-dateutil'

See original GitHub issue

I have ./default.nix

let
  mach-nix = import (builtins.fetchGit {
    url = "https://github.com/DavHau/mach-nix/";
    ref = "refs/tags/3.0.0";
  }) {};
in
mach-nix.buildPythonPackage {
  src = "https://github.com/twintproject/twint/archive/v2.1.4.tar.gz";
}

I build with nix-build and getting this error:

❯ nix-build
unpacking 'https://github.com/nixos/nixpkgs/tarball/41c0f49681009ceb57a65b7cd7d4e6d605df712c'...
unpacking 'https://github.com/DavHau/pypi-deps-db/tarball/d6ca2a67a76f98f168d5c6414f1fbc311b464bdf'...
warning: dumping very large path (> 256 MiB); this may run out of memory
unpacking 'https://github.com/twintproject/twint/archive/v2.1.4.tar.gz'...
copying path '/nix/store/xxl9nhy71gnsg2fcqrdwj108fhgi9n6z-adv_cmds-osx-10.5.8-locale' from 'https://cache.nixos.org'...
copying path '/nix/store/9vkb3rbsj4cy92qj25yxmbak01g5iaxq-unzip-6.0' from 'https://cache.nixos.org'...
.
..
...

pandas - 0.25.3 - sdist
├── numpy - 1.17.5 - sdist
├── numpy - 1.17.5 - sdist
├── python-dateutil - 2.7.1 - sdist
│   ├── setuptools-scm - 4.1.2 - nixpkgs
│   └── six - 1.15.0 - sdist
└── pytz - 2020.1 - sdist

aiohttp-socks - 0.3.9 - nixpkgs

schedule - 0.6.0 - sdist

geopy - 2.0.0 - sdist
└── geographiclib - 1.50 - sdist

fake-useragent - 0.1.11 - nixpkgs

Multiple nixkgs attributes found for python-dateutil-2.7.1: ['dateutil', 'python-dateutil']
Picking 'dateutil' as base attribute name.
unpacking 'https://github.com/DavHau/nix-pypi-fetcher/tarball/22aa55de07c3c2fc0afc8ec274082ccb66ed9393'...
error: infinite recursion encountered, at /nix/store/4in2fprhpxnbrrwh0pfn961n7x915fps-nixpkgs/pkgs/top-level/python-packages.nix:5688:3
(use '--show-trace' to show detailed location information)

The error points to this part of /nix/store/4in2fprhpxnbrrwh0pfn961n7x915fps-nixpkgs/pkgs/top-level/python-packages.nix:5688:

.
..
...
  python-daemon = callPackage ../development/python-modules/python-daemon { };

❯ python-dateutil = callPackage ../development/python-modules/dateutil { };
  # Alias that we should deprecate
  dateutil = self.python-dateutil;

  python-dbusmock = callPackage ../development/python-modules/python-dbusmock { };
...
..
.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:20 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
DavHaucommented, Oct 27, 2020

Hey, I just noticed that the wheel selection for macos is broken, therefore the resolver didn’t pick any wheel releases, falling back to sdist which sometimes can be troublesome. I fixed the issue and added some unit tests for it. This one should work now:

let
  mach-nix = import (builtins.fetchGit {
    url = "https://github.com/DavHau/mach-nix";
    ref = "refs/heads/master";
    rev = "3acbfc2ebd0b826cd046925493714a5e2f146d73";
  }) {};
in
mach-nix.buildPythonPackage {
 src = "https://github.com/twintproject/twint/tarball/ae5e7e1189be1c";
 overridesPre = [(
    pySelf: pySuper: {
      dateutil = null;
    }
 )];
}
1reaction
DavHaucommented, Oct 26, 2020

In the meantime you can remove the duplicated dateutil from nixpkgs via an override:

let
  mach-nix = import (builtins.fetchGit {
    url = "https://github.com/DavHau/mach-nix";
    ref = "master";
    rev = "ffd51659df279b809d44c71855c57dbb58a105ea";
  }) {};
in
mach-nix.buildPythonPackage {
 src = "https://github.com/twintproject/twint/tarball/ae5e7e1189be1c";
 overridesPre = [(
    pySelf: pySuper: {
      dateutil = null;
    }
 )];
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Infinite recursion encountered when building a python package
I think the root of the problem you and I are seeing is that python-aliases.nix in the official nixpkgs added the alias from...
Read more >
Python error importing dateutil - Stack Overflow
There are probably multiple versions of python-dateutil installed. Try to issue pip uninstall python-dateutil several times until the prompt ...
Read more >
Changelog — Python 3.11.1 documentation
bpo-30570: Fixed a crash in issubclass() from infinite recursion when searching ... mostly replacing outdated references to dateutil.tz .
Read more >
AttributeError: module 'matplotlib' has no attribute 'scatter'
I'm trying to make cluster of latitude and longitude. the code gave an error in plt.scatter(data['Lng'],data['Lat']) line. the error is:
Read more >
Changelog — great_expectations documentation
Fix data docs rendering issues: documentation rendering failure from unrecognized profiled column type (#679; thanks @dinedal)). PY2 failure on encountering ...
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