Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Executing Python Code #5118

Open
2 tasks
ronybayu opened this issue Oct 9, 2022 · 1 comment
Open
2 tasks

Error Executing Python Code #5118

ronybayu opened this issue Oct 9, 2022 · 1 comment

Comments

@ronybayu
Copy link

ronybayu commented Oct 9, 2022

Problem

An error has occurred while executing Python code:
TypeError: _serialize_xml() got an unexpected keyword argument 'short_empty_elements' 
Traceback (most recent call last):
  File "C:\Users/Thinkpad/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\inasafe\safe\gui\tools\wizard\wizard_dialog.py", line 649, in on_pbnNext_released
    self.save_current_keywords()
  File "C:\Users/Thinkpad/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\inasafe\safe\gui\tools\wizard\wizard_dialog.py", line 858, in save_current_keywords
    self.keyword_io.write_keywords(
  File "C:\Users/Thinkpad/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\inasafe\safe\utilities\keyword_io.py", line 105, in write_keywords
    write_iso19115_metadata(source, keywords)
  File "C:\Users/Thinkpad/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\inasafe\safe\utilities\metadata.py", line 176, in write_iso19115_metadata
    metadata.write_to_file(xml_file_path)
  File "C:\Users/Thinkpad/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\inasafe\safe\metadata\base_metadata.py", line 595, in write_to_file
    metadata = self.get_writable_metadata(file_format)
  File "C:\Users/Thinkpad/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\inasafe\safe\metadata\base_metadata.py", line 637, in get_writable_metadata
    metadata = self.xml
  File "C:\Users/Thinkpad/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\inasafe\safe\metadata\generic_layer_metadata.py", line 81, in xml
    return prettify_xml(ElementTree.tostring(root))
  File "C:\BMKG\qgis\apps\Python39\lib\xml\etree\ElementTree.py", line 1109, in tostring
    ElementTree(element).write(stream, encoding,
  File "C:\BMKG\qgis\apps\Python39\lib\xml\etree\ElementTree.py", line 748, in write
    serialize(write, self._root, qnames, namespaces,
TypeError: _serialize_xml() got an unexpected keyword argument 'short_empty_elements'


Python version: 3.9.5 (tags/v3.9.5:0a7dcbd, May  3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] 
QGIS version: 3.26.3-Buenos Aires Buenos Aires, 65e4edfdada 


Expected Behaviour

Environment

  • InaSAFE : 5.0.5
  • QGIS : 3.26.3 Buenos Aires
  • OS :
  • Data used :
    • Exposure :
    • Hazard :
    • Aggregation :
    • Extent :

Checklist:

  • Did you try to run it in debug mode ?
  • Is the data available ?
    • If yes, where (BTSync, data.inasafe.org, zip) ?

Proposed Solution

@devinjohnson1986
Copy link

I am having the same exact issue when attempting to execute the Keyword Creation Wizard. Any guidance on how to troubleshoot this issue would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants