Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Sampler : pygame error when trying to open file with special characters in path

Hi,

I just wanted to report a bug:

When trying to load a sound file using sampler plugin, I got a pygame.error : the file could not be opened due to special characters (accents) present in the path.

I checked the Lib/site-packages/openexp/_sampler/legacy.py file and went to block starting line 88:

if not py3 and isinstance(src, str):
    import sys
    src = src.encode(misc.filesystem_encoding())

I use OpenSesame 3.3.12 with Python 3.7.6 so I changed this line so that encoding is done regardless of Python version:

if isinstance(src, str):
    import sys
    src = src.encode(misc.filesystem_encoding())

This way, it worked.

So I guess encoding needs to be done for Python3 as well?

Best regards,

Jessica

Comments

Sign In or Register to comment.