Bug report - cannot save .psyexp files from Builder


I’m new to PsychoPy, and have just installed it on my Linux machine. I’m working through some basic learning materials, and realised that I’m unable to save the .psyexp file. The error report is pasted below.

I am running PsychoPy in an dedicated Conda environment names PsychoTEST. I didn’t use the provided .yml script, but created a new environment and used pip and conda to install the required psychopy ( + dependencies) and wxPython packages. Scripts appear to run in the coder, and I have provided the output of the sysInfo.py demo below also.

Can anyone provide any direction here? Please let me know if you need any further informaiton. I’m going to try and install it fresh on another Conda environment to rule out any installation errors.

Any guidance would be much appreciated.

Error Report:
Traceback (most recent call last):
File “/home/jason/anaconda3/envs/psychoTEST/lib/python3.7/site-packages/psychopy/app/builder/builder.py”, line 728, in fileSave
if not self.fileSaveAs(filename):
File “/home/jason/anaconda3/envs/psychoTEST/lib/python3.7/site-packages/psychopy/app/builder/builder.py”, line 772, in fileSaveAs
self.fileSave(event=None, filename=newPath)
File “/home/jason/anaconda3/envs/psychoTEST/lib/python3.7/site-packages/psychopy/app/builder/builder.py”, line 731, in fileSave
filename = self.exp.saveToXML(filename)
File “/home/jason/anaconda3/envs/psychoTEST/lib/python3.7/site-packages/psychopy/experiment/_experiment.py”, line 329, in saveToXML
self.xmlRoot = self.xml
File “/home/jason/anaconda3/envs/psychoTEST/lib/python3.7/site-packages/psychopy/experiment/_experiment.py”, line 314, in xml
File “/home/jason/anaconda3/envs/psychoTEST/lib/python3.7/xml/etree/ElementTree.py”, line 238, in append
File “/home/jason/anaconda3/envs/psychoTEST/lib/python3.7/xml/etree/ElementTree.py”, line 260, in _assert_is_element
raise TypeError(‘expected an Element, not %s’ % type(e).name)
TypeError: expected an Element, not Element

sysInfo.py output:
/home/jason/anaconda3/envs/psychoTEST/lib/python3.7/site-packages/psychopy/demos/coder/sysInfo.py ##
pygame 2.1.2 (SDL 2.0.16, Python 3.7.7)
Hello from the pygame community. Contribute - pygame wiki
Paths to files on the system:
userPrefsFile: /home/jason/.psychopy3/userPrefs.cfg
appDataFile: /home/jason/.psychopy3/appData.cfg
demos: /home/jason/anaconda3/envs/psychoTEST/lib/python3.7/site-packages/psychopy/demos
appFile: /home/jason/anaconda3/envs/psychoTEST/lib/python3.7/site-packages/psychopy/app/PsychoPy.py

System info:

Python info
3.7.7 (default, Mar 26 2020, 15:48:22)
[GCC 7.3.0]
numpy 1.18.1
scipy 1.4.1
matplotlib 3.1.3
pyglet 1.4.11
pyo 1.0.4

PsychoPy 2021.2.3
have shaders: True

OpenGL info:
vendor: Intel Open Source Technology Center
rendering engine: Mesa DRI Intel(R) UHD Graphics 620 (Kabylake GT2)
OpenGL version: 3.0 Mesa 18.2.8
(Selected) Extensions:
True GL_ARB_multitexture
True GL_EXT_framebuffer_object
True GL_ARB_fragment_program
True GL_ARB_shader_objects
True GL_ARB_vertex_shader
True GL_ARB_texture_non_power_of_two
True GL_ARB_texture_float
max vertices in vertex array: 3000
1.3599 WARNING Monitor specification not found. Creating a temporary one…

Experiment ended.

As an update, I tried installing psychopy on a fresh conda environment using:

pip install psychopy
conda install wxpython

and the same error appears

Hi There,

Are you able to install PsychoPy as standalone? and save from there?

Hi Becca,

Thank you for your reply, and apologies for the delay (I have been away).

I tried another fresh install using:

the supplied environment file
conda install dataclasses
conda install wxpython

and I can save! I guess we can deduce that the bug was therefore associated with the method by which I installed psychopy and the related packages.

Now to debug the test text not showing on the screen…

Thanks again