los-cocos / cocos

graphic library for games and multimedia, for python language on PC-like hardware
http://los-cocos.github.io/cocos-site/
Other
633 stars 147 forks source link

SDL not imported in timer.py #316

Open Daniel-Chin opened 5 years ago

Daniel-Chin commented 5 years ago

in cocos\audio\SDL\timer.py, Line 145: raise SDL.error.SDL_Exception(SDL.error.SDL_GetError()) It uses the SDL module. But the SDL module is not imported in the file.

For me, simply adding import cocos.audio.SDL as SDL at the beginning of the file solves the problem.