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

'ChebyshevPosition' object has no attribute 'target_name' #161

Closed
JoshPaterson opened this issue Mar 1, 2018 · 3 comments
Closed

'ChebyshevPosition' object has no attribute 'target_name' #161

JoshPaterson opened this issue Mar 1, 2018 · 3 comments

Comments

@JoshPaterson
Copy link
Contributor

When I try to create a vector from the sun to the earth like this:

earth = ephem['earth']
sun = ephem['sun']
vector = earth - sun

I get this error:

AttributeError: 'ChebyshevPosition' object has no attribute 'target_name'

I believe this error occurs for any body whose vector is a ChebyshevPosition object, such as the earth barycenter, or the sun. This issue means that geometric positions involving these objects cannot be generated.

@ghost
Copy link

ghost commented Mar 1, 2018

Could we see the entire code? Have you loaded an ephemeris?

@JoshPaterson
Copy link
Contributor Author

The full script to reproduce this error is:

from skyfield.api import load

ephem = load('de430t.bsp')

earth = ephem['earth']
sun = ephem['sun']

vector = earth - sun

Also, I am using the latest version.

@brandon-rhodes
Copy link
Member

Thanks for letting me know!

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

2 participants