-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
Fedex Tracker erroring with an inconsistent date format #654
Comments
Hi @ChrisNolan, Here is what the code looks like:
karrio/modules/connectors/fedex/karrio/providers/fedex/tracking.py Lines 47 to 54 in 353cbe0
I am going to close this for now. |
Excellent, thank you! I'll update this afternoon and let you know if there is any issue with it. Cheers. |
Hey @danh91 I'm still pretty new at all this... it doesn't seem like the rc31 has an image available via docker. Is that correct? Is there a step that is missed, should it be automatic or something else? It looks like I can just 'build' my own image if I clone the repo... is that what I should do? Up to this point I was just editting my docker-compose.yml and changing the 'image' line. Thanks for any tips. |
Hi @ChrisNolan , It is fully automated with Github actions. I somehow didn't push the updated version file required to trigger the build. Done now. |
The logic is here
One possible 'hack' to force the data into the format would be something like
but having a function of some sort that could possibly consistently handle differently formatted dates might be a more robust solution?
Here is a tracking number which has the issue with the "PU" (Pickup Event).
And to be complete, this is the result that karrio actually gives as it doesn't fail outright
Discussed in https://github.com/orgs/karrioapi/discussions/650
Originally posted by ChrisNolan August 22, 2024
I have a bunch of tracking numbers from Fedex atm who are returning poorly formatted dates which Karrio is not able to handle atm.
In people's opinions, how should Karrio handle this do you think?
In this case for example Fedex is giving "date": "2024-08-15T00:00:00", when the code is expecting a timezone to be included -- e.g.
lib.to_date(event.date, "%Y-%m-%dT%H:%M:%S%z") for event in item.scanEvents
I think it is a weird issue with a device in one of our warehouses that is causing it, but I'm not sure. But it means a bunch of tracking numbers can't be added in the mean time, and before I 'hack' it up too much myself, I thought I'd ask people's opinions on 'best practices' for handling it?
Should I just add in a timezone if it is missing (and if so, go with "+0000" (or is it -0000), or try to 'infer' a timezone from neighbouring 'events' or something else in the 'header'. Or should I more gracefully 'skip' that event, and if I skip the event, should I inject an event into the history saying that there was a missing event? Or some combination of thsoe, or something else entirely?
Thanks for your time. (Note I did email hello@karrio.io as well, sorry for the duplication)
The text was updated successfully, but these errors were encountered: