Python 3 issue with script.common.plugin.cache
Linkinsoldier opened this issue · 3 comments
I have been trying to update my addon to Python 3 and ran into some issues with the common.plugin.cache addon:
File "C:\Users\name\AppData\Roaming\Kodi\addons\script.common.plugin.cache\lib\StorageServer.py", line 74, in init
if not self.xbmcvfs.exists(self.path.decode('utf8', 'ignore')):
AttributeError: 'str' object has no attribute 'decode'
can this be fixed?
@Linkinsoldier I gave the add-on some attention, and it should be python 2 and 3 compatible now. Can you try out: https://github.com/anxdpanic/script.common.plugin.cache/releases/tag/2.6.0-alpha1
Report issues to that repository as well, and I will work on getting them resolved.
Thank you - it looks better now, but when I try to use it I now get:
File "C:\Users\name\AppData\Roaming\Kodi\addons\script.common.plugin.cache\resources\lib\storage_server\StorageServer.py", line 573, in cacheFunction
name = self._generateKey(funct, *args)
File "C:\Users\name\AppData\Roaming\Kodi\addons\script.common.plugin.cache\resources\lib\storage_server\StorageServer.py", line 532, in _generateKey
keyhash.update(str(params))
TypeError: Unicode-objects must be encoded before hashing
-->End of Python script error report<--
@Linkinsoldier
That should be fixed now, I've posted the link anxdpanic/script.common.plugin.cache#14
Please follow up in that issue as well, going to close this issue as it's unrelated to the repository.