Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SUPPORT] Huawey changed the file format and hitrava cannot convert it any longer #78

Open
jimiend opened this issue Sep 12, 2024 · 1 comment

Comments

@jimiend
Copy link

jimiend commented Sep 12, 2024

this is the content of the zip file
Screenshot 2024-09-12 at 17 11 58

Here the motion detail directory
Screenshot 2024-09-12 at 17 13 04

I'm attaching one file for reference
motion path detail data1724429219003.json

and below the error when I try to run the script on it

dpacific@DPACIFIC-M-V63K ~ % cd expect/Hitrava-master
dpacific@DPACIFIC-M-V63K Hitrava-master % python3 Hitrava.py -j input/motion\ path\ detail\ data1724429219003.json
2024-09-12 17:15:49,018 - INFO - main - Hitrava version 5.1.2 (build 2308.2601) started with arguments ['-j', 'input/motion path detail data1724429219003.json']
2024-09-12 17:15:49,018 - INFO - main - Running on Python version 3.9.12
2024-09-12 17:15:49,020 - INFO - parse - Found one or more activities in JSON at index 0 to parse from 2023-08-01 (YYY-MM-DD)
2024-09-12 17:15:49,020 - ERROR - parse - Error parsing JSON file <input/motion path detail data1724429219003.json>
'attribute'
Traceback (most recent call last):
  File "/Users/dpacific/expect/Hitrava-master/Hitrava.py", line 1285, in parse
    hi_activity = self._parse_activity(activity_dict)
  File "/Users/dpacific/expect/Hitrava-master/Hitrava.py", line 1304, in _parse_activity
    hitrack_data = activity_dict['attribute']
KeyError: 'attribute'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/dpacific/expect/Hitrava-master/Hitrava.py", line 2170, in <module>
    main()
  File "/Users/dpacific/expect/Hitrava-master/Hitrava.py", line 2156, in main
    hi_activity_list = hi_json.parse(args.from_date)
  File "/Users/dpacific/expect/Hitrava-master/Hitrava.py", line 1300, in parse
    raise Exception('Error parsing JSON file <%s>', self.json_file.name)
Exception: ('Error parsing JSON file <%s>', 'input/motion path detail data1724429219003.json')
@CTHRU
Copy link
Owner

CTHRU commented Sep 13, 2024

Well, unfortunately it is a known issue, see #77.

There is nothing much that can be done about it as the detailed track data is simply gone. Unless Huawei is willing to put it back in some form or other, I think you would have to rely on other solutions. In any case, I found it strange that the data disappeared, because for sure they have it since it is displayed in the app. Maybe someone made a mistake on their part and removed the data export? You could always try to contact them and mention your GDPR right to access the data / right to data portability if you are in Europe.

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

No branches or pull requests

2 participants