You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. I'm a new user of cocos2d and I find the API awesome. I haven't completely mastered cocos2d or Python, but I think I've found a possible bug. I tried to play a music in the my Menu Scene but I got the following error message:
File "/usr/local/lib/python3.8/dist-packages/cocos/director.py", line 379, in run
self._set_scene(scene)
File "/usr/local/lib/python3.8/dist-packages/cocos/director.py", line 513, in _set_scene
scene.on_enter()
File "/usr/local/lib/python3.8/dist-packages/cocos/scene.py", line 91, in on_enter
cocos.audio.music.control.load(self.music)
File "/usr/local/lib/python3.8/dist-packages/cocos/audio/music.py", line 50, in load
pygame.music.load(filename)
NameError: name 'pygame' is not defined
It appears to be an import issue, so I went to the file and edited it so that it imported the package correctly, but I got the following:
File "/usr/local/lib/python3.8/dist-packages/cocos/director.py", line 379, in run
self._set_scene(scene)
File "/usr/local/lib/python3.8/dist-packages/cocos/director.py", line 513, in _set_scene
scene.on_enter()
File "/usr/local/lib/python3.8/dist-packages/cocos/scene.py", line 91, in on_enter
cocos.audio.music.control.load(self.music)
File "/usr/local/lib/python3.8/dist-packages/cocos/audio/music.py", line 50, in load
cocos.audio.pygame.music.load(filename)
File "/usr/local/lib/python3.8/dist-packages/cocos/audio/pygame/music.py", line 86, in load
_current_music = Mix_LoadMUS(filename)
File "/usr/local/lib/python3.8/dist-packages/cocos/audio/SDL/dll.py", line 241, in _f
result = func(*args, **kwargs)
ctypes.ArgumentError: argument 1: <class 'TypeError'>: wrong type
I tried with an mp3 file and with a wav file. Pyglet option doesn't work either, but without any error message. I hope to be helping and I want to contribute to the project in the future, if possible. If this is not a bug, feel free to delete the post.
The text was updated successfully, but these errors were encountered:
Hi. I'm a new user of cocos2d and I find the API awesome. I haven't completely mastered cocos2d or Python, but I think I've found a possible bug. I tried to play a music in the my Menu Scene but I got the following error message:
File "/usr/local/lib/python3.8/dist-packages/cocos/director.py", line 379, in run
self._set_scene(scene)
File "/usr/local/lib/python3.8/dist-packages/cocos/director.py", line 513, in _set_scene
scene.on_enter()
File "/usr/local/lib/python3.8/dist-packages/cocos/scene.py", line 91, in on_enter
cocos.audio.music.control.load(self.music)
File "/usr/local/lib/python3.8/dist-packages/cocos/audio/music.py", line 50, in load
pygame.music.load(filename)
NameError: name 'pygame' is not defined
It appears to be an import issue, so I went to the file and edited it so that it imported the package correctly, but I got the following:
File "/usr/local/lib/python3.8/dist-packages/cocos/director.py", line 379, in run
self._set_scene(scene)
File "/usr/local/lib/python3.8/dist-packages/cocos/director.py", line 513, in _set_scene
scene.on_enter()
File "/usr/local/lib/python3.8/dist-packages/cocos/scene.py", line 91, in on_enter
cocos.audio.music.control.load(self.music)
File "/usr/local/lib/python3.8/dist-packages/cocos/audio/music.py", line 50, in load
cocos.audio.pygame.music.load(filename)
File "/usr/local/lib/python3.8/dist-packages/cocos/audio/pygame/music.py", line 86, in load
_current_music = Mix_LoadMUS(filename)
File "/usr/local/lib/python3.8/dist-packages/cocos/audio/SDL/dll.py", line 241, in _f
result = func(*args, **kwargs)
ctypes.ArgumentError: argument 1: <class 'TypeError'>: wrong type
I tried with an mp3 file and with a wav file. Pyglet option doesn't work either, but without any error message. I hope to be helping and I want to contribute to the project in the future, if possible. If this is not a bug, feel free to delete the post.
The text was updated successfully, but these errors were encountered: