**** httplib.InvalidURL: nonnumeric port ****

Anurag Chourasia anurag.chourasia at gmail.com
Mon Dec 20 13:31:44 EST 2010


All,

When i try to open a URL of the form
http://joule:8041/DteEnLinea/ws/EnvioGuia.jws, I am getting an error as
below complaining for some non-numeric port.

wm (wmosds) [zibal] - /u01/home/apli/wm/app/gdd :>python
Python 2.4.1 (#2, May 30 2005, 09:40:30) [C] on aix5
Type "help", "copyright", "credits" or "license" for more information.
>>> import httplib, mimetypes
>>> h = httplib.HTTP('http://joule:8041/DteEnLinea/ws/EnvioGuia.jws')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/u01/home/apli/wm/python241/lib/python2.4/httplib.py", line 1093, in
__init__
    self._setup(self._connection_class(host, port, strict))
  File "/u01/home/apli/wm/python241/lib/python2.4/httplib.py", line 582, in
__init__
    self._set_hostport(host, port)
  File "/u01/home/apli/wm/python241/lib/python2.4/httplib.py", line 594, in
_set_hostport
    raise InvalidURL("nonnumeric port: '%s'" % host[i+1:])
httplib.InvalidURL: nonnumeric port: '8041/DteEnLinea/ws/EnvioGuia.jws'

How could we avoid this problem?

Regards,
Anurag
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20101221/14636894/attachment.html>


More information about the Python-list mailing list