• 1
  • 17
  • 18
  • 19(current)
  • 20
  • 21
  • 24
Beta Youtube Library
@scott967

thank you. Here you go: http://paste.ubuntu.com/26114177
Reply
I am also getting the error "cannot find module apiclient.discovery". I have youtube library installed already, but this error happens at startup and every time I try to watch a .strm that the addon created.

There are some recent German/Dutch threads with the same issue in a different addon:
https://kodi-forum.nl/threads/no-module-...very.5590/
https://www.kodinerds.net/index.php/Thre...-ausführen
https://github.com/robweber/xbmcbackup/issues/120

Apparently the problem is caused by an update to the google api, and so will affect everyone. 

As far as I can tell, apiclient was outdated/deprecated as far back as 2013 (https://stackoverflow.com/questions/1826...-discovery).
The fix may well be as simple as changing scripts' calls to apiclient to call googleapiclient instead.

Edit: Success!
There were two locations that needed changed:
(kodi addon path)/plugin.video.youtubelibrary/resources/lib/ytube.py
(kodi addon path)/plugin.video.youtubelibrary/resources/lib/youtubeapi/apiclient/__init__.py

In the first, I simply commented out line 24 and uncommented line 23, i.e.
python:
from googleapiclient.discovery import build
#from apiclient.discovery import build
Lines 23 and 24, not 1 and 2, obviously

In the second, I updated line 42:
python:
  sys.modules['googleapiclient.%s' % module_name] = module
Lines 42, not line 1

Deleted the corresponding .pyo files, restarted kodi, and youtubelibrary is working again.
Reply
Update:  posting across tofof's posts.  He's correct, also edit the __init__.py file.

tofof has it nailed.

Thanks for posting your log.  I could follow what was happening.

On my systems I have Kodi setting "notify of updates" so I don't get hit by pushed updates of modules.  I had script.module.googleapi 1.4.2 installed.  I manually updated to the current ver 1.6.4 and yup, the folder structure of that module was changed from "apiclient" to "googleapiclient".  The change was also pushed to oauth2client (which is what youtube uses to authenticate users).

A quick test confirms just changing youtubelibrary file ytube.py is enough to restore youtube library.  In fact that file is already setup so I guess the change was expected.  

In your kodi appdata find the addons folder and in there plugin.video.youtubelibrary/resources/lib/ytube.py

Open that file in text editor and remove the "#" from line 23 and add it in line 24 so those lines now look like:
Code:
from googleapiclient.discovery import build
#from apiclient.discovery import build

save your edits and you should be good to go until an updated gets released.

scott s.
.
Reply
wow, really nice!! That fixed it. It's working again. Thank you very much @tofof and @scott967  Smile
Reply
Thumbs Up 
(2017-12-05, 02:09)3000 Wrote: wow, really nice!! That fixed it. It's working again. Thank you very much @tofof and @scott967  Smile

+1 from me. Thanks guys
Reply
I am getting image cannot be created errors when updating a playlist...
Reply
Not very user friendly not being able to attach a log to this post...

13:38:59.417 T:10048   DEBUG: MICHS YoutubeLibrary:::::::: ERROR: Could not create file: 'smb://SERVER/Series/Bright Insight/folder.jpg'. Error message: ''module' object has no attribute 'getTempDir''
Reply
Upload the log to PasteBin.Com or a similar site and post the link they will give you here.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
I honestly tried to do just that and pastbin gave me an error... The line I posted is the relevant error.
Reply
Line 1407 of generators.py is this:

            target = os.path.join(os.path.getTempDir(), os.path.basename(filename))

Something about this code is wrong but I can't figure out exactly what
Reply
Yeah, i already expected the apiclient change, thats why that line was commented. Any way, its fixed now.
I also read some troubles with adding Musicvideo playlists, hopefully thats fixed now as well (alltho i gotta note that the whole musicvideo code needs to be reworked imho).
Someone asked for the option of only grabbing the last video, so there ya go.

3000, you posted a lot of questions. To answer one; resume playback is not supposed to work if you choose the official kodi YT addon for your playback. If you got more questions, try to put them orderly in one message and i will try to answer them. This goes for the rest as well Smile.
v0.9.9.1:

Code:
- Fixed deprecated googleapiclient dependency
- Added 1 to 'only grab X videos' option.
- Fixed lower of None error when adding musicvideos.
- Created fallback when poster of tv show is not found to just use the default.png instead of not playing the video at all.

Changes pushed, so everybody should get the update soon.

Strangly enough the notifications off this thread dont seem to come trough. I'll sort it out.
Author of Youtube Library | youtubelibrary.nl
YTLibrary lets you add yt channels / playlists to the Kodi Library as if it were tv shows, musicvideos or movies

Want to help?
-translations
-your config
-webhost costs (0%)
contact me
Reply
(2017-12-08, 00:41)wheemer Wrote: I honestly tried to do just that and pastbin gave me an error... The line I posted is the relevant error.

If the log is too big for PasteBin then try paste.ubuntu.com
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
Thanks Darren

I am getting image cannot be created errors when updating a playlist...

http://paste.ubuntu.com/26139929/
Reply
Also when I delete a playlist and say yes to delete files, it doesn't delete them.

http://paste.ubuntu.com/26140114/
Reply
(2017-12-08, 17:12)wheemer Wrote: Thanks Darren

I am getting image cannot be created errors when updating a playlist...

http://paste.ubuntu.com/26139929/
Can you replace generators.py with the following one: https://raw.githubusercontent.com/Sleute...erators.py .
Please tell me if that fixes your issue, cause if so, i will push it to the main branch.
Author of Youtube Library | youtubelibrary.nl
YTLibrary lets you add yt channels / playlists to the Kodi Library as if it were tv shows, musicvideos or movies

Want to help?
-translations
-your config
-webhost costs (0%)
contact me
Reply
  • 1
  • 17
  • 18
  • 19(current)
  • 20
  • 21
  • 24

Logout Mark Read Team Forum Stats Members Help
Youtube Library3