pupil
pupil copied to clipboard
Gazer2D calibration data(errorlines/convex hull) no longer displayed.
In past versions, there was a bunch of orange lines in the world window + convex hull that were displayed when completing a calibration. It's no longer the case in the master branch in my conditions (do not have pupil hardware to test).
I am sending calibration data through the IPC backbone for tests with smthg like :
send_recv_notification(
{
"subject": "start_plugin",
"name": "Gazer2D",
"args": {"calib_data": calib_data},
"raise_calibration_error": True,
}
)
The calibration is successful, but nothing is displayed in the world window, (was working in anterior versions).
When I changed that line https://github.com/pupil-labs/pupil/blob/master/pupil_src/shared_modules/gaze_mapping/notifications.py#L50 to except only AssertionError
, I get the following traceback.
Traceback (most recent call last):
File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/home/basile/data/src/pupil/pupil_src/launchables/world.py", line 743, in world
p.on_notify(n)
File "/home/basile/data/src/pupil/pupil_src/shared_modules/accuracy_visualizer.py", line 311, in on_notify
if self.__handle_calibration_setup_notification(notification):
File "/home/basile/data/src/pupil/pupil_src/shared_modules/accuracy_visualizer.py", line 326, in __handle_calibration_setup_notification
note = CalibrationSetupNotification.from_dict(note_dict)
File "/home/basile/data/src/pupil/pupil_src/shared_modules/gaze_mapping/notifications.py", line 48, in from_dict
dict_ = cls.sanitize_serialized_dict(dict_)
File "/home/basile/data/src/pupil/pupil_src/shared_modules/gaze_mapping/notifications.py", line 108, in sanitize_serialized_dict
return super().sanitize_serialized_dict(dict_)
File "/home/basile/data/src/pupil/pupil_src/shared_modules/gaze_mapping/notifications.py", line 101, in sanitize_serialized_dict
return super().sanitize_serialized_dict(dict_)
File "/home/basile/data/src/pupil/pupil_src/shared_modules/gaze_mapping/notifications.py", line 59, in sanitize_serialized_dict
dict_[field_name] = field_cls(dict_[field_name])
TypeError: 'ForwardRef' object is not callable
So the Gazer2D notification is silently dismissed and never processed by the AccuracyVisualizer, hence the absence of display.
The particular value of the notification that seems to trigger that exception during unserialization is gazer_class_name:Gazer2D
I am not sure what exactly changed in the code to cause that issue and I am not exactly sure how it can be fixed. env: python3.8.10 on linux