Skip to content

fix: cast day_number to int when loading month content - #899

Closed
saschabuehrle wants to merge 1 commit into
jendrikseipp:masterfrom
saschabuehrle:fix/issue-897
Closed

fix: cast day_number to int when loading month content#899
saschabuehrle wants to merge 1 commit into
jendrikseipp:masterfrom
saschabuehrle:fix/issue-897

Conversation

@saschabuehrle

Copy link
Copy Markdown

Fixes #897

YAML can deserialize dictionary keys as strings depending on the document format. When that happens, datetime.date() in Day.__init__() crashes with TypeError: 'str' object cannot be interpreted as an integer because the day number is still a string.

Casting to int() in Month.__init__() before constructing the Day fixes the crash.

-- saschabuehrle

@jendrikseipp

Copy link
Copy Markdown
Owner

Merged #898 instead. Thanks anyway!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TypeError: 'str' object cannot be interpreted as an integer

2 participants