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
Hi @Jessica Bourgin ,
Thanks for reporting this! 👍️ Can you provide a few more details so that we can narrow the issue down?
— Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!