Hey everyone.
I’m trying to creating a TextBox2, but it doesn’t work.
I’m using this:
TextBox2(win, text=letter, font='Segoe UI', pos=(0, 0), units=None, letterHeight=None, color=(1.0,1.0,1.0), borderWidth=2, borderColor=None)
But in the Terminal of Spyder show this:
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
C:\Users\--\anaconda3\envs\Proyecto\lib\site-packages\pyglet\media\codecs\wmf.py:838: UserWarning: [WinError -2147417850] No se puede cambiar el modo de subproceso después de establecerlo
warnings.warn(str(err))
C:\Users\--\anaconda3\envs\Proyecto\lib\site-packages\pyglet\image\codecs\wic.py:292: UserWarning: [WinError -2147417850] No se puede cambiar el modo de subproceso después de establecerlo
warnings.warn(str(err))
Traceback (most recent call last):
File "C:\Users\....", line 78, in <module>
borde = psychopy.visual.TextBox2(win, text=letter, font='Segoe UI', pos=(0, 0), units=None, letterHeight=None, color=(1.0,1.0,1.0), borderWidth=2, borderColor=None)
File "C:\Users\--\anaconda3\envs\Proyecto\lib\site-packages\psychopy\visual\textbox2\textbox2.py", line 204, in __init__
self.pallette = { # If no focus
File "C:\Users\--\anaconda3\envs\Proyecto\lib\site-packages\psychopy\visual\textbox2\textbox2.py", line 240, in pallette
pal['lineRGB'] = pal['lineColor'] = [max(c - 0.05, 0.05) for c in self.win.color]
File "C:\Users\--\anaconda3\envs\Proyecto\lib\site-packages\psychopy\visual\textbox2\textbox2.py", line 240, in <listcomp>
pal['lineRGB'] = pal['lineColor'] = [max(c - 0.05, 0.05) for c in self.win.color]
TypeError: unsupported operand type(s) for -: 'str' and 'float'
Is something related in the pallette atribute of the class TextBox2.
I don’t know why I can’t use the normal TextBox…
And I’ve changed all the values, I just put the first code as an example.
I hope that you can help me guys, and sorry for my english.