enricofer / go2streetview

22 stars 22 forks source link

HTMLParser object has no attribute unescape #59

Closed PedroVenancio closed 2 years ago

PedroVenancio commented 3 years ago

After updating QGIS with the new OSGeo4W installer I get this error:

An error has occurred while executing Python code: 

AttributeError: 'HTMLParser' object has no attribute 'unescape' 
Traceback (most recent call last):
  File "C:/Users/PedroVenancio/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\go2streetview\go2streetview.py", line 909, in projectReadAction
    self.infoBoxManager.restoreIni()
  File "C:/Users/PedroVenancio/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\go2streetview\go2streetviewDialog.py", line 354, in restoreIni
    self.infoboxHtml.setPlainText(html_parser.unescape(self.infoBoxIni["infoBoxTemplate"]))
AttributeError: 'HTMLParser' object has no attribute 'unescape'

Python version: 3.9.0 (tags/v3.9.0:9cf6752, Oct  5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] 
QGIS version: 3.18.0-Zürich Zürich, 2d3150d0 

This is related to Python 3.9, that is now the default. Apparently unescape was removed.

enricofer commented 2 years ago

fixed by https://github.com/enricofer/go2streetview/commit/9c6646d76de8557de635c1ff6cc8b6638e0f5923 thanks for submission