psychopy.org | Reference | Downloads | Github

AttributeError: module 'pyglet.font' has no attribute 'Text'"

OS : Ubuntu 18.04
PsychoPy version : 3.1.5

What specifically went wrong when you tried that?:
I am trying to run my experiment script, but it shows " File "

######## Running: /home/jiangtian/Documents/sense_judgement_lastrun.py #########
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
0.4475 WARNING sounddevice audio lib was requested but not loaded: sounddevice not working
0.5160 WARNING pyo audio lib was requested but not loaded: ModuleNotFoundError(“No module named ‘pyo’”,)
1.2117 WARNING Import Error: No module named ‘psychtoolbox’. Using event module for keyboard component.
2.9977 WARNING t of last frame was 2.75ms (=1/363)
3.0010 WARNING t of last frame was 3.32ms (=1/301)
3.0031 WARNING t of last frame was 2.16ms (=1/463)
3.0110 WARNING t of last frame was 2.42ms (=1/413)
3.0157 WARNING Multiple dropped frames have occurred - I’ll stop bothering you about them!
Traceback (most recent call last):
File “/home/jiangtian/Documents/sense_judgement_lastrun.py”, line 83, in
depth=0.0);
File “/home/jiangtian/.local/lib/python3.6/site-packages/psychopy/visual/text.py”, line 209, in init
self.setText(text, log=False)
File “/home/jiangtian/.local/lib/python3.6/site-packages/psychopy/visual/text.py”, line 354, in setText
setAttribute(self, ‘text’, text, log)
File “/home/jiangtian/.local/lib/python3.6/site-packages/psychopy/tools/attributetools.py”, line 141, in setAttribute
setattr(self, attrib, value)
File “/home/jiangtian/.local/lib/python3.6/site-packages/psychopy/tools/attributetools.py”, line 32, in set
newValue = self.func(obj, value)
File “/home/jiangtian/.local/lib/python3.6/site-packages/psychopy/visual/text.py”, line 345, in text
self._setTextShaders(text)
File “/home/jiangtian/.local/lib/python3.6/site-packages/psychopy/visual/text.py”, line 360, in _setTextShaders
self._pygletTextObj = pyglet.font.Text(
AttributeError: module ‘pyglet.font’ has no attribute ‘Text’
"

I fixed my problem. I installed the 1.4.1 version of pyglet. I deleted it and installed the 1.3.2 version which solved the problem