Skip to content
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

Datetime parsing error #1

Closed
rexwangcc opened this issue Oct 13, 2020 · 2 comments
Closed

Datetime parsing error #1

rexwangcc opened this issue Oct 13, 2020 · 2 comments
Assignees
Labels
bug Something isn't working steam

Comments

@rexwangcc
Copy link

Thank you for making such a good tool :p

I was trying to generate a list but got the following error:

...
Creating Notion template page...
Created!
Importing steam library games to Notion...
ValueError: time data 'Dec 13, 2013' does not match format '%b %Y'

I believe that was due to the datetime format mismatch (or perhaps steam changed the format of the game dates), for example, in my game_info_cache.json, games are shown like:

{"id": "251570", "name": "7 Days to Die", "platforms": ["steam"], "release_date": "Dec 13, 2013", "playtime": "56 minutes", "logo_uri": "https://steamcdn-a.akamaihd.net/steam/apps/251570/header.jpg?t=1599069217", "bg_uri": "https://steamcdn-a.akamaihd.net/steam/apps/251570/page.bg.jpg", "icon_uri": "http://media.steampowered.com/steamcommunity/public/images/apps/251570/f6515dd177b2992aebcb563151fbe836a600f364.jpg", "free": false}

note in the JSON it shows Dec 13, 2013 which is equal to "%b %d, %Y" whereas

return datetime.strptime(date_str, r"%d %b, %Y").date()
assumes "%d %b, %Y".

@solesensei
Copy link
Owner

Thank you for details, yes, you're right, date was reversed. Maybe steam changed api.
I'll fix it in next release

@solesensei solesensei self-assigned this Oct 28, 2020
@solesensei solesensei added bug Something isn't working steam labels Oct 28, 2020
@solesensei
Copy link
Owner

Check last release, feel free to reopen the issue if error persist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working steam
Projects
None yet
Development

No branches or pull requests

2 participants