# Get\_sun issues, input JD

**URL:** <https://community.openastronomy.org/t/get-sun-issues-input-jd/630>\
**Category:** Astropy\
**Created:** [March 28, 2023, 7:01pm UTC](https://community.openastronomy.org/t/get-sun-issues-input-jd/630 "2023-03-28T19:01:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Planetdtudy](https://dub1.discourse-cdn.com/flex005/user_avatar/community.openastronomy.org/planetdtudy/32/355_2.png) [@Planetdtudy](https://community.openastronomy.org/u/Planetdtudy)\
**Post date:** [March 28, 2023, 7:01pm UTC](https://community.openastronomy.org/t/get-sun-issues-input-jd/630/1 "2023-03-28T19:01:51Z")

</div>

Hi all.

Please, help me with the issue.  
I am prying to use get\_sun, but failing.

I need to calculate the distance from the Earth to the Sun from JD.  
But I get a mistake.

line 150, in get\_sun earth\_pv\_helio, earth\_pv\_bary = erfa.epv00(\*get\_jd12(time, ‘tdb’))

My line looks like:  
h=get\_sun(JD)
