Request Library Import Issue
#1
Hi

Im attempting to use some JSON commands in a kodi app im playing with but most examples use the requests library. But if i try to import the library ("import requests") it breaks my code.. So i think ive just missed something important somewhere could someone point me in the right direction for getting this working?

Thanks! Big Grin
Reply
#2
Is the requests module installed on your system? If not: script.module.requests-2.12.4.zip
Kodi Nexus on Dell Optiplex 980 Lubuntu 22.04 | Kodi Nexus on HTPC Lubuntu 20.04 | My Add-ons | Legacy Repo | Matrix Repo
>>>>> Newest MetalChris Addons: NEWSnet | NHL Radio | Weather Unlocked
Reply
#3
If you are trying to access a json response from a local Kodi instance use Kodi's API, request modules only needed to access LAN response.

https://codedocs.xyz/xbmc/xbmc/group__py...9ed84ed846

Sent from my SM-G935T
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#4
Thanks for the responses!

(2017-05-13, 04:24)MetalChris Wrote: Is the requests module installed on your system? If not: script.module.requests-2.12.4.zip

See i thought it should be installed as it is listed here "http://kodi.wiki/view/Category:Add-on_libraries/modules" how do i check if its installed?

(2017-05-13, 04:24)MetalChris Wrote: If not: script.module.requests-2.12.4.zip

And if i find its not installed how do i go about installing this? Sorry im real noob with this kodi stuff Tongue

(2017-05-13, 05:07)Lunatixz Wrote: If you are trying to access a json response from a local Kodi instance use Kodi's API, request modules only needed to access LAN response.

https://codedocs.xyz/xbmc/xbmc/group__py...9ed84ed846

Sent from my SM-G935T (typie typie)

Yep i am trying to access LAN response, not local Sad
Reply
#5
Ok so after a bit more searching i found this thread:

http://forum.kodi.tv/showthread.php?tid=263922

in which sounds like someone having the same issue as me. So after following this i added into script.module.requests-2.12.4 into \Kodi\addons

script.module.requests

added to addon.xml

<import addon="script.module.requests" version="2.12.4"/>

in addon.py

import requests


but i still get an error Sad am i putting the lib in the correct spot? In the kodi addon settings i've allowed from unknown sources, is there something else i should be doing?
Reply
#6
(2017-05-13, 12:48)NeoNator Wrote: So after following this i added into script.module.requests-2.12.4 into \Kodi\addons

You can no longer simply drop a folder into the addons directory. You'll need to install from zip.
Kodi Nexus on Dell Optiplex 980 Lubuntu 22.04 | Kodi Nexus on HTPC Lubuntu 20.04 | My Add-ons | Legacy Repo | Matrix Repo
>>>>> Newest MetalChris Addons: NEWSnet | NHL Radio | Weather Unlocked
Reply
#7
That was it! thanks mate really appreciate it!!!
Reply
#8
Excellent! Keep us posted with your progress.
Kodi Nexus on Dell Optiplex 980 Lubuntu 22.04 | Kodi Nexus on HTPC Lubuntu 20.04 | My Add-ons | Legacy Repo | Matrix Repo
>>>>> Newest MetalChris Addons: NEWSnet | NHL Radio | Weather Unlocked
Reply

Logout Mark Read Team Forum Stats Members Help
Request Library Import Issue0