This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Python 3 cannot recognize url like:
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.1
Status: closed Resolution: duplicate
Dependencies: Superseder: urllib2 cannot handle https with proxy requiring auth
View: 7291
Assigned To: Nosy List: Jelly.Chen, flox
Priority: normal Keywords:

Created on 2010-02-22 15:58 by Jelly.Chen, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg99760 - (view) Author: Jelly Chen (Jelly.Chen) Date: 2010-02-22 15:58

blog = pyblog.WordPress(posturl, username, password)
content = {"description":'Test description6', "title":'Test article6'}
blog.new_post(content, blogid = "1") 

Traceback (most recent call last):
  File "C:\Python31\Lib\http\", line 664, in _set_hostport
    port = int(host[i+1:])
ValueError: invalid literal for int() with base 10: ''

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 248, in run_nodebug
  File "D:\Users\Documents\My Knowledge\Plugins\{A0D025CD-970A-4C62-97E4-5CF6F2C9DD6A}\", line 384, in <module>
    blog = pyblog.WordPress(posturl, username, password)
  File "D:\Users\Documents\My Knowledge\Plugins\{A0D025CD-970A-4C62-97E4-5CF6F2C9DD6A}\", line 266, in __init__
    MetaWeblog.__init__(self, serverapi, username, password, encoding)
  File "D:\Users\Documents\My Knowledge\Plugins\{A0D025CD-970A-4C62-97E4-5CF6F2C9DD6A}\", line 167, in __init__
    Blog.__init__(self, serverapi, username, password, encoding, appkey)
  File "D:\Users\Documents\My Knowledge\Plugins\{A0D025CD-970A-4C62-97E4-5CF6F2C9DD6A}\", line 57, in __init__
    if not checkURL(serverapi):
  File "D:\Users\Documents\My Knowledge\Plugins\{A0D025CD-970A-4C62-97E4-5CF6F2C9DD6A}\", line 19, in checkURL
    try: urllib.request.urlopen(url)
  File "C:\Python31\Lib\urllib\", line 119, in urlopen
    return, data, timeout)
  File "C:\Python31\Lib\urllib\", line 347, in open
    response = self._open(req, data)
  File "C:\Python31\Lib\urllib\", line 365, in _open
    '_open', req)
  File "C:\Python31\Lib\urllib\", line 325, in _call_chain
    result = func(*args)
  File "C:\Python31\Lib\urllib\", line 1080, in https_open
    return self.do_open(http.client.HTTPSConnection, req)
  File "C:\Python31\Lib\urllib\", line 1034, in do_open
    h = http_class(host, timeout=req.timeout) # will parse host:port
  File "C:\Python31\Lib\http\", line 1027, in __init__
    HTTPConnection.__init__(self, host, port, strict, timeout)
  File "C:\Python31\Lib\http\", line 650, in __init__
    self._set_hostport(host, port)
  File "C:\Python31\Lib\http\", line 666, in _set_hostport
    raise InvalidURL("nonnumeric port: '%s'" % host[i+1:])
http.client.InvalidURL: nonnumeric port: ''
msg99770 - (view) Author: Florent Xicluna (flox) * (Python committer) Date: 2010-02-22 16:13
It is a duplicate of #7291: it should be fixed in next release 3.1.2.
Date User Action Args
2022-04-11 14:56:57adminsetgithub: 52234
2010-02-22 16:13:43floxsetstatus: open -> closed

nosy: + flox
messages: + msg99770

superseder: urllib2 cannot handle https with proxy requiring auth
resolution: duplicate
2010-02-22 15:58:10Jelly.Chencreate