This thread is from 2013, pardon the resurrection.
-----
It comes up a lot on a Google search.
Instead of using the 'special://' protocol to get the path of the root folder of your plugin (it works anyway), there's a more direct way which is using xbmcaddon.Addon().getAddonInfo with 'path' as the property:
https://codedocs.xyz/xbmc/xbmc/group__py...3a8a4222fb
The folder it returns is already resolved (doesn't use the 'special://' protocol) and does not include the trailing slash, you need to add it, like:
python:
import os
import xbmcaddon
myFilePath = os.path.join(xbmcaddon.Addon().getAddonInfo('path'), 'myFile.xyz')
Or...
python:
from os import sep as osSeparator
import xbmcaddon
myFilePath = xbmcaddon.Addon().getAddonInfo('path') + osSeparator + 'myFile.xyz'
Note that getAddonInfo('profile') returns 'special://profile/addon_data/plugin.video.yourpluginname/' -- that is, it does include the trailing slash and uses 'special://'.
To resolve paths with the special protocol you need to use xbmc.translatePath(xbmcaddon.Addon().getAddonInfo('profile')).decode('utf-8').