domlysz / BlenderGIS

Blender addons to make the bridge between Blender and geographic data
GNU General Public License v3.0
7.63k stars 1.34k forks source link

Get SRTM button returns error #142

Closed Tilix4 closed 4 years ago

Tilix4 commented 5 years ago

Blender 2.79b / BlenderGIS commit : 1eb3346

For any tile, clicking Get SRTM returns :

Traceback (most recent call last):
  File "C:\Users\fdavid\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\BlenderGIS-master\operators\io_get_srtm.py", line 40, in invoke
    return self.execute(context)#context.window_manager.invoke_props_dialog(self)
  File "C:\Users\fdavid\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\BlenderGIS-master\operators\io_get_srtm.py", line 97, in execute
    with urlopen(rq) as response, open(filePath, 'wb') as outFile:
  File "C:\Program Files\Blender Foundation\Blender\2.79\python\lib\urllib\request.py", line 163, in urlopen
    return opener.open(url, data, timeout)
  File "C:\Program Files\Blender Foundation\Blender\2.79\python\lib\urllib\request.py", line 472, in open
    response = meth(req, response)
  File "C:\Program Files\Blender Foundation\Blender\2.79\python\lib\urllib\request.py", line 582, in http_response
    'http', request, response, code, msg, hdrs)
  File "C:\Program Files\Blender Foundation\Blender\2.79\python\lib\urllib\request.py", line 504, in error
    result = self._call_chain(*args)
  File "C:\Program Files\Blender Foundation\Blender\2.79\python\lib\urllib\request.py", line 444, in _call_chain
    result = func(*args)
  File "C:\Program Files\Blender Foundation\Blender\2.79\python\lib\urllib\request.py", line 696, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "C:\Program Files\Blender Foundation\Blender\2.79\python\lib\urllib\request.py", line 466, in open
    response = self._open(req, data)
  File "C:\Program Files\Blender Foundation\Blender\2.79\python\lib\urllib\request.py", line 484, in _open
    '_open', req)
  File "C:\Program Files\Blender Foundation\Blender\2.79\python\lib\urllib\request.py", line 444, in _call_chain
    result = func(*args)
  File "C:\Program Files\Blender Foundation\Blender\2.79\python\lib\urllib\request.py", line 1282, in http_open
    return self.do_open(http.client.HTTPConnection, req)
  File "C:\Program Files\Blender Foundation\Blender\2.79\python\lib\urllib\request.py", line 1257, in do_open
    r = h.getresponse()
  File "C:\Program Files\Blender Foundation\Blender\2.79\python\lib\http\client.py", line 1198, in getresponse
    response.begin()
  File "C:\Program Files\Blender Foundation\Blender\2.79\python\lib\http\client.py", line 297, in begin
    version, status, reason = self._read_status()
  File "C:\Program Files\Blender Foundation\Blender\2.79\python\lib\http\client.py", line 258, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "C:\Program Files\Blender Foundation\Blender\2.79\python\lib\socket.py", line 576, in readinto
    return self._sock.recv_into(b)
ConnectionResetError: [WinError 10054] Une connexion existante a dû être fermée par l’hôte distant

location: <unknown location>:-1
domlysz commented 5 years ago

Are you still encounter this issue?

Tilix4 commented 5 years ago

Yes. On two different computers.

rossoe commented 5 years ago

I am getting the same issue running on 2.8 version trying to use the Get SRTM feature -

srtm

Error in Blender debug console: ERROR:BlenderGIS-Blender28.operators.io_get_srtm:Http request fails url:http://opentopo.sdsc.edu/otr/getdem?demtypes=SRTMGL3&west=-1.4908599062984698&east=-1.48662786246088&south=-0.002050742663107441&north=0.002050742663107441&outputFormat=GTiff, code:500, error:Internal Server Error

Stripping the URL out - http://opentopo.sdsc.edu/otr/getdem?demtypes=SRTMGL3&west=-1.4908599062984698&east=-1.48662786246088&south=-0.002050742663107441&north=0.002050742663107441&outputFormat=GTiff and placing in browser returns a bit more debug info from Apache

domlysz commented 5 years ago

@rossoe please update the addon there is a typo in the url it's not demtypes but demtype (without s). Bad luck you have downloaded the addon between 22 and 23 march, a wrong commit from my side.

rossoe commented 5 years ago

yep that solved it thanks. One thing i'm noticing is that you can't get a sat image to layer over the SRTM mesh in 2.8 as per you see happening in the vid on 2.7 ver - https://raw.githubusercontent.com/wiki/domlysz/blenderGIS/Blender27x/images/srtm_demo.gif

I can get around it by placing the sat image down, then 'Get SRTM' - delete the sat image - then add sat image back in again selecting 'on mesh' when importing.

domlysz commented 5 years ago

It's possible to apply directly STRM to a sat image, make sure to select the plane mesh before push get srtm button, if you use basemaps then you must firstly export the maps to a new plane mesh by pressing E key (as explained in the quick start guide)

Rikssss commented 4 years ago

i'm having the same problem (can't use srtm feature) at the moment and don't know how to solve it...

domlysz commented 4 years ago

See #305