Request Library Import Issue - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +---- Forum: JSON-RPC (https://forum.kodi.tv/forumdisplay.php?fid=174) +---- Thread: Request Library Import Issue (/showthread.php?tid=314267) |
Request Library Import Issue - NeoNator - 2017-05-13 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! RE: Request Library Import Issue - MetalChris - 2017-05-13 Is the requests module installed on your system? If not: script.module.requests-2.12.4.zip RE: Request Library Import Issue - Lunatixz - 2017-05-13 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__python__xbmc.html#gacbdcb8982550fbbe24c7b79ed84ed846 Sent from my SM-G935T RE: Request Library Import Issue - NeoNator - 2017-05-13 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 (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. Yep i am trying to access LAN response, not local RE: Request Library Import Issue - NeoNator - 2017-05-13 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 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? RE: Request Library Import Issue - MetalChris - 2017-05-13 (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. RE: Request Library Import Issue - NeoNator - 2017-05-14 That was it! thanks mate really appreciate it!!! RE: Request Library Import Issue - MetalChris - 2017-05-14 Excellent! Keep us posted with your progress. |