Bug report #16028

Updated by Tom Kralidis almost 7 years ago

Trying out Metasearch here on current QGIS3 master, using the 'View search results as XML' give the error you see in the screenshot.



Probably something to do with python3 handling strings?



<pre>

TypeError: a bytes-like object is required, not 'str'

Traceback (most recent call last):

File "/home/richard/bin/qgis_all/master/debug/share/qgis/python/plugins/MetaSearch/dialogs/maindialog.py", line 807, in show_xml

request_html = highlight_xml(self.context, self.catalog.request)

File "/home/richard/bin/qgis_all/master/debug/share/qgis/python/plugins/MetaSearch/util.py", line 128, in highlight_xml

body = highlight(prettify_xml(xml), XmlLexer(), hformat)

File "/home/richard/bin/qgis_all/master/debug/share/qgis/python/plugins/MetaSearch/util.py", line 113, in prettify_xml

if xml.count('\

') > 5: # likely already pretty printed

TypeError: a bytes-like object is required, not 'str'

</pre>



Installed version: 0.3.4 (in /home/richard/bin/qgis_all/master/debug/share/qgis/python/plugins/MetaSearch)

Back