I have a command line like that:
response = api.measurements(location=location, limit=5000, date_from=dt_start, date_to=dt_end, df=True, index='utc')
where according to previous code, dt_end could be a date (to stop measurements to a certain date) or None if you want all the measurements until now. The problem is that when dt_end = None, the api command does not take into account the date_from parameter neither.
I could avoid the problem with
dt_end = datetime.date.today() if dt_end is None
but I think that the command should work also when one of the dates is None.
Is it a bug or there is a reason that I'm not seeing?
Thanks!
I have a command line like that:
response = api.measurements(location=location, limit=5000, date_from=dt_start, date_to=dt_end, df=True, index='utc')where according to previous code, dt_end could be a date (to stop measurements to a certain date) or None if you want all the measurements until now. The problem is that when
dt_end = None, the api command does not take into account thedate_fromparameter neither.I could avoid the problem with
dt_end = datetime.date.today() if dt_end is Nonebut I think that the command should work also when one of the dates is None.
Is it a bug or there is a reason that I'm not seeing?
Thanks!