Beta Advanced MAME Launcher - MAME frontend for Kodi
(2020-08-09, 01:37)Dax9 Wrote: AML 0.9.12 gets this error with MAME 0.223 when running All in One in Setup Plugin:

...

Changing line 1448 in disk_IO.py from this:
return hashlib.md5(prop_key).hexdigest()
to this:
return hashlib.md5(prop_key.encode('utf-8')).hexdigest()
will avoid the error, although I do not know if this is a valid fix.

Thanks for reporting @Dax9 Yes, that fix is valid. I am now converting AML from Python 2 into Python 3 and I did the same fix because Python 3 is more strict about encoding handling. By the way, I think the Python 3 version of AML will be finished within a week. I will release 0.10.0 for Kodi Leia and Python 2 and 1.0.0 for Kodi Matrix and Python 3.

If you like the technicalities, prop_key is a Unicode string (Python 2) or str (Python 3). Before calculating the MD5 hash the Unicode must be encoded to a binary string (str in Python 2, bytes in Python 3). By default Python uses the ASCII encoder. However, if the Unicode string has non-ASCII characters then the encoder raises the exception. By changing the encoder from ASCII to another one that supports the non-ASCII character the problem is solved. UFT-8 supports every character there is so it's the preferred encoding format in 2020, although many legacy codecs are still in existence due to compatibility issues with old software, etc.
Reply


Messages In This Thread
RE: Advanced MAME Launcher - MAME frontend for Kodi - by Wintermute0110 - 2020-08-11, 06:53


Logout Mark Read Team Forum Stats Members Help
Advanced MAME Launcher - MAME frontend for Kodi2
This forum uses Lukasz Tkacz MyBB addons.