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.

Maximum recursion depth exceeded while calling a Python object

See original GitHub issue

Some of our users are reporting recursion error when building python packages after upgrading to setuptools-34.0.2. Any tips on how we can figure out what is happening here?

https://bugs.gentoo.org/show_bug.cgi?id=607164

  File "/var/tmp/portage/dev-python/setuptools-34.0.2-r1/work/setuptools-34.0.2-python2_7/setuptools/dist.py", line 386, in finalize_options
    ep.require(installer=self.fetch_build_egg)
  File "/var/tmp/portage/dev-python/setuptools-34.0.2-r1/work/setuptools-34.0.2-python2_7/pkg_resources/__init__.py", line 2318, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
  File "/var/tmp/portage/dev-python/setuptools-34.0.2-r1/work/setuptools-34.0.2-python2_7/pkg_resources/__init__.py", line 851, in resolve
    dist = best[req.key] = env.best_match(req, ws, installer)
  File "/var/tmp/portage/dev-python/setuptools-34.0.2-r1/work/setuptools-34.0.2-python2_7/pkg_resources/__init__.py", line 1123, in best_match
    return self.obtain(req, installer)
  File "/var/tmp/portage/dev-python/setuptools-34.0.2-r1/work/setuptools-34.0.2-python2_7/pkg_resources/__init__.py", line 1135, in obtain
    return installer(requirement)
  File "/var/tmp/portage/dev-python/setuptools-34.0.2-r1/work/setuptools-34.0.2-python2_7/setuptools/dist.py", line 417, in fetch_build_egg
    dist = self.__class__({'script_args': ['easy_install']})
  File "/var/tmp/portage/dev-python/setuptools-34.0.2-r1/work/setuptools-34.0.2-python2_7/setuptools/dist.py", line 320, in __init__
    _Distribution.__init__(self, attrs)
  File "/usr/lib64/python2.7/distutils/dist.py", line 287, in __init__
    self.finalize_options()
  File "/var/tmp/portage/dev-python/setuptools-34.0.2-r1/work/setuptools-34.0.2-python2_7/setuptools/dist.py", line 386, in finalize_options
    ep.require(installer=self.fetch_build_egg)
  File "/var/tmp/portage/dev-python/setuptools-34.0.2-r1/work/setuptools-34.0.2-python2_7/pkg_resources/__init__.py", line 2318, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
  File "/var/tmp/portage/dev-python/setuptools-34.0.2-r1/work/setuptools-34.0.2-python2_7/pkg_resources/__init__.py", line 844, in resolve
    env = Environment(self.entries)
  File "/var/tmp/portage/dev-python/setuptools-34.0.2-r1/work/setuptools-34.0.2-python2_7/pkg_resources/__init__.py", line 1051, in __init__
    self.scan(search_path)
  File "/var/tmp/portage/dev-python/setuptools-34.0.2-r1/work/setuptools-34.0.2-python2_7/pkg_resources/__init__.py", line 1080, in scan
    for dist in find_distributions(item):
  File "/var/tmp/portage/dev-python/setuptools-34.0.2-r1/work/setuptools-34.0.2-python2_7/pkg_resources/__init__.py", line 2010, in find_on_path
    path_item_entries = _by_version_descending(os.listdir(path_item))
  File "/var/tmp/portage/dev-python/setuptools-34.0.2-r1/work/setuptools-34.0.2-python2_7/pkg_resources/__init__.py", line 1994, in _by_version_descending
    return sorted(names, key=_by_version, reverse=True)
  File "/var/tmp/portage/dev-python/setuptools-34.0.2-r1/work/setuptools-34.0.2-python2_7/pkg_resources/__init__.py", line 1992, in _by_version
    return [packaging.version.parse(part) for part in parts]
  File "/usr/lib64/python2.7/site-packages/packaging/version.py", line 31, in parse
    return Version(version)
RuntimeError: maximum recursion depth exceeded while calling a Python object

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jaracocommented, May 31, 2017

Setuptools 36 restores support for self install by vendoring dependencies again.

1reaction
FelikZcommented, Apr 14, 2017

pip install -u setuptools pip - helped me

Read more comments on GitHub >

github_iconTop Results From Across the Web

maximum recursion depth exceeded while calling a Python ...
This means that each call to your recursive function will create a function call stack and because there is a limit of stack...
Read more >
Python maximum recursion depth exceeded in comparison
The “maximum recursion depth exceeded in comparison” error is raised when you try to execute a function that exceeds Python's built in recursion ......
Read more >
Python: Maximum Recursion Depth Exceeded [How to Fix It]
The maximum recursion depth in Python is 1000. To check it, call sys.getrecursionlimit() function. To change it, call sys.setrecursionlimit().
Read more >
Python RecursionError: Maximum Recursion Depth Exceeded ...
A Python RecursionError exception is raised when the execution of your program exceeds the recursion limit of the Python interpreter.
Read more >
maximum recursion depth exceeded while calling a Python ...
When the interpreter detects that the maximum depth for recursion has reached, it throws the recursionerror ...
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