Closed GoogleCodeExporter closed 9 years ago
[deleted comment]
Hi, I had a similar error messages with pyglet.resource.media('any.mp3')
Probably this is str/bytes problem on Python3.
Some avbin_functions accept ctypes.c_char_p, which is compatible only with
bytes object.
Quick and dirty solution is adding following code to pyglet/media/avbin.py,
between line 188 and 189
args = (e.encode() if isinstance(e, str) else e for e in args)
This code encodes all str objects passed to avbin_function to utf-8 bytes
objects.
Works fine even with non-ascii filenames on ArchLinux x86_64; CPython 3.2;
Pyglet rev 625e1e191389
Sorry for my poor english.
Hidesato Ikeya
Original comment by bombomba...@gmail.com
on 11 Nov 2011 at 1:01
I made a patch using pyglet/compat.py
Works fine on ArchLinux x86_64; CPython 3.2; Pyglet rev 625e1e191389
Original comment by bombomba...@gmail.com
on 12 Nov 2011 at 4:04
Attachments:
Thanks for your patch, it's now applied in rev 62e91545b98e
Original comment by andreas....@gmail.com
on 11 Mar 2012 at 3:07
Original issue reported on code.google.com by
t.steinr...@gmail.com
on 13 Sep 2011 at 12:01