lifning / python-retro

Python extensions for dealing with libretro
GNU Affero General Public License v3.0
12 stars 3 forks source link

Better error message if ffmpeg isn't available on the machine #19

Open vivlim opened 6 years ago

vivlim commented 6 years ago

Currently you get something like this

..
  File "C:\Users\vivvn\git\masto-retro-2\python-retro\py_retro\recording\ffmpeg_video.py", line 20, in __init__
    super().__init__(libpath, **kw)
  File "C:\Users\vivvn\git\masto-retro-2\python-retro\py_retro\interactive\pygame_video.py", line 37, in __init__
    super().__init__(libpath, **kw)
  File "C:\Users\vivvn\git\masto-retro-2\python-retro\py_retro\recording\wave_audio.py", line 18, in __init__
    super().__init__(libpath, **kw)
  File "C:\Users\vivvn\git\masto-retro-2\python-retro\py_retro\tas\til_input.py", line 116, in __init__
    super().__init__(libpath, **kw)
  File "C:\Users\vivvn\git\masto-retro-2\python-retro\py_retro\game_info_reader.py", line 57, in __init__
    super().__init__(libpath, **kw)
  File "C:\Users\vivvn\git\masto-retro-2\python-retro\py_retro\core.py", line 34, in __init__
    self.llw = LowLevelWrapper(libpath)
  File "C:\Users\vivvn\git\masto-retro-2\python-retro\py_retro\api\retro_functions.py", line 10, in __init__
    ctypes.CDLL.__init__(self, libpath)
  File "C:\Python36\lib\ctypes\__init__.py", line 348, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 is not a valid Win32 application
Exception ignored in: <bound method EmulatedSystem.__del__ of <common.TilStringRecorder object at 0x0000012A781CFB00>>
Traceback (most recent call last):
  File "C:\Users\vivvn\git\masto-retro-2\python-retro\py_retro\core.py", line 63, in __del__
    self.llw.deinit()
AttributeError: 'TilStringRecorder' object has no attribute 'llw'