spacetelescope / synphot_refactor

Synthetic photometry using Astropy
http://synphot.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
39 stars 25 forks source link

Cannot install - problem accessing stsci ftp server #61

Closed will-henney closed 10 years ago

will-henney commented 10 years ago

Hi,

I am trying to install your pysynphot package, but I get an error: urllib2.URLError: <urlopen error ftp error: > (full traceback given below). The same thing happens with both python 2.7 and 3.3. The problem seems to be with the STScI FTP server. Indeed, I get the following when I try and access it on the command line:

$ ftp ftp.stsci.edu
Connected to wonder.stsci.edu.
Abort trap: 6

which doesn't look healthy! Is there any alternative source of the data files?

Cheers

Will

$ python setup.py install
Traceback (most recent call last):
  File "setup.py", line 64, in <module>
    cmdclassd = register_commands(PACKAGENAME, VERSION, RELEASE)
  File "/Users/will/anaconda/envs/py27/lib/python2.7/site-packages/astropy-0.3.dev5708-py2.7-macosx-10.5-x86_64.egg/astropy/setup_helpers.py", line 374, in register_commands
    'build_ext': generate_build_ext_command(package, release),
  File "/Users/will/anaconda/envs/py27/lib/python2.7/site-packages/astropy-0.3.dev5708-py2.7-macosx-10.5-x86_64.egg/astropy/setup_helpers.py", line 433, in generate_build_ext_command
    uses_cython = should_build_with_cython(packagename, release)
  File "/Users/will/anaconda/envs/py27/lib/python2.7/site-packages/astropy-0.3.dev5708-py2.7-macosx-10.5-x86_64.egg/astropy/setup_helpers.py", line 1192, in should_build_with_cython
    fromlist=['release', 'cython_version'])
  File "/Users/will/Source/pysynphot/synphot/__init__.py", line 132, in <module>
    from . import config
  File "/Users/will/Source/pysynphot/synphot/config.py", line 131, in <module>
    set_files()
  File "/Users/will/Source/pysynphot/synphot/config.py", line 83, in set_files
    os.path.join(std_dir, 'alpha_lyr_stis_*.fits')))
  File "/Users/will/Source/pysynphot/synphot/specio.py", line 63, in get_latest_file
    response = request.urlopen(path).read().decode('utf-8').splitlines()
  File "/Users/will/anaconda/envs/py27/lib/python2.7/urllib2.py", line 127, in urlopen
    return _opener.open(url, data, timeout)
  File "/Users/will/anaconda/envs/py27/lib/python2.7/urllib2.py", line 404, in open
    response = self._open(req, data)
  File "/Users/will/anaconda/envs/py27/lib/python2.7/urllib2.py", line 422, in _open
    '_open', req)
  File "/Users/will/anaconda/envs/py27/lib/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/Users/will/anaconda/envs/py27/lib/python2.7/urllib2.py", line 1394, in ftp_open
    fw = self.connect_ftp(user, passwd, host, port, dirs, req.timeout)
  File "/Users/will/anaconda/envs/py27/lib/python2.7/urllib2.py", line 1416, in connect_ftp
    persistent=False)
  File "/Users/will/anaconda/envs/py27/lib/python2.7/urllib.py", line 865, in __init__
    self.init()
  File "/Users/will/anaconda/envs/py27/lib/python2.7/urllib.py", line 871, in init
    self.ftp.connect(self.host, self.port, self.timeout)
  File "/Users/will/anaconda/envs/py27/lib/python2.7/ftplib.py", line 135, in connect
    self.welcome = self.getresp()
  File "/Users/will/anaconda/envs/py27/lib/python2.7/ftplib.py", line 210, in getresp
    resp = self.getmultiline()
  File "/Users/will/anaconda/envs/py27/lib/python2.7/ftplib.py", line 196, in getmultiline
    line = self.getline()
  File "/Users/will/anaconda/envs/py27/lib/python2.7/ftplib.py", line 186, in getline
    if not line: raise EOFError
urllib2.URLError: <urlopen error ftp error: >
pllim commented 10 years ago

Hi. This pysynphot is still in development and not ready for distribution yet. For now, please use the pysynphot officially distributed by STScI, available here: http://www.stsci.edu/institute/software_hardware/pyraf/stsci_python

will-henney commented 10 years ago

OK, thanks. I had actually already tried the released version, which I just installed with pip install pysnphot but it didn't work in python 3.3 - some problem with circular imports. However, it does work with python 2.7, so I guess I will have to go with that.

I saw the link to your version on this blog post. Maybe you should leave a comment there if you would rather discourage anyone from using it yet :)

pllim commented 10 years ago

Yes, we are aware of the circular import problem in the release version (which does not support Python 3) and we apologize for any inconvenience caused. Do try the release version in Python 2.7 and please contact help[at]stsci.edu if you run into problem with the release version.

Thank you for alerting me to the blog post. I'll leave a comment there.