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

Bad date parameters in get_data #49

Open
aazuspan opened this issue Sep 20, 2022 · 1 comment
Open

Bad date parameters in get_data #49

aazuspan opened this issue Sep 20, 2022 · 1 comment

Comments

@aazuspan
Copy link

  • Version: main branch head, but looks like it affects v0.1.0rc2 too
  • Platform: Windows 10
  • Subsystem:

The get_data method isn't working because it uses malformed date parameters. This happens within _call_api when _full_time==True because it appends a time stamp here and here onto the ISO-formatted datetime that already includes a timestamp.

For example, datetime.datetime.fromisoformat("2000-01-01").isoformat() returns '2000-01-01T00:00:00', so manually appending a timestamp results in an invalid datetime '2000-01-01T00:00:00T00:00:00' and causes the server to return a 400 error.

Just having get_data call _call_api with _full_time=False fixes the issue, but maybe that option can be removed entirely if there's no need for datetimes without a timestamp. This has been a really helpful package, so I'm happy to make a PR for this is you want.

@exTerEX
Copy link
Owner

exTerEX commented Sep 21, 2022

I'm aware and is working on it, I'll try to fix it as soon as possible.

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

2 participants