Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install error with recent commits: _wcs doesn't have WcsError #1280

Closed
keflavich opened this issue Jul 23, 2013 · 13 comments
Closed

Install error with recent commits: _wcs doesn't have WcsError #1280

keflavich opened this issue Jul 23, 2013 · 13 comments
Labels

Comments

@keflavich
Copy link
Contributor

I've been seeing this error:

$ python setup.py develop
Freezing version number to astropy/version.py
Traceback (most recent call last):
  File "setup.py", line 82, in <module>
    package_dirs)
  File "/Volumes/disk5/Users/adam/repos/astropy/astropy/setup_helpers.py", line 1028, in update_package_files
    extensions.extend(setuppkg.get_extensions())
  File "astropy/wcs/setup_package.py", line 206, in get_extensions
    generate_c_docstrings()
  File "astropy/wcs/setup_package.py", line 122, in generate_c_docstrings
    from astropy.wcs import docstrings
  File "/Volumes/disk5/Users/adam/repos/astropy/astropy/wcs/__init__.py", line 27, in <module>
    from .wcs import *
  File "/Volumes/disk5/Users/adam/repos/astropy/astropy/wcs/wcs.py", line 82, in <module>
    WcsError = _wcs.WcsError
AttributeError: 'module' object has no attribute 'WcsError'

when trying to install from the latest astropy source. On one of my machines, I was able to get around the issue by doing rm -r build, but on my other, the problem persists.

@keflavich
Copy link
Contributor Author

Sorry, I misreported the error. The issue actually comes from 9d982a3, and is absent in the prior commit, e3e3414. This is true on both machines.

@mdboom
Copy link
Contributor

mdboom commented Jul 23, 2013

Have you at any time done a setup.py build --inplace or setup.py develop? That will leave an old version of the _wcs.so extension around, which doesn't have this new WcsError member. I that's what it is, I'll have to again unleash my recurring rant about why any tool that builds things "in place" is an abomination 😉. If that's not what it is, I'm at a bit of a loss.

Try doing git clean -fxd to clean out your git working directory and see if it fixes things.

EDIT: I see setup.py develop at the top of the report. I just have to recommend not doing that, or become accustomed to git clean -fxd. I know that's a minority opinion around here...

@keflavich
Copy link
Contributor Author

Brilliant, thanks. I personally prefer adding git clean -fxd to my workflow rather than avoiding python setup.py develop - I tend not to edit anything but .py files and prefer to have a shorter workflow for reloading python file changes.

That said, feel free to unleash the rant.

@keflavich
Copy link
Contributor Author

FYI, note that this is causing problems on RTFD also:
https://readthedocs.org/builds/astroquery/709230/

@keflavich
Copy link
Contributor Author

On readthedocs, even using a wipe doesn't solve the issue. Any thoughts on that? I don't think you can pass any git commands directly to rtfd, and I guess they don't really delete the whole directory? That seems quite strange to me.

@keflavich keflavich reopened this Jul 23, 2013
@embray
Copy link
Member

embray commented Jul 24, 2013

Indeed, most of the time setup.py develop is fine--it only bugs out if changes can occur in extension modules. This happens to me most often when changing branches, so sometimes I either do git fresh (which is an alias I have for git clean -d -x -f -e .tox so that it doesn't wipe away my tox envs).

Sometimes if I suspect this is going to happen I just check out a branch into a separate working copy. Usually it's not an issue though.

I don't know why you would be having problems with this in RTD but I don't think that's really an Astropy issue.

@keflavich
Copy link
Contributor Author

Thanks for those tips. However, the RTD issue is the exact same error message I reported above. @kbarbary reported a similar issue on another RTD build. There are other problems with that build, but I think the failure to build astropy is something we should be able to figure out?

@kbarbary
Copy link
Member

@keflavich To me, it really looks like the problem is that the RTD "wipe" is not really deleting everything. Maybe we should ask the RTD guys what's going on. Off-topic for this PR though.

@astrofrog
Copy link
Member

Try pressing the wipe button several times in a row - it sometimes goes through different paths.

@keflavich
Copy link
Contributor Author

Tried that. I think contacting RTD is probably best.

@keflavich
Copy link
Contributor Author

@cdeil posted the issue at RTD: readthedocs/readthedocs.org#422

While this is perhaps no longer an astropy issue, it is affecting a lot of astropy dependencies, so I think it's good to keep track of it here for a little while longer.

@kbarbary
Copy link
Member

Thanks for filing the issue @cdeil!

@cdeil
Copy link
Member

cdeil commented Aug 7, 2013

@erikholscher confirmed that this is an issue with wipe on readthedocs at readthedocs/readthedocs.org#422 (comment) and they are working on it:

This ticket will be kept open to fix the problem w/ wipe not working.

So IMO this astropy issue can be closed ... astropy affiliated package devs will still find it with the search button.

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

No branches or pull requests

6 participants