You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
apples-MacBook-Air:analytics_pipeline vidhyasagar$ python count_visitors.py
Traceback (most recent call last):
File "count_visitors.py", line 40, in
day = time_obj.strftime("%d-%m-%Y")
AttributeError: 'str' object has no attribute 'strftime'
The text was updated successfully, but these errors were encountered:
The issue when I got it was that when you go through thee for loop, the last time_obj in the list happens to be a string type instead of a datetime type. I ended up adding these lines prior to it as a temporary work around:
if type(time_obj) != datetime:
continue
day = time_obj.strftime("%d-%m-%Y")
apples-MacBook-Air:analytics_pipeline vidhyasagar$ python count_visitors.py
Traceback (most recent call last):
File "count_visitors.py", line 40, in
day = time_obj.strftime("%d-%m-%Y")
AttributeError: 'str' object has no attribute 'strftime'
The text was updated successfully, but these errors were encountered: