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

JPL changed FTP site to https #666

Closed
ngnahz opened this issue Nov 26, 2021 · 9 comments
Closed

JPL changed FTP site to https #666

ngnahz opened this issue Nov 26, 2021 · 9 comments

Comments

@ngnahz
Copy link

ngnahz commented Nov 26, 2021

It seems JPL's FTP was closed and upgraded to https download site.
The link ftp://ssd.jpl.nasa.gov/pub/eph/planets/bsp/ was changed to
https://ssd.jpl.nasa.gov/ftp/eph/planets/bsp/
Related files can't be downloaded.

repro steps:
Download and install python module "sfalmanac"
Run command "python -m sfalmanac"
Got the following error:
File "C:\Python37\lib\site-packages\sfalmanac_main_.py", line 328, in
ts = init_sf(spad) # in alma_skyfield
File "C:\Python37\lib\site-packages\sfalmanac\lib\alma_skyfield.py", line 98, in init_sf
eph = load(config.ephemeris[config.ephndx][0]) # load chosen ephemeris
File "C:\Python37\lib\site-packages\skyfield\iokit.py", line 193, in call
path = self._assure(url, filename, reload, backup)
File "C:\Python37\lib\site-packages\skyfield\iokit.py", line 214, in _assure
download(url, path, self.verbose, backup=backup)
File "C:\Python37\lib\site-packages\skyfield\iokit.py", line 525, in download
raise e2
OSError: cannot download ftp://ssd.jpl.nasa.gov/pub/eph/planets/bsp/de421.bsp because <urlopen error ftp error: TimeoutError

@brandon-rhodes
Copy link
Member

I just tested and was able to perform a successful download with both Skyfield and also the manual command:

curl ftp://ssd.jpl.nasa.gov/pub/eph/planets/bsp/de421.bsp | wc

But you bring up a good question: what if they were to disable the service someday? I'll go see if there's a mailing list I can join so I'd be warned ahead of time!

Meanwhile, you'll probably want to check other possible sources of connectivity problems between you and the JPL servers. Let me know if you find a root cause, in case any other users are affected. I'll close the issue since it's not a Skyfield problem, but I welcome further comments on the closed issue. Thanks!

@brandon-rhodes
Copy link
Member

Though — I suppose I could go ahead and switch proactively, couldn't I? Rather than wait until a day when maybe they really take FTP down and downloads break for all users? The only thing that gives me pause is that their official README, updated last December (it says), recommends FTP links for downloading ephermides:

https://ssd.jpl.nasa.gov/planets/eph_export.html

But, looking elsewhere on the site, I do see more recent documents using the new /ftp top-level directory under their HTTPS site. So I'm going to presume that it's official, not temporary, and safe to switch to.

This could break Skyfield for users without the right certificates installed, but given that it protects against TCP hijacking, and future-proofs against the possibility of the FTP service going down, I'm going to try making the change. I can always back it out before the next release if I realize there's a severe downside.

@ngnahz
Copy link
Author

ngnahz commented Nov 27, 2021

My friends and I tried to connect the ftp directly but we can't even ping through... Meanwhile, the https site alway work on our machines.
Thanks for the quick fix:)

@yangyang-studio
Copy link

Unable to download (Windows 10)

mmexport1638251385773

@JamesRRitter
Copy link

With de421.bsp loaded via pip, the statement load('de421.bsp') in Python seemed to work only near the beginning of my program. This was before other loads in the program. I note this result but have no explanation for it.

@brandon-rhodes
Copy link
Member

@JamesRRitter — What is the traceback when an error is displayed?

@JamesRRitter
Copy link

JamesRRitter commented Oct 2, 2023 via email

@brandon-rhodes
Copy link
Member

File "C:\Users\Ritte_2dotfhr\AppData\Local\Programs\Python\Python311\Lib\site-packages\numpy\lib\npyio.py", line 438, in load

It looks like you are calling the NumPy load() routine instead of Skyfield's. Maybe you have a line like this in your program?

from numpy import load

@JamesRRitter
Copy link

JamesRRitter commented Oct 2, 2023 via email

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

No branches or pull requests

4 participants