question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

instructions for downloading jplephem subset of .bsp file fails

See original GitHub issue

the problem doesn’t appear to be inside of skyfield per se, but I’m hoping you can give insight. In https://rhodesmill.org/skyfield/planets.html the instructions have the example:

$ python -m jplephem excerpt 2018/1/1 2018/1/15 $u jup_excerpt.bsp```, however:

1. jup310.bsp is no longer active, but looking at the JPL site, I found the up-to-date (full) files.
2. Trying sat427 (or any of them), e.g.:

```$ python -m jplephem excerpt 2021/1/1 2030/1/1 https://naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/satellites/sat427.bsp sat_excerpt.bsp```

always throws an error:

```AttributeError: 'RemoteFile' object has no attribute 'close'```
and doing some pecking, that's true --- the class Remotefile does not have a .close() method.

I've tried to get around this (commenting out the line, etc.) but that just throws different errors.

I've tried doing a GS on this error, but came up empty-handed - so I can't tell if somehow my local install has an issue, of what.

Can you try the above command and see if you replicate the problem?

(Or, jup365, mar097, nep095, or ura111 - same issue.)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
brandon-rhodescommented, Dec 31, 2021

Thanks for pointing that out! I have just released a new version of jplephem that should fix the problem. Try:

pip install -U jplephem

— and see whether that fixes the subcommand. Hopefully it will now work!

0reactions
brandon-rhodescommented, Jan 2, 2022

Wonderful, I’m glad that Skyfield is helping you eliminate code that you would otherwise have to maintain yourself! Thanks for sharing your positive experience, it’s encouraging.

If you’d like to share one of the weird phase angle numbers that Skyfield is returning for a planet, I’d be interested in seeing it to determine whether the phase-angle routine needs to be tweaked to work correctly with planets.

Read more comments on GitHub >

github_iconTop Results From Across the Web

jplephem - PyPI
If you have downloaded a .bsp file, you can run jplephem from the command line to display the data inside of it: python...
Read more >
de431t.bsp file handling error #366 - AndrewAnnex/SpiceyPy
I have downloaded the file and run it on SpiceyPy 64bits and Matlab 64bits, and it worked just fine. Then I run it...
Read more >
Planets and their moons: JPL ephemeris files — Skyfield ...
Here's how to download and open the JPL ephemeris DE421 and ask for the position of ... python -m jplephem spk jup_excerpt.bsp File...
Read more >
Downloading and Using Ephemerides for Comets, Asteroids ...
The JPL Horizons telnet interface enables you to download SPICE files, which you can then load into STK. Using the Horizons system 1....
Read more >
Quickstart — poliastro 0.17.0 documentation
The thrust changes orbit parameters as desired (within errors): ... to Astropy and jplephem, poliastro can read Satellite Planet Kernel (SPK) files, part...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found