Skip to content

Data format not recognised when exporting data after migration #61

@Eliiia

Description

@Eliiia

Hi, I apologise if this has been brought up before but I could not find an open or closed issue relating to this, nor any instructions in your README. Please let me know if you need any more info. Sorry again if this should be submitted as a feature request instead.

Describe the bug
By 8th December, users will have to have migrated their data to their local device. I found a way to download the data (Android settings -> Location -> Location Services -> Timeline -> Export Timeline Data) after Google recently forced me to migrate, but the script failed to interpret this file. It is a JSON file of a similar format to Records.json.

To Reproduce
Steps to reproduce the behavior:

  1. Migrate timeline data to local device
  2. Download data through Android settings -> Location -> Location Services -> Timeline -> Export Timeline Data
  3. Attempt to use the Timeline.json generated on the script
  4. See error
(1/3) Loading data from .\Timeline.json
Traceback (most recent call last):
  File "C:\Users\LLR User\Downloads\geo-heatmap\geo_heatmap.py", line 327, in <module>
    generator.run(data_file, output_file, date_range, stream_data, settings)
  File "C:\Users\LLR User\Downloads\geo-heatmap\geo_heatmap.py", line 258, in run
    self.loadJSONData(json_file, date_range)
  File "C:\Users\LLR User\Downloads\geo-heatmap\geo_heatmap.py", line 57, in loadJSONData
    first_element = data["locations"][0]
                    ~~~~^^^^^^^^^^^^^
KeyError: 'locations'```

**Expected behavior**
The file loads in.

**Desktop (please complete the following information):**
 - OS: Windows
 - Browser: N/A

 - Android version, if relevant: 14

Also, thank you so much for all your work on the project. This is by far my favourite open source project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions