ericmandel / pyds9

Python connection to SAOimage DS9 via XPA
76 stars 41 forks source link

recursion error in astropy_helpers on install #53

Closed murison closed 6 years ago

murison commented 6 years ago

On Redhat 6.9, I am getting a recursion error on install. I've tried both pip and git clone routes, same problem. Python 3.6.3 from Anaconda. Any idea what I should do? This seems to be relatively new (it's been a while since I've updated pyds9), and it's breaking a bunch of software that depends on pyds9. Error output below:

[18:24][murison@newthalia ~] pip install git+https://github.com/ericmandel/pyds9.git#egg=pyds9 Collecting pyds9 from git+https://github.com/ericmandel/pyds9.git#egg=pyds9 Cloning https://github.com/ericmandel/pyds9.git to /tmp/pip-build-ylvuxrpy/pyds9 Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "/tmp/pip-build-ylvuxrpy/pyds9/setup.py", line 61, in cmdclassd = register_commands(PACKAGENAME, VERSION, RELEASE) File "/tmp/pip-build-ylvuxrpy/pyds9/astropy_helpers/astropy_helpers/setup_helpers.py", line 140, in register_commands from .commands.build_sphinx import AstropyBuildSphinx, AstropyBuildDocs File "/tmp/pip-build-ylvuxrpy/pyds9/astropy_helpers/astropy_helpers/commands/build_sphinx.py", line 16, in from sphinx.setup_command import BuildDoc as SphinxBuildDoc File "/home/murison/lib/anaconda3/lib/python3.6/site-packages/sphinx/setup_command.py", line 23, in from sphinx.application import Sphinx File "/home/murison/lib/anaconda3/lib/python3.6/site-packages/sphinx/application.py", line 33, in from sphinx.environment import BuildEnvironment File "/home/murison/lib/anaconda3/lib/python3.6/site-packages/sphinx/environment/init.py", line 45, in from sphinx.util.websupport import is_commentable File "/home/murison/lib/anaconda3/lib/python3.6/site-packages/sphinx/util/websupport.py", line 11, in from sphinxcontrib.websupport.utils import is_commentable # NOQA File "/home/murison/lib/anaconda3/lib/python3.6/site-packages/sphinxcontrib/websupport/init.py", line 15, in from sphinxcontrib.websupport.core import WebSupport # NOQA File "/home/murison/lib/anaconda3/lib/python3.6/site-packages/sphinxcontrib/websupport/core.py", line 17, in from jinja2 import Environment, FileSystemLoader File "/home/murison/lib/anaconda3/lib/python3.6/site-packages/jinja2/init.py", line 33, in from jinja2.environment import Environment, Template File "/home/murison/lib/anaconda3/lib/python3.6/site-packages/jinja2/environment.py", line 15, in from jinja2 import nodes File "/home/murison/lib/anaconda3/lib/python3.6/site-packages/jinja2/nodes.py", line 19, in from jinja2.utils import Markup File "/home/murison/lib/anaconda3/lib/python3.6/site-packages/jinja2/utils.py", line 486, in MutableMapping.register(LRUCache) File "/home/murison/lib/anaconda3/lib/python3.6/abc.py", line 158, in register if issubclass(subclass, cls):

[...a very large amount of the same...]

  File "/home/murison/lib/anaconda3/lib/python3.6/typing.py", line 1153, in __subclasscheck__
    return super().__subclasscheck__(cls)
RecursionError: maximum recursion depth exceeded while calling a Python object

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-ylvuxrpy/pyds9/ [18:24][murison@newthalia ~]

montefra commented 6 years ago

@murison : I have already seen a maximum recursion error with different traceback. Later today I'll try it on my machine and updata the astropy_helpers version. I hope to have a solution by this evening. Thank you for the report.

murison commented 6 years ago

Is there a way to get my hands on an older version of pyds9?

montefra commented 6 years ago

Sorry for the delay, I ended up being more tired than expected. You can try to use one of the tagged versions or pip install.

montefra commented 6 years ago

@murison Some time ago a similar problem was reported on astropy-helpers

The solution is to stick to sphinx <= 1.5.6 or upgrade astropy-helpers to >= 2.0. Which version of pip do you have?

I'm about to do the latter.

ps: on my laptop with OpenSuse Tumbleweed I've tried to install pyds9 in a clean py36 virtual environment and the installation works. It does work also if I install before the latest sphinx.

murison commented 6 years ago

@montefra Many thanks for your help. I installed the previous tagged version, and that worked.

montefra commented 6 years ago

Great.

By the way: I have updated the astropy helpers to the latest version and travis doesn't have any problem with the installation. But I don't know if it solve your problem, since I wasn't able to reproduce it.

montefra commented 6 years ago

@murison : I have merged the branch that moves to astropy-helpers 2.0.1. Travis nor I cannot reproduce your problem.

If you have time, would you mind trying again the command that caused the error in the first place?

murison commented 6 years ago

@montefra Both the pip install and the download-the-source routes produce the same infinite recursion. Here is my setup:

[13:25][murison@hypatia ~] conda info Current conda install:

           platform : linux-64
      conda version : 4.3.29
   conda is private : False
  conda-env version : 4.3.29
conda-build version : not installed
     python version : 3.6.3.final.0
   requests version : 2.18.4
   root environment : /scr/bin/anaconda3  (writable)
default environment : /scr/bin/anaconda3
   envs directories : /scr/bin/anaconda3/envs
                      /home/murison/.conda/envs
      package cache : /scr/bin/anaconda3/pkgs
                      /home/murison/.conda/pkgs
       channel URLs : https://repo.continuum.io/pkgs/main/linux-64
                      https://repo.continuum.io/pkgs/main/noarch
                      https://repo.continuum.io/pkgs/free/linux-64
                      https://repo.continuum.io/pkgs/free/noarch
                      https://repo.continuum.io/pkgs/r/linux-64
                      https://repo.continuum.io/pkgs/r/noarch
                      https://repo.continuum.io/pkgs/pro/linux-64
                      https://repo.continuum.io/pkgs/pro/noarch
        config file : None
         netrc file : None
       offline mode : False
         user-agent : conda/4.3.29 requests/2.18.4 CPython/3.6.3 Linux/4.2.0-42-lowlatency debian/jessie/sid glibc/2.21    
            UID:GID : 1000:1000

[13:25][murison@hypatia ~]

Here is the infinite recursion:

[13:22][murison@hypatia ~] pip install git+https://github.com/ericmandel/pyds9.git#egg=pyds9 Collecting pyds9 from git+https://github.com/ericmandel/pyds9.git#egg=pyds9 Cloning https://github.com/ericmandel/pyds9.git to /tmp/pip-build-79q8gyvi/pyds9 Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "/tmp/pip-build-79q8gyvi/pyds9/setup.py", line 61, in cmdclassd = register_commands(PACKAGENAME, VERSION, RELEASE) File "/tmp/pip-build-79q8gyvi/pyds9/astropy_helpers/astropy_helpers/setup_helpers.py", line 142, in register_commands from .commands.build_sphinx import (AstropyBuildSphinx, File "/tmp/pip-build-79q8gyvi/pyds9/astropy_helpers/astropy_helpers/commands/build_sphinx.py", line 17, in from sphinx.setup_command import BuildDoc as SphinxBuildDoc File "/scr/bin/anaconda3/lib/python3.6/site-packages/sphinx/setup_command.py", line 23, in from sphinx.application import Sphinx File "/scr/bin/anaconda3/lib/python3.6/site-packages/sphinx/application.py", line 33, in from sphinx.environment import BuildEnvironment File "/scr/bin/anaconda3/lib/python3.6/site-packages/sphinx/environment/init.py", line 45, in from sphinx.util.websupport import is_commentable File "/scr/bin/anaconda3/lib/python3.6/site-packages/sphinx/util/websupport.py", line 11, in from sphinxcontrib.websupport.utils import is_commentable # NOQA File "/scr/bin/anaconda3/lib/python3.6/site-packages/sphinxcontrib/websupport/init.py", line 15, in from sphinxcontrib.websupport.core import WebSupport # NOQA File "/scr/bin/anaconda3/lib/python3.6/site-packages/sphinxcontrib/websupport/core.py", line 17, in from jinja2 import Environment, FileSystemLoader File "/scr/bin/anaconda3/lib/python3.6/site-packages/jinja2/init.py", line 33, in from jinja2.environment import Environment, Template File "/scr/bin/anaconda3/lib/python3.6/site-packages/jinja2/environment.py", line 15, in from jinja2 import nodes File "/scr/bin/anaconda3/lib/python3.6/site-packages/jinja2/nodes.py", line 19, in from jinja2.utils import Markup File "/scr/bin/anaconda3/lib/python3.6/site-packages/jinja2/utils.py", line 486, in MutableMapping.register(LRUCache) File "/scr/bin/anaconda3/lib/python3.6/abc.py", line 158, in register if issubclass(subclass, cls): File "/scr/bin/anaconda3/lib/python3.6/abc.py", line 226, in subclasscheck if issubclass(subclass, scls): File "/scr/bin/anaconda3/lib/python3.6/abc.py", line 226, in subclasscheck if issubclass(subclass, scls): File "/scr/bin/anaconda3/lib/python3.6/typing.py", line 1153, in subclasscheck return super().subclasscheck(cls)

[...] File "/scr/bin/anaconda3/lib/python3.6/abc.py", line 207, in subclasscheck ok = cls.subclasshook(subclass) File "/scr/bin/anaconda3/lib/python3.6/typing.py", line 884, in extrahook if issubclass(subclass, scls): File "/scr/bin/anaconda3/lib/python3.6/typing.py", line 1153, in subclasscheck return super().subclasscheck(cls) RecursionError: maximum recursion depth exceeded while calling a Python object

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-79q8gyvi/pyds9/ [13:22][murison@hypatia ~]

montefra commented 6 years ago

I should have a miniconda installation around. Tomorrow I will try to create a clean environement with py3.6 and install pyds9. However I think that it will work. For testing on TravisCI I use the ci-helpers from astropy: there anaconda environments are created and pyds9 installed without problems.

Which version of sphinx do you have?

montefra commented 6 years ago

In the end of the day is not a problem caused by pyds9 but it has something to do with some bad interaction between sphinx >= 1.6 and astropy-helpers. You can see also the same problem in other packages, e.g. pyregion.

It seems that astropy-helpers 2.0.2 solves the issue. I'll update it and hope for the best

ericmandel commented 6 years ago

Sorry this has been such a mess ... I appreciate your efforts.

murison commented 6 years ago

Which version of sphinx do you have?

1.6.3

Sorry this has been such a mess ..

No worries. The older version of pyds9 is still working fine for us.

montefra commented 6 years ago

I hope that astropy_helper and/or sphinx will solve the issue soon.

Shall we close the issue?

murison commented 6 years ago

@montefra Sure. Thanks for all your efforts.