Take the 2-minute tour ×

I'm trying to import the python module, requests, into XBMC.

I downloaded the zip of the module from github and placed the requests folder into the resources/lib folder of my XBMC addon.

I then renamed the folder to script.module.requests and added import requests to the top of my addon.py

I keep getting a no module named requests error in my XBMC.log.

I'm a total noob when it comes to this.

Please help!


share|improve this question
add comment

1 Answer

first, import requests when your folder is called script.module.requests won't match

second, you probably need to add the init control files to the resources and lib folders so the script can find the module (and do a import resources.lib.requests) or add the folder to your path, like this:

sys.path.append (xbmc.translatePath( os.path.join( os.getcwd(), 'resources', 'lib' ) ))

third, there's this pack: https://github.com/beenje/script.module.requests which you would then just add it to the requires section in your addon.xml file, but then, I'm also puzzled on how XBMC would find it in case the user has not the pack already installed...

share|improve this answer
If you create a repository addon you can list the github requests addon and the addon you create in it and xbmc will find the requests library via the custom repository, see wiki.xbmc.org/index.php?title=Add-on_repositories. –  Othrayte Sep 27 '13 at 13:57
add comment

Your Answer


