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

Error while reading Halley's comet from DASTCOM5 #902

Closed
astrojuanlu opened this issue Apr 11, 2020 · 2 comments
Closed

Error while reading Halley's comet from DASTCOM5 #902

astrojuanlu opened this issue Apr 11, 2020 · 2 comments
Labels

Comments

@astrojuanlu
Copy link
Member

@astrojuanlu astrojuanlu commented Apr 11, 2020

While trying to follow https://docs.poliastro.space/en/stable/examples/Using%20NEOS%20package.html#DASTCOM5-module, I found this error:

---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<ipython-input-9-3bb5fa7c99be> in <module>
----> 1 halleys = dastcom5.orbit_from_name("1P")
      2 
      3 frame = StaticOrbitPlotter()
      4 frame.plot(halleys[0], label="Halley")
      5 frame.plot(halleys[5], label="Halley")

~/.pyenv/versions/3.8.0/envs/poliastro38/lib/python3.8/site-packages/poliastro/neos/dastcom5.py in orbit_from_name(name)
    339     orbits = []
    340     for record in records:
--> 341         orbits.append(orbit_from_record(record))
    342     return orbits
    343 

~/.pyenv/versions/3.8.0/envs/poliastro38/lib/python3.8/site-packages/poliastro/neos/dastcom5.py in orbit_from_record(record)
    359 
    360         """
--> 361     body_data = read_record(record)
    362     a = body_data["A"].item() * u.au
    363     ecc = body_data["EC"].item() * u.one

~/.pyenv/versions/3.8.0/envs/poliastro38/lib/python3.8/site-packages/poliastro/neos/dastcom5.py in read_record(record)
    508 
    509         with open(ast_path, "rb") as f:
--> 510             f.seek(phis_rec, os.SEEK_SET)
    511             body_data = np.fromfile(f, dtype=AST_DTYPE, count=1)
    512     else:

OSError: [Errno 22] Invalid argument

I tried downloading dastcom5.zip twice to check that it was correct:

juanlu@ephyra:~$ sha256sum ~/.poliastro/dastcom5.zip 
64ea3f5753a877797be217840bf6582c85e948c31daaf3e6635bcf9e3b8c392c  /home/juanlu/.poliastro/dastcom5.zip
juanlu@ephyra:~$ sha256sum ~/Downloads/dastcom5.zip
64ea3f5753a877797be217840bf6582c85e948c31daaf3e6635bcf9e3b8c392c  /home/juanlu/Downloads/dastcom5.zip

This is relevant to the work @shreyasbapat is doing. @anhiga might want to take a look at this :)

@astrojuanlu
Copy link
Member Author

@astrojuanlu astrojuanlu commented Apr 11, 2020

Some more relevant information:

$ python -c "import sys; print(sys.version)"
3.8.0 (default, Dec 16 2019, 15:17:05) \n[GCC 7.4.0]

@astrojuanlu
Copy link
Member Author

@astrojuanlu astrojuanlu commented Apr 15, 2020

Fixed in #910.

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

1 participant