2021-01-01, 07:26
Hi Wintermute, Happy New Year.
With MAME 0.227 just released, I installed AML 0.10.0 on Kodi 18.9. AML gave this error when trying to parse mameinfo.dat 0.227:
After resolving the error, Setup completed successfully and AML 0.10.0 launches ROMs with MAME 0.227 just fine.
With MAME 0.227 just released, I installed AML 0.10.0 on Kodi 18.9. AML gave this error when trying to parse mameinfo.dat 0.227:
I got around the error by changing line 1177 of mame.py from this:python:2020-12-31 21:33:27.084 T:5564 NOTICE: AML INFO : mame_load_MameInfo_DAT() Parsing "C:\EMU\MAME\ini\mameinfo.dat"
2020-12-31 21:33:27.559 T:5564 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.UnicodeDecodeError'>
Error Contents: 'utf8' codec can't decode byte 0xc5 in position 2351: invalid continuation byte
Traceback (most recent call last):
File "C:\Users\HTPC\AppData\Roaming\Kodi\addons\plugin.program.AML\addon.py", line 38, in <module>
resources.main.run_plugin(sys.argv)
File "C:\Users\HTPC\AppData\Roaming\Kodi\addons\plugin.program.AML\resources\main.py", line 436, in run_plugin
command_context_setup_plugin(cfg)
File "C:\Users\HTPC\AppData\Roaming\Kodi\addons\plugin.program.AML\resources\main.py", line 5925, in command_context_setup_plugin
db_dic = mame_build_MAME_main_database(cfg, st_dic)
File "C:\Users\HTPC\AppData\Roaming\Kodi\addons\plugin.program.AML\resources\mame.py", line 4174, in mame_build_MAME_main_database
(mameinfo_idx_dic, mameinfo_dic, mameinfo_version) = mame_load_MameInfo_DAT(MAMEINFO_FN.getPath())
File "C:\Users\HTPC\AppData\Roaming\Kodi\addons\plugin.program.AML\resources\mame.py", line 1181, in mame_load_MameInfo_DAT
for file_line in f:
File "C:\Program Files (x86)\Kodi\system\python\Lib\codecs.py", line 314, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xc5 in position 2351: invalid continuation byte
-->End of Python script error report<--
to this:python:f = io.open(filename, 'rt', encoding = 'utf-8')
MASH's mameinfo.dat and INI files are in Windows-1252 encoding, although only mameinfo.dat is causing an error.python:f = io.open(filename, 'rt', encoding = 'windows-1252')
After resolving the error, Setup completed successfully and AML 0.10.0 launches ROMs with MAME 0.227 just fine.