invalid load key, '\x04'

Skip to first unread message

Minyu Chan

Apr 16, 2023, 4:32:17 AMApr 16
to users group
Dear idtrackerai team,

I've tried to open a session using Validator and I've got this error:

Traceback (most recent call last):
  File "C:\Users\MINYU\anaconda3\envs\idtrackerai\Lib\site-packages\idtrackerai_validator\", line 351, in <lambda>
    QTimer.singleShot(0, lambda: self.open_session(session_path))
  File "C:\Users\MINYU\anaconda3\envs\idtrackerai\Lib\site-packages\idtrackerai_validator\", line 461, in open_session
    self.blobs = ListOfBlobs.load(path)
  File "C:\Users\MINYU\anaconda3\envs\idtrackerai\Lib\site-packages\idtrackerai\", line 166, in load
    list_of_blobs: ListOfBlobs = pickle.load(file)
_pickle.UnpicklingError: invalid load key, '\x04'.

Any advice would be appreciated!



Apr 17, 2023, 5:52:59 AMApr 17
to users group
Thanks for sharing this error, Minyu.

The file preprocessing/list_of_blobs.pickle you are trying to load seems to be corrupt (broken).
  • Which version of are you using to run the Validator and which one did the tracking?
  • Have you manually modified in some way the list_of_blobs.pickle file?
  • Is it an isolated bug affecting only one tracking session or is it general affecting all tracking sessions?
  • The session you are trying to load was tracked using the computer that is trying to load it?
  • Have you loaded this tracking session previously?
Please, send me the entire idtrackerai.log file of this error to gather more information.

Thanks again for sharing.

Minyu Chan

Apr 17, 2023, 8:14:51 AMApr 17
to users group
Hi Jordi,

Thanks for the reply. 

1. I've upgraded to the latest version (5.1.0) and have used that to track and run the Validator right after tracking.
2. No, I've not modified the list_of_blobs.pickle file in any way.
3. I've only managed to run the Validator once (on my first attempt), and it happened when I try to restart Validator for the same session (because it abruptly stopped midway when I was correcting my trajectories). The same error happened for all my subsequent tracking sessions.
4. Yes, all my tracking sessions were done on the same machine.
5. No. I've not loaded this session previously.

I've attached the idtrackerai.log file for this session here

Many thanks,


Apr 20, 2023, 11:11:29 AMApr 20
to users group
Hi Minyu,

You are running on Python 3.11 which has not been tested yet. I recommend you to reinstall on Python 3.10. When creating the environment on step 1 of the installation, make sure to write the version of Python (python=3.10).

The sudden crash of the Validator could be a known issue, the Validator is not fully prepared for single animal trackings, I'm working on that that for the next release (in some days).

Apart from that, I cannot reproduce your error, the failure while loading the session is a bit unexpected.

A possible solution.Supposing the Validator generated a corrupted list_of_blobs_validated.pickle file, try to remove it and run again the validator. The Validator won't find the _validated.pickle file and will open then the original list_of_blobs.pickle. Those files are located in session_folder/preprocessing/.

If your error persists, I would ask you to please send me the data you used for me to reproduce your error (video file, input parameters and also the generated session folder).

Reply all
Reply to author
0 new messages