Skip to content
This repository has been archived by the owner on Oct 14, 2023. It is now read-only.

time_range is not working as described in the quickstart documentation #1639

Open
toihr opened this issue Aug 4, 2023 · 0 comments
Open

Comments

@toihr
Copy link

toihr commented Aug 4, 2023

馃悶 Problem
The function time range is not working as it is used in the quickstart docs. When passing begining and end time it will raise an error.

The following code addapted from the docs will cause the error as shown here:

from poliastro.util import time_range
from astropy.time import Time

start_date = Time("2022-07-11 05:05", scale="utc")
end_date = Time("2022-07-11 07:05", scale="utc")
time_range(start_date, end_date)

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[12], line 4
      1 start_date = Time("2022-07-11 05:05", scale="utc")
      2 end_date = Time("2022-07-11 07:05", scale="utc")
----> 4 time_range(start_date, end_date)

TypeError: time_range() takes 1 positional argument but 2 were given

馃挕 Possible solutions

This might be one of two things. Either the function works as intended and there is an issue in the docs -> change docs
or the way it is described in the docs is the intended functionality and the code is wrong -> change code.

馃搵 Steps to solve the problem

  • Decide what the problem is I can then make a commit and create a pull request to solve this.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant