Skip to content

AttributeError: 'datetime.datetime' object has no attribute 'timestamp' #9

@greenlee

Description

@greenlee

Hello,
New to python and haven't been able to figure this out.
running python 2.7.18 in windows 10 command prompt.
I put the latest error in the title, AttributeError: 'datetime.datetime' object has no attribute 'timestamp' .
but prior to that, I was getting, Traceback (most recent call last):
File "C:\google-data-analyses-master\get_visit_times.py", line 87, in
data.clear()
AttributeError: 'list' object has no attribute 'clear' .
not sure if the two are related. I was able to bypass the clear error by commenting out the #data.clear() line. have lots of memory so figured why not.
the latest error I get is bellow.

C:\google-data-analyses-master>get_visit_times.py
Loading 'C:\google-data-analyses-master\Location History.json' ...
JSON file loaded
Extracting relevant data...
Total number of points: 4171876
Traceback (most recent call last):
File "C:\google-data-analyses-master\get_visit_times.py", line 95, in
begin_ts = date_ymd_to_timestamp_ms(2019,01,01)
File "C:\google-data-analyses-master\get_visit_times.py", line 24, in date_ymd_to_timestamp_ms
return datetime.datetime(y,m,d).timestamp()#*1e3
AttributeError: 'datetime.datetime' object has no attribute 'timestamp'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions