sczesla / PyAstronomy

A collection of astronomy-related routines in Python
152 stars 35 forks source link

Unable to download ExoplanetEU2 votable #18

Closed bege5080 closed 8 years ago

bege5080 commented 8 years ago

Hi,

When downloaded and installed PyAstronomy, "import of from PyAstronomy import pyasl" prompted a configuration path to down load the exoplanet.eu data:

Configure PyA's data path now (y/n)? y Please provide a directory where PyA can store data (may already exist): Press enter to accept default; use 'exit' to abort. Path (default = /Users/benjamingerard/PyAData): /Volumes/HD_Backup/PyAData PyA data path configured successfully. Using path: /Volumes/HD_Backup/PyAData

but then I immediately get the following error message:

PyADownloadError:

A PyA error occurred:

Type of error: PyA download error What happened? Could not download data from URL: http://exoplanet.eu/catalog/votable. Error message: urlopen() got an unexpected keyword argument 'context' What are possible solutions?

But the url works fine for me in a web browser, downloading exoplanet_catalog.vot

If I restart python and try the same command, I now get this error:

PyAValError:

A PyA error occurred:

Type of error: PyA Value Error What happened? Could not access file (relative name): pyasl/resBased/epeu.vo.gz, full name: /Volumes/HD_Backup/PyAData/pyasl/resBased/epeu.vo.gz Caught exception: [Errno 2] No such file or directory: '/Volumes/HD_Backup/PyAData/pyasl/resBased/epeu.vo.gz'

Help?

sczesla commented 8 years ago

Hi,

thanks for reporting. The data path seems to be configured correctly. The second time, PyA thinks that the data have been downloaded, but they are not present (because the error occurred). While that should also be addressed, it does not seem to be the actual issue (using forceUpdate() I assume the first error can be reproduced).

Could you please point out the Python version you are using?

Cheers, Stefan

bege5080 commented 8 years ago

STScI Python, version 2.7.5

sczesla commented 8 years ago

Thanks. I assume the underlying python version is < 2.7.6 (you can find out via "python --version"). I believe the numbers are very similar only by chance because STScI Python refers to a collection of packages added on top of python. The trouble-causing context parameter was added only later. I will implement a fall-back asap so that this will not happen anymore and let you know

sczesla commented 8 years ago

Hi, I drafted a release (0.10.1) which will (hopefully) address the issue. It may require that you instantiate the class via

v = pyasl.ExoplanetEU2(forceUpdate=True)

the first time (forced immediate download of the data) because an issue with the exoplanetEU VO table was also fixed (this time on their side). Stefan