Hey Ismael - the start argument to that function i...
# ask-community
d
Hey Ismael - the start argument to that function is actually a datetime object, not a string. You'll want to turn it into a string within that function (by calling str(start)) or start.strftime for a particular date format)
i
Which function? The partitioned_logs_configuration(start) you mean?
d
Yeah, exactly
i
I've just changed and still the same error
d
Would you mind posting the new code?
i
from datetime import datetime start: datetime, _end: datetime
If I leave to Any type, this would work?
d
Those are typehints - they don't change the actual logic that executes. The most important change to make is is to make that "date" key in your dictionary point at a string, not a datetime object
(by transforming the datetime object into a string)
i
Humm, I'll try something, just a second
Worked
I added to the "start" variable the strftime() inside line 38 and worked just fine, thank you, @daniel, you're the man!!
condagster 1