The urllib service doesnot work anymore.
In later version works.

Sample code:

import urllib, urllib2, re, time
www_tekst = www.read()

I get this now:

------Traceback (most recent call last):  File string, line 2, in module  File C:\Myrobotlab\myrobotlab\myrobotlab.jar\Lib\urllib.py, line 86, in urlopen  File C:\Myrobotlab\myrobotlab\myrobotlab.jar\Lib\urllib.py, line 207, in open  File C:\Myrobotlab\myrobotlab\myrobotlab.jar\Lib\urllib.py, line 344, in open_http  File C:\Myrobotlab\myrobotlab\myrobotlab.jar\Lib\httplib.py, line 997, in endheaders  File C:\Myrobotlab\myrobotlab\myrobotlab.jar\Lib\httplib.py, line 850, in _send_output  File C:\Myrobotlab\myrobotlab\myrobotlab.jar\Lib\httplib.py, line 812, in send  File C:\Myrobotlab\myrobotlab\myrobotlab.jar\Lib\httplib.py, line 792, in connect  File C:\Myrobotlab\myrobotlab\myrobotlab.jar\Lib\_socket.py, line 1505, in create_connectionIOError: [Errno socket error] error(-1, uUnmapped exception: java.util.concurrent.RejectedExecutionException: event executor terminated) at org.python.core.PyException.doRaise(PyException.java:198) at org.python.core.Py.makeException(Py.java:1337) at urllib$py.open$14(C:\Myrobotlab\myrobotlab\myrobotlab.jar\Lib\urllib.py:211) at urllib$py.call_function(C:\Myrobotlab\myrobotlab\myrobotlab.jar\Lib\urllib.py) at org.python.core.PyTableCode.call(PyTableCode.java:167) at org.python.core.PyBaseCode.call(PyBaseCode.java:307) at org.python.core.PyBaseCode.call(PyBaseCode.java:145) at org.python.core.PyFunction.__call__(PyFunction.java:423) at org.python.core.PyMethod.__call__(PyMethod.java:141) at urllib$py.urlopen$3(C:\Myrobotlab\myrobotlab\myrobotlab.jar\Lib\urllib.py:88) at urllib$py.call_function(C:\Myrobotlab\myrobotlab\myrobotlab.jar\Lib\urllib.py) at org.python.core.PyTableCode.call(PyTableCode.java:167) at org.python.core.PyBaseCode.call(PyBaseCode.java:307) at org.python.core.PyBaseCode.call(PyBaseCode.java:131) at org.python.core.PyFunction.__call__(PyFunction.java:413) at org.python.pycode._pyx74.f$0(string:3) at org.python.pycode._pyx74.call_function(string) at org.python.core.PyTableCode.call(PyTableCode.java:167) at org.python.core.PyCode.call(PyCode.java:18) at org.python.core.Py.runCode(Py.java:1386) at org.python.core.Py.exec(Py.java:1430) at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:267) at org.myrobotlab.service.Python$PIThread.run(Python.java:161)------
 

 

GroG

7 years 12 months ago

The root cause is the site you are visiting - 

www = urllib.urlopen('http://www.meteoprog.pl/pl/weather/Blonie/')

This redirects to a https site - and my system is not happy with it either ...

General SSLEngine problem (javax.net.ssl.SSLHandshakeException: General SSLEngine problem

Could possibly have to do with the root CA is not trusted (on my machine at least)

For example, if I go to a non HTTPS site it appears to work fine...  There is probably a HTTP weather site out there somewhere.

bartcam

7 years 11 months ago

You are right, the http: works, https not work. This might be the problem. Leter version of the site I'm working with is http , now its https. Ok, I must look for http site. Thank You.