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

ValueError: You shouldn't create CalibrationPoint objects yourself #18

Open
chiara-gambi opened this issue Sep 12, 2022 · 3 comments
Open

Comments

@chiara-gambi
Copy link

chiara-gambi commented Sep 12, 2022

Many thanks for sharing this project. I have been using your tobii-infant-controller in an experiment, programmed in Psychopy3 and interfacing via iohub to a tobii X2-60 (running on Windows 7).

I get the following error message occasionally (copying the entire Psychopy console output for context):

Welcome to PsychoPy3!
v2021.1.2
12.8191 WARNING Couldn't connect to psychopy.org
Check internet settings (and proxy setting in PsychoPy Preferences.
28.6397 INFO Loaded monitor calibration from ['2022_01_24 11:57']
Generating PsychoPy script...

Running: C:\Users\Eyetracker2\Documents\StructureEyes\StructureEyes_final\Task_pred_struct_final_lastrun.py
34.6018 INFO Loaded monitor calibration from ['2022_01_24 11:57']
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
29.0727 WARNING t of last frame was 20.48ms (=1/48)
47.1880 WARNING Monitor specification not found. Creating a temporary one...
pressed e at 0.1514297748599347 ms
1070.5146 WARNING Monitor specification not found. Creating a temporary one...
2122.6566 WARNING Monitor specification not found. Creating a temporary one...
ioHub Server Process Completed With Code: 0
Traceback (most recent call last):
File "C:\Users\Eyetracker2\Documents\StructureEyes\StructureEyes_final\Task_pred_struct_final_lastrun.py", line 2326, in
controller.run_calibration(CALIPOINTS, decision_key='a')
File "C:\Users\Eyetracker2\Documents\StructureEyes\StructureEyes_final\Task\psychopy_tobii_infant_init_.py", line 718, in run_calibration
self.calibration_result = self.calibration.compute_and_apply()
File "C:\Program Files\PsychoPy3\lib\site-packages\tobiiresearch\implementation\ScreenBasedCalibration.py", line 270, in compute_and_apply
calibration_points.append(CalibrationPoint(position, tuple(calibration_samples)))
File "C:\Program Files\PsychoPy3\lib\site-packages\tobiiresearch\implementation\ScreenBasedCalibration.py", line 87, in init
"You shouldn't create CalibrationPoint objects yourself.")
ValueError: You shouldn't create CalibrationPoint objects yourself.
Error in atexit.run_exitfuncs:
Traceback (most recent call last):
File "C:\Users\Eyetracker2\Documents\StructureEyes\StructureEyes_final\Task\psychopy_tobii_infant_init
.py", line 629, in close
"Data file is not found. Use start_recording() to record and "
RuntimeWarning: Data file is not found. Use start_recording() to record and save the data.
Experiment ended.

I have been in touch with Tobii support and also posted on the Psychpy Ddiscourse forum, but no luck. I am puzzled because the issue does not happen deterministically. Tobii support think the problem is not hardware-related. Attaching the psychopy program file. Thanks.

structure_pred_for_github.zip

@yh-luo
Copy link
Owner

yh-luo commented Sep 13, 2022

Hmm, the error message showed that tobii-research complained the instantiation of CalibrationPoint, which is how psychopy_tobii_infant utilizes for calibration. I don't remember encountering this problem before. It could result from the changes of newer version of tobii-search.

Could you provide the versions of PsychoPy, tobii-research and Python? Thanks!

@chiara-gambi
Copy link
Author

chiara-gambi commented Sep 13, 2022 via email

@yh-luo
Copy link
Owner

yh-luo commented Sep 29, 2022

Hello @chiara-gambi
Sorry for the late reply, I got caught up by work lately.
I've looked into the attached Python file and had a feeling that the problem results from bad calibration results?
Does the problem happen when the participant look away during data collection for the calibration points?

Since the package was developed with tobii-research 1.7.0, I'm afraid that it might not work well with newer versions of tobii-research.

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