Author fertig
Recipients fertig, orsenthil, pitrou, r.david.murray
Date 2012-10-05.13:18:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1349443104.4.0.165927375982.issue16109@psf.upfronthosting.co.za>
In-reply-to
Content
python3 example, not working on both machines (3.2.1 on openSuSE 12.1 and 3.1.3 on openSuSE 11.4)

fertig@wespe:/home/fertig > python3
Error in sitecustomize; set PYTHONVERBOSE for traceback:
SyntaxError: invalid syntax (sitecustomize.py, line 89)
Python 3.2.1 (default, Jul 18 2011, 16:24:40) [GCC] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import http.client
>>> import urllib.request
>>> http.client.HTTPConnection.debuglevel = 1
>>> request = urllib.request.urlopen('https://172.23.6.222')
send: b'GET / HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: 172.23.6.222\r\nConnection: close\r\nUser-Agent: Python-urllib/3.2\r\n\r\n'
reply: 'HTTP/1.1 400 Bad Request\r\n'
header: Date header: Server Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python3.2/urllib/request.py", line 138, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib64/python3.2/urllib/request.py", line 375, in open
    response = meth(req, response)
  File "/usr/lib64/python3.2/urllib/request.py", line 487, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib64/python3.2/urllib/request.py", line 413, in error
    return self._call_chain(*args)
  File "/usr/lib64/python3.2/urllib/request.py", line 347, in _call_chain
    result = func(*args)
  File "/usr/lib64/python3.2/urllib/request.py", line 495, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 400: Bad Request
>>> request = urllib.request.urlopen('https://172.23.6.222')
send: b'GET / HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: 172.23.6.222\r\nConnection: close\r\nUser-Agent: Python-urllib/3.2\r\n\r\n'
reply: 'HTTP/1.1 405 Method Not Allowed\r\n'
header: Date header: Server header: Connection Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python3.2/urllib/request.py", line 138, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib64/python3.2/urllib/request.py", line 375, in open
    response = meth(req, response)
  File "/usr/lib64/python3.2/urllib/request.py", line 487, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib64/python3.2/urllib/request.py", line 413, in error
    return self._call_chain(*args)
  File "/usr/lib64/python3.2/urllib/request.py", line 347, in _call_chain
    result = func(*args)
  File "/usr/lib64/python3.2/urllib/request.py", line 495, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 405: Method Not Allowed
History
Date User Action Args
2012-10-05 13:18:24fertigsetrecipients: + fertig, orsenthil, pitrou, r.david.murray
2012-10-05 13:18:24fertigsetmessageid: <1349443104.4.0.165927375982.issue16109@psf.upfronthosting.co.za>
2012-10-05 13:18:24fertiglinkissue16109 messages
2012-10-05 13:18:23fertigcreate