pyglet error message, any advice

800 views
Skip to first unread message

Britt

unread,
Jun 25, 2013, 2:50:12 PM6/25/13
to psychop...@googlegroups.com
I searched in the archives and did not see a strictly similar case. Does anyone have a suggestion for what might be causing the following errors? Basically this error happens for all demos, and my own files. This is a new installation, and I have updated my video card driver and python libraries. The pyglet version is 1.1.4. Here is a minimal session with the error trace. Thank you, Britt Anderson


Python 2.7.5 (default, May 12 2013, 12:00:47)
[GCC 4.8.0 20130502 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from psychopy import visual
>>> mywin = visual.Window(size = (200,200))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/PsychoPy-1.77.01-py2.7.egg/psychopy/visual.py", line 308, in __init__
    elif self.winType == "pyglet": self._setupPyglet()
  File "/usr/lib/python2.7/site-packages/PsychoPy-1.77.01-py2.7.egg/psychopy/visual.py", line 948, in _setupPyglet
    config = GL.Config(depth_size=8, double_buffer=True,
  File "/usr/lib/python2.7/site-packages/pyglet/__init__.py", line 306, in __getattr__
    __import__(import_name)
  File "/usr/lib/python2.7/site-packages/pyglet/gl/__init__.py", line 510, in <module>
    import pyglet.window
  File "/usr/lib/python2.7/site-packages/pyglet/window/__init__.py", line 1684, in <module>
    gl._create_shadow_window()
  File "/usr/lib/python2.7/site-packages/pyglet/gl/__init__.py", line 494, in _create_shadow_window
    _shadow_window = Window(width=1, height=1, visible=False)
  File "/usr/lib/python2.7/site-packages/pyglet/window/xlib/__init__.py", line 474, in __init__
    super(XlibWindow, self).__init__(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pyglet/window/__init__.py", line 686, in __init__
    self._create()
  File "/usr/lib/python2.7/site-packages/pyglet/window/xlib/__init__.py", line 651, in _create
    self.set_caption(self._caption)
  File "/usr/lib/python2.7/site-packages/pyglet/window/xlib/__init__.py", line 822, in set_caption
    self._set_text_property('_NET_WM_NAME', caption)
  File "/usr/lib/python2.7/site-packages/pyglet/window/xlib/__init__.py", line 1065, in _set_text_property
    raise XlibException('Could not create UTF8 text property')
pyglet.window.xlib.XlibException: Could not create UTF8 text property

Jonathan Peirce

unread,
Jun 26, 2013, 5:01:14 AM6/26/13
to psychop...@googlegroups.com
I don't know the answer for this specific error message but pyglet does sometimes have trouble setting up its 'shadow window' (is this an Intel graphics card by any chance?). That can generally be worked around by not allowing it to create one.

Try beginning your script (before importing psychopy) with
import pyglet
pyglet.options['shadow_window']=False

Or
In your shell create an environment variable called PYGLET_SHADOW_WINDOW and set it to 0

see if that helps. The negative side-effects (if there are any) would be to do with having multiple windows open.
Jon
--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psychopy-user...@googlegroups.com.
To post to this group, send email to psychop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/psychopy-users/56d59928-af0c-4353-954d-38ff77e1f65a%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

-- 
Jonathan Peirce
Nottingham Visual Neuroscience

http://www.peirce.org.uk

This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.

This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.


Britt

unread,
Jun 27, 2013, 9:23:34 AM6/27/13
to psychop...@googlegroups.com
The problem turned out to be in the language settings on my linux system. Somehow, I am not sure how, I managed to set the language variables in my /etc/locale.conf to en_US_UTF.8 instead of en_US_UTF-8 *Note that the "-" was replaced by a ".". Resetting these variables correctly and rebooting fixed the problem. This will only be an issue for people who use Linux, and like me, fiddle with things they really do not understand.

As an aside, is there any way to edit, after the fact, the title of the posts to [SOLVED]... as I see on some forums?

Jonathan Peirce

unread,
Jul 2, 2013, 7:17:19 AM7/2/13
to psychop...@googlegroups.com


On 27/06/2013 14:23, Britt wrote:
The problem turned out to be in the language settings on my linux system. Somehow, I am not sure how, I managed to set the language variables in my /etc/locale.conf to en_US_UTF.8 instead of en_US_UTF-8 *Note that the "-" was replaced by a ".". Resetting these variables correctly and rebooting fixed the problem. This will only be an issue for people who use Linux, and like me, fiddle with things they really do not understand.

Glad that got worked out. Very strange that the problem exhibited itself in that way :-/

As an aside, is there any way to edit, after the fact, the title of the posts to [SOLVED]... as I see on some forums?

I don't think there's a way to do this post-hoc, but in this message I'm testing what happens when we add [SOLVED] to the subject line, to see if it shows up as a new thread or replaces the title of the previous.

cheers,
Jon


For more options, visit https://groups.google.com/groups/opt_out.
 
 

Johan van der Meer

unread,
Jun 15, 2018, 10:28:26 PM6/15/18
to psychopy-users

Hi!

I tried your solution to this problem to deal with another problem, illustrated here:

Left: "from psychopy import visual" gives this exception
Right: the exception is absent when I set the pyglet option first.

Does this look familiar?

Thanks
Best
Johan
Auto Generated Inline Image 1

Michael MacAskill

unread,
Jun 16, 2018, 12:31:28 AM6/16/18
to psychop...@googlegroups.com
Dear Johan,

This mailing list is deprecated. You would be best to raise this on the forum at <https://discourse.psychopy.org>

Regards,

Michael



> On 16/06/2018, at 14:28, Johan van der Meer <johanva...@gmail.com> wrote:
>
>
> Hi!
>
> I tried your solution to this problem to deal with another problem, illustrated here:
>
> <Auto Generated Inline Image 1.png>
Reply all
Reply to author
Forward
0 new messages