[GRASS-dev] [GRASS GIS] #3324: Better error message if v.in.wfs fails during networking

GRASS GIS trac at osgeo.org
Fri Mar 31 01:09:26 PDT 2017


#3324: Better error message if v.in.wfs fails during networking
-------------------------+-------------------------
 Reporter:  marisn       |      Owner:  grass-dev@…
     Type:  enhancement  |     Status:  new
 Priority:  minor        |  Milestone:  7.4.0
Component:  Vector       |    Version:  svn-trunk
 Keywords:  v.in.wfs     |        CPU:  Unspecified
 Platform:  Unspecified  |
-------------------------+-------------------------
 An example from #1586:

 {{{
 v.in.wfs url=http://www2.dmsolutions.ca/cgi-bin/mswfs_gmap 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):
   File
 "E:\OSGeo4W\apps\grass\grass-7.3.svn/scripts/v.in.wfs.py",
 line 154, in <module>
     main()
   File
 "E:\OSGeo4W\apps\grass\grass-7.3.svn/scripts/v.in.wfs.py",
 line 123, in main
     inf = urlopen(wfs_url)
   File "E:\OSGeo4W\apps\Python27\lib\urllib.py", line 87, in
 urlopen
     return opener.open(url)
   File "E:\OSGeo4W\apps\Python27\lib\urllib.py", line 208,
 in open
     return getattr(self, name)(url)
   File "E:\OSGeo4W\apps\Python27\lib\urllib.py", line 345,
 in open_http
     h.endheaders(data)
   File "E:\OSGeo4W\apps\Python27\lib\httplib.py", line 969,
 in endheaders
     self._send_output(message_body)
   File "E:\OSGeo4W\apps\Python27\lib\httplib.py", line 829,
 in _send_output
     self.send(msg)
   File "E:\OSGeo4W\apps\Python27\lib\httplib.py", line 791,
 in send
     self.connect()
   File "E:\OSGeo4W\apps\Python27\lib\httplib.py", line 772,
 in connect
     self.timeout, self.source_address)
   File "E:\OSGeo4W\apps\Python27\lib\socket.py", line 553,
 in create_connection
     for res in getaddrinfo(host, port, 0, SOCK_STREAM):
 IOError: [Errno socket error] [Errno 11001] getaddrinfo
 failed
 }}}

 Traceback should be replaced with more meaningfull error message.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3324>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list