Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: module 'xbmc' has no attribute 'validatePath' #166

Closed
AnonTester opened this issue May 3, 2020 · 5 comments · Fixed by #167
Closed

AttributeError: module 'xbmc' has no attribute 'validatePath' #166

AnonTester opened this issue May 3, 2020 · 5 comments · Fixed by #167
Labels

Comments

@AnonTester
Copy link
Contributor

In latest Kodi 19, the validatePath function has been moved from xbmc to xbmcvfs resulting in an error.

See commit on 25/April/2020:
xbmc/xbmc@1b46f34

Error message Kodi (19.0-ALPHA1 Git:20200503-6e731c55b7). Platform: Linux x86 64-bit :

2020-05-03 15:54:16.905 T:13979   ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'AttributeError'>
                                                   Error Contents: module 'xbmc' has no attribute 'validatePath'
                                                   Traceback (most recent call last):
                                                     File "/home/kodi/.kodi/addons/script.xbmcbackup/service.py", line 4, in <module>
                                                       BackupScheduler().start()
                                                     File "/home/kodi/.kodi/addons/script.xbmcbackup/resources/lib/scheduler.py", line 48, in __init__
                                                       self.doScheduledBackup(progress_mode)
                                                     File "/home/kodi/.kodi/addons/script.xbmcbackup/resources/lib/scheduler.py", line 109, in doScheduledBackup
                                                       backup.backup(False)
                                                     File "/home/kodi/.kodi/addons/script.xbmcbackup/resources/lib/backup.py", line 137, in backup
                                                       allFiles.append(self._addBackupDir(aDir, selectedDirs[aDir]['root'], selectedDirs[aDir]['dirs']))
                                                     File "/home/kodi/.kodi/addons/script.xbmcbackup/resources/lib/backup.py", line 431, in _addBackupDir
                                                       fileManager.walk()
                                                     File "/home/kodi/.kodi/addons/script.xbmcbackup/resources/lib/backup.py", line 559, in walk
                                                       self.walkTree(xbmc.translatePath(aDir['path']), aDir['recurse'])
                                                     File "/home/kodi/.kodi/addons/script.xbmcbackup/resources/lib/backup.py", line 574, in walkTree
                                                       dirPath = xbmc.validatePath(xbmc.translatePath(directory + self.pathSep + aDir))
                                                   AttributeError: module 'xbmc' has no attribute 'validatePath'
                                                   -->End of Python script error report<--
                                                   
2020-05-03 15:54:17.797 T:13979    INFO <general>: Python interpreter stopped
@AnonTester AnonTester added the bug label May 3, 2020
@AnonTester
Copy link
Contributor Author

This is with script.xbmcbackup v1.6.2 installed just for the record.

@robweber
Copy link
Owner

robweber commented May 3, 2020

Do you have any reference (PR, etc) for this. According to the Python docs and the forum post regarding v19 API changes I don't see anything about moving that function. Haven't tested this myself yet but don't want to go down a rabbit hole for something I can't verify. Thanks.

@AnonTester
Copy link
Contributor Author

you mean like the official commit I referenced above ? :)

@robweber
Copy link
Owner

robweber commented May 3, 2020

Sorry - saw this via email and was focusing on the error. Yup exactly like that. Guess this was recent enough the docs didn't update just yet. Thanks for pointing this out. I'll have to get a nightly build and test it out.

@AnonTester
Copy link
Contributor Author

yeah, quite recent. not all docs have been updated yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants