dsgoficial/DsgTools

Erro ao carregar camadas auxiliares do BDGEx

jpesperidiao opened this issue · 1 comments

Subject of the issue (Assunto do problema)

Conforme informado por email pelo @dinizime, quando se tenta carregar uma camada WFS do BDGEx dentro da categoria "Camada auxiliares", um erro ocorre.

IndexError: list index out of range
Traceback (most recent call last):
File "~QGIS3\profiles\default/python/plugins\DsgTools\gui\BDGExTools\bdgexGuiManager.py", line 352, in loadServiceLayer
urlWithParams = self.BDGExRequestHandler.get_url_string(service, layerList, serviceType)
File "~QGIS3\profiles\default/python/plugins\DsgTools\core\NetworkTools\BDGExRequestHandler.py", line 127, in get_url_string
self.availableServicesDict[service]['services'][serviceType] = self.getCapabilitiesDict(service, url, service_type=serviceType)
File "~QGIS3\profiles\default/python/plugins\DsgTools\core\NetworkTools\BDGExRequestHandler.py", line 148, in getCapabilitiesDict
return self.parse_wfs_capabilities(myDom)
File "~QGIS3\profiles\default/python/plugins\DsgTools\core\NetworkTools\BDGExRequestHandler.py", line 214, in parse_wfs_capabilities
epsg = node.getElementsByTagName('DefaultSRS')[0].childNodes[0].nodeValue
IndexError: list index out of range

Your environment (Seu ambiente)

  • your operating system (Seu sistema operacional): Kubuntu 18.04
  • version of QGIS (Versão do QGIS): 3.16 / 3.17
  • version of DSGTools (Versão do DSGTools): 4.2_dev / 4.1

Steps to reproduce (Passos para reproduzir)

Tell us how to reproduce this issue. Please provide screenshots to further information. (Descreva os passos para reproduzir o problema. Por favor informe capturas de tela para informaçes adicionais)

  1. Ir no menu do DSGTools;
  2. clicar em BDGEx;
  3. ir no campo Informações auxiliares; e
  4. carregar uma das camadas de WFS.

Expected behaviour (Comportamento esperado)

Carregar a camada solicitada.

Actual behaviour (Comportamento atual)

Erro descrito.

Resolvido no PR #564