File Loading
Closed this issue · 2 comments
Hi,
just_playback works flawlessly in nearly all instances.
I have come across a problem recently though.
Whenever I try to load a music file containing "special" characters (eg a single quote or some Korean characters) I get the following error message:
raise MiniaudioError(MA_RESULT_STR[ma_res])
just_playback.ma_result.MiniaudioError: MA_DOES_NOT_EXIST
Any idea?
Thanks in advance.
Olivier
Hi Olivier,
Could you post the filename you're having trouble with? just_playback uses utf-8 encoding and should be able to handle Korean characters. Maybe the path to your audio file is invalid ??
I just tried a file named '블랙 비틀즈.mp3', Korean for 'black beatles.mp3'. It works
Weird, I also have this issue. I input this path: C:\Users\user\Desktop 2\action-builder\input\Justice - Justice - Waters Of Nazareth - † (Official Audio).mp3
When I remove the unicode character (the cross) the error disappears. For my use case I have to remove unicode characters anyway but it's strange regardless...
Traceback (most recent call last):
File "C:\Users\user\Desktop 2\action-builder\main.py", line 102, in <module>
main()
File "C:\Users\user\Desktop 2\action-builder\main.py", line 43, in main
c_ui.render(width=w.value, height=h.value, mx=mx.value, my=my.value, buttonstate=sdl2.ext.mouse.ButtonState(button_state))
File "C:\Users\user\Desktop 2\action-builder\ui.py", line 287, in render
self.draw_top_segment()
File "C:\Users\user\Desktop 2\action-builder\ui.py", line 198, in draw_top_segment
self.draw_music_list()
File "C:\Users\user\Desktop 2\action-builder\ui.py", line 190, in draw_music_list
self.music = music_player(key)
^^^^^^^^^^^^^^^^^
File "C:\Users\user\Desktop 2\action-builder\ui.py", line 32, in __init__
self.playback.load_file(path)
File "C:\Users\user\scoop\apps\python\3.11.1\Lib\site-packages\just_playback\playback.py", line 53, in load_file
self.__bind(lib.load_file(self.__ma_attrs, path_to_file.encode('utf-8')))
File "C:\Users\user\scoop\apps\python\3.11.1\Lib\site-packages\just_playback\playback.py", line 235, in __bind
raise MiniaudioError(MA_RESULT_STR[ma_res])
just_playback.ma_result.MiniaudioError: MA_DOES_NOT_EXIST