Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#3324 closed enhancement (fixed)

Better error message if fails during networking

Reported by: marisn Owned by: grass-dev@…
Priority: minor Milestone: 7.4.0
Component: Vector Version: svn-trunk
Keywords: Cc:
CPU: Unspecified Platform: Unspecified


An example from #1586: url= output=parks

will fail as there is no DNS entry for the FQDN. Still such error is not reported by an error message but by a traceback:

Retrieving data...
Traceback (most recent call last):
line 154, in <module>
line 123, in main
    inf = urlopen(wfs_url)
  File "E:\OSGeo4W\apps\Python27\lib\", line 87, in
  File "E:\OSGeo4W\apps\Python27\lib\", line 208,
in open
    return getattr(self, name)(url)
  File "E:\OSGeo4W\apps\Python27\lib\", line 345,
in open_http
  File "E:\OSGeo4W\apps\Python27\lib\", line 969,
in endheaders
  File "E:\OSGeo4W\apps\Python27\lib\", line 829,
in _send_output
  File "E:\OSGeo4W\apps\Python27\lib\", line 791,
in send
  File "E:\OSGeo4W\apps\Python27\lib\", line 772,
in connect
    self.timeout, self.source_address)
  File "E:\OSGeo4W\apps\Python27\lib\", line 553,
in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
IOError: [Errno socket error] [Errno 11001] getaddrinfo

Traceback should be replaced with more meaningfull error message.

Change History (4)

comment:1 by marisn, 7 years ago

Resolution: fixed
Status: newclosed

In 70823:

Move WFS import to urllib2 to provide better error messages. Fixes #3324

comment:2 by neteler, 7 years ago

.. we don't want this fix in 7.2.x?

in reply to:  2 comment:3 by marisn, 7 years ago

Replying to neteler:

.. we don't want this fix in 7.2.x?

Although we can backport a lot of things, is it necessary?

I added this one and few others to a list of potential backports for 7.2.2:

comment:4 by neteler, 6 years ago

In 71153: Move WFS import to urllib2 to provide better error messages. Fixes #3324 (trunk, r70823)

Note: See TracTickets for help on using tickets.