[pypy-issue] Issue #2716: UnicodeEncodeError in PyPy3.5 v5.10 for Windows (pypy/pypy)

Leonardo issues-reply at bitbucket.org
Tue Dec 26 08:28:21 EST 2017


New issue 2716: UnicodeEncodeError in PyPy3.5 v5.10 for Windows
https://bitbucket.org/pypy/pypy/issues/2716/unicodeencodeerror-in-pypy35-v510-for

Leonardo:

Testing example game from Pyglet (ctypes).

```
#!python


PS C:\examples> .\pypy3-v5.10.0-win32\pypy3.exe .\game\version5\asteroid.py
Traceback (most recent call last):
  File "C:\examples\pypy3-v5.10.0-win32\site-packages\pyglet\lib.py", line 137, in load_library
    lib = ctypes.cdll.LoadLibrary(name)
  File "C:\examples\pypy3-v5.10.0-win32\lib-python\3\ctypes\__init__.py", line 431, in LoadLibrary
    return self._dlltype(name)
  File "C:\examples\pypy3-v5.10.0-win32\lib-python\3\ctypes\__init__.py", line 349, in __init__
    pypy_dll = _ffi.CDLL(name, mode)
OSError: Cannot load library avbin: N\ufffdo foi poss\ufffdvel encontrar o m\ufffddulo especificado

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File ".\game\version5\asteroid.py", line 2, in <module>
    from game import asteroid, load, player, resources
  File "C:\examples\game\version5\game\__init__.py", line 1, in <module>
    from . import load, player, resources
  File "C:\examples\game\version5\game\load.py", line 3, in <module>
    from . import asteroid, resources, util
  File "C:\examples\game\version5\game\asteroid.py", line 2, in <module>
    from . import physicalobject, resources
  File "C:\examples\game\version5\game\resources.py", line 32, in <module>
    bullet_sound = pyglet.resource.media("bullet.wav", streaming=False)
  File "C:\examples\pypy3-v5.10.0-win32\site-packages\pyglet\resource.py", line 655, in media
    return media.load(path, streaming=streaming)
  File "C:\examples\pypy3-v5.10.0-win32\site-packages\pyglet\media\sources\loader.py", line 63, in load
    source = get_source_loader().load(filename, file)
  File "C:\examples\pypy3-v5.10.0-win32\site-packages\pyglet\media\sources\loader.py", line 93, in get_source_loader
    if have_avbin():
  File "C:\examples\pypy3-v5.10.0-win32\site-packages\pyglet\media\sources\loader.py", line 114, in have_avbin
    from .avbin import AVbinSource
  File "C:\examples\pypy3-v5.10.0-win32\site-packages\pyglet\media\sources\avbin.py", line 64, in <module>
    av = pyglet.lib.load_library(av)
  File "C:\examples\pypy3-v5.10.0-win32\site-packages\pyglet\lib.py", line 145, in load_library
    print("Unexpected error loading library %s: %s" % (name, str(o)))
  File "C:\examples\pypy3-v5.10.0-win32\lib-python\3\encodings\cp850.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_map)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\ufffd' in position 68: character maps to <undefined>
PS C:\examples>
```




More information about the pypy-issue mailing list