import http.client
def send(): conn = http.client.HTTPConnection("api.msg91.com") msg = " This is the test message i want to send though later it will be changed" my_list = msg.split() final_text = "%20".join(my_list) conn = http.client.HTTPConnection("api.msg91.com") conn.request("GET", "/api/sendhttp.php?sender=ELISHA&route=4&mobiles=MOBILENUMBER&authkey=API AUTH KEY&encrypt=&country=263&message={}".format(final_text)) res = conn.getresponse() data = res.read() data.decode("utf-8") The above is my control. so when i run the related view i get error below: Traceback (most recent call last): File "D:\web2py apps\web2py_win\web2py\gluon\restricted.py", line 219, in restricted exec(ccode, environment) File "D:/web2py apps/web2py_win/web2py/applications/welcome/controllers/default.py", line 8, in <module> import http.client File "D:\web2py apps\web2py_win\web2py\gluon\custom_import.py", line 104, in custom_importer raise ImportError(e1, import_tb) # there an import error in the module ImportError: (ImportError("Cannot import module 'applications.welcome.modules.http'",), <traceback object at 0x02FCE8F0>) On 27/02/2019, 黄祥 <steve.van.chris...@gmail.com> wrote: > perhaps you can share the code that reproduce an error and the traceback > error log > > best regards, > stifan > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.