Error: module 'xmbc' has no attribute 'translate Path' when installing Addon Metadata Editor version 3.0.1

  • 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.

    His suggestion is that:

    Code
    xmbc.translate path

    was depreciated and the module xbmcvfs should now be used:

    Code
    xmbcvfs.translate path

    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:

    Code
    ADDON_DATA_PATH = os.path.join(xbmc.translatePath("special://profile/addon_data/%s" % ADDON_ID))

    to

    Code
    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:

    Code
    import xbmcvfs

    ... 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.