2015-10-27, 23:22
I've been using the googleapi in my addon. But I've read its best if my addon does not keep its own copy of the google api, but includes script.module.googleapi.
When including this line in my addon.xml:
And adding to my script, results in the following error:
How should I include script.module.googleapi? As far as I can see, I've included everything as the documentation says.
When including this line in my addon.xml:
Code:
<import addon="script.module.googleapi" version="1.4.0"/>
And adding
Code:
from apiclient.discovery import build
Code:
22:10:41 T:5244 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.ImportError'>
Error Contents: No module named oauth2client
Traceback (most recent call last):
File "C:\Users\Mich\AppData\Roaming\Kodi\addons\plugin.video.youtubelibrary\addon.py", line 52, in <module>
from resources.lib import ytube
File "C:\Users\Mich\AppData\Roaming\Kodi\addons\plugin.video.youtubelibrary\resources\lib\ytube.py", line 22, in <module>
from apiclient.discovery import build
File "C:\Users\Mich\AppData\Roaming\Kodi\addons\script.module.googleapi\lib\apiclient\discovery.py", line 53, in <module>
from apiclient.errors import HttpError
File "C:\Users\Mich\AppData\Roaming\Kodi\addons\script.module.googleapi\lib\apiclient\errors.py", line 26, in <module>
from oauth2client import util
ImportError: No module named oauth2client
-->End of Python script error report<--
How should I include script.module.googleapi? As far as I can see, I've included everything as the documentation says.