Leonel, this string works from a browser (http://ipinfo.io/8.8.8.8/json) so your sample is very close to working, but am getting an error. Also, is word supposed to be "load" or "loads" or doesn't matter?
<class 'urllib2.URLError'> <urlopen error [Errno 10061] No connection could be made because the target machine actively refused it>Versionweb2py™Version 2.12.2-stable+timestamp.2015.08.09.14.29.44PythonPython 2.7.9: C:\alex\alt_web2py\web2py\web2py.exe (prefix: C:\Python27)Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. Traceback (most recent call last): File "C:\alex\alt_web2py\web2py\gluon\restricted.py", line 227, in restricted exec ccode in environment File "C:/alex/alt_web2py/web2py/applications/ES1/controllers/default.py" <http://127.0.0.1:8000/admin/default/edit/ES1/controllers/default.py>, line 5824, in <module> File "C:\alex\alt_web2py\web2py\gluon\globals.py", line 412, in <lambda> self._caller = lambda f: f() File "C:\alex\alt_web2py\web2py\gluon\tools.py", line 3769, in f return action(*a, **b) File "C:/alex/alt_web2py/web2py/applications/ES1/controllers/default.py" <http://127.0.0.1:8000/admin/default/edit/ES1/controllers/default.py>, line 5770, in locate_me location_data = json.loads(fetch('http://ipinfo.io/%s/json' % request.client)) File "C:\alex\alt_web2py\web2py\gluon\tools.py", line 4749, in fetch html = urllib2.urlopen(req).read() File "urllib2.py", line 154, in urlopen File "urllib2.py", line 431, in open File "urllib2.py", line 449, in _open File "urllib2.py", line 409, in _call_chain File "urllib2.py", line 1227, in http_open File "urllib2.py", line 1197, in do_open URLError: <urlopen error [Errno 10061] No connection could be made because the target machine actively refused it> Error snapshot [image: help] <http://127.0.0.1:8000/admin/default/ticket/ES1/127.0.0.1.2015-09-30.12-51-34.8fd00e5e-ab6a-45ad-ac6c-cc4a5d333520#> <class 'urllib2.URLError'>(<urlopen error [Errno 10061] No connection could be made because the target machine actively refused it>) -- 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.