After installing the addon script Metadata Editor version 3.0.1 from the Kodi.tv repo v20. The error message (screenshot below) that: module 'xmbc' has no attribute 'translate Path'. and that if ignored it may lead to memory leaks.
A quick google revealed a earlier post by camelreef, who had a possible solution to investigate.
Official FranceTV add-on bug in LE11 nightly - AttributeError: module 'xbmc' has no attribute 'translatePath'
The official FranceTV add-on hs a typical bug these days:
(Code, 10 lines)
Simple (simplistic?) fix: in
(Code, 1 line)
add, where the existing imports are:
(Code, 1 line)
and, line 65, change
(Code, 1 line)
to
(Code, 1 line)
I'm a rusty coder, so that change may not be the best. It's what works for me after Googling for the error I was getting.
His suggestion is that:
was depreciated and the module xbmcvfs should now be used:
I then applied this reasoning to the Metadata Editor Addon, version 3.0.1.
The error message that was generated highlights the problem as being located in the:
File"/storage/.kodi/addons/script.metadat.editor/resources/lib/helper.py",line 27,
so I changed the line from:
ADDON_DATA_PATH = os.path.join(xbmc.translatePath("special://profile/addon_data/%s" % ADDON_ID))
to
ADDON_DATA_PATH = os.path.join(xbmcvfs.translatePath("special://profile/addon_data/%s" % ADDON_ID))
I did not have to use camelreef's additional advice to add:
... to the top of the helper.py file, as it was already listed there.
Then saved the file. rebooted and... amazing... no error message: and no more warnings about Memory leaks .
I then tested the Metadata Editor Addon by editing some artist and album .nfo files direct from within the kodi browser, all seems correct.
Am I right in assuming that this is a transitioning problem between different versions of Kodi?
translatePath is no longer a function of the xmbc module and now apart of the xmbcvfs module?
LE nightly-20220727-fcc8f2f Rk3328.arm
Z28pro 4GB
Bossanova's Confluence skin (with user mods)
Below is a screenshot of the original error message.