Solved Requests vs. Requests2 - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26) +--- Thread: Solved Requests vs. Requests2 (/showthread.php?tid=186724) |
Requests vs. Requests2 - pkscout - 2014-02-18 I'm trying to use the newer Requests2 module, but I don't understand how to call it to make sure I'm using it instead of Requests (if that exists on the person's system). In my addon.xml I have: Code: <import addon="script.module.requests2" version="2.2.1"/> Which does download script.module.requests2 properly. But if I try: Code: import requests2 I get an error saying that the module requests2 doesn't exist. If I do: Code: import requests It works fine. OK, but what happens if someone has both script.module.requests and script.module.requests2 on their system? Which one will get used? Basically until I figure this out the Artist Slideshow in the repo is broken. RE: Requests vs. Requests2 - Martijn - 2014-02-18 it should be "import requests2" as the folder inside it is also named like that RE: Requests vs. Requests2 - pkscout - 2014-02-18 Thanks. Oddly, the copy of script.module.requests2 on my systems had lib/requests instead of lib/requests2. I downloaded a fresh copy and that seems to have fixed things. |