Sublime Forum

Sublime text 3 plugin use requests module

#1

Hey guys,

I’m having a problem with using python module requests, in my sublime plugin, for some reason when I import requests it founds module but there are no methods.

   requests.get(
AttributeError: 'module' object has no attribute 'get'

any ideas?

0 Likes

#2

Did added dependencies.json file? It contains the required libraries.
This should be the format of file

{
   "*": {
      "*": [
         "requests",
      ]
   }
}
0 Likes

#3

Yes, same as this one

0 Likes

#4

Is there a file/directory/module having the same name requests in your plugin so Python imported the wrong one?

0 Likes