/opt/conda/lib/python3.9/site-packages/traitlets/traitlets.py in notify_change(self, change)
1515 def notify_change(self, change):
1516 """Notify observers of a change event"""
-> 1517 return self._notify_observers(change)
1518
1519 def _notify_observers(self, event):
/opt/conda/lib/python3.9/site-packages/traitlets/traitlets.py in _notify_observers(self, event)
1562 c = getattr(self, c.name)
1563
-> 1564 c(event)
1565
1566 def _add_notifiers(self, handler, name, type):
/opt/conda/lib/python3.9/site-packages/aiidalab_qe/app/configuration/advanced/pseudos/pseudos.py in _on_file_upload(self, change)
378 # the pseudo_filename is set
379 with self.hold_trait_notifications():
--> 380 self.pseudo = UpfData(io.BytesIO(content), filename=filename)
381 self.pseudo.store()
382
/opt/conda/lib/python3.9/site-packages/aiida/orm/nodes/data/singlefile.py in __init__(self, file, filename, **kwargs)
52
53 if file is not None:
---> 54 self.set_file(file, filename=filename)
55
56 @property
/opt/conda/lib/python3.9/site-packages/aiida_pseudo/data/pseudo/upf.py in set_file(self, source, filename, **kwargs)
86 source.seek(0)
87 content = source.read().decode('utf-8')
---> 88 self.element = parse_element(content)
89 self.z_valence = parse_z_valence(content)
90
/opt/conda/lib/python3.9/site-packages/aiida_pseudo/data/pseudo/upf.py in parse_element(content)
28 return match.group('element')
29
---> 30 raise ValueError(f'could not parse the element from the UPF content: {content}')
31
32
ValueError: could not parse the element from the UPF content: Not Found
Automated report
This bug happens when I upload a custom UPF.
Expected behavior (here I have only one chemical element, gold, to discuss if what I write should be the same in general for multiple elements).
Additional comments (optional):
This is by following the basic in-app tutorial for Gold and trying to change pseudo to a file uploaded.
Attachments
Traceback
/opt/conda/lib/python3.9/site-packages/traitlets/traitlets.py in notify_change(self, change) 1515 def notify_change(self, change): 1516 """Notify observers of a change event""" -> 1517 return self._notify_observers(change) 1518 1519 def _notify_observers(self, event): /opt/conda/lib/python3.9/site-packages/traitlets/traitlets.py in _notify_observers(self, event) 1562 c = getattr(self, c.name) 1563 -> 1564 c(event) 1565 1566 def _add_notifiers(self, handler, name, type): /opt/conda/lib/python3.9/site-packages/aiidalab_qe/app/configuration/advanced/pseudos/pseudos.py in _on_file_upload(self, change) 378 # the pseudo_filename is set 379 with self.hold_trait_notifications(): --> 380 self.pseudo = UpfData(io.BytesIO(content), filename=filename) 381 self.pseudo.store() 382 /opt/conda/lib/python3.9/site-packages/aiida/orm/nodes/data/singlefile.py in __init__(self, file, filename, **kwargs) 52 53 if file is not None: ---> 54 self.set_file(file, filename=filename) 55 56 @property /opt/conda/lib/python3.9/site-packages/aiida_pseudo/data/pseudo/upf.py in set_file(self, source, filename, **kwargs) 86 source.seek(0) 87 content = source.read().decode('utf-8') ---> 88 self.element = parse_element(content) 89 self.z_valence = parse_z_valence(content) 90 /opt/conda/lib/python3.9/site-packages/aiida_pseudo/data/pseudo/upf.py in parse_element(content) 28 return match.group('element') 29 ---> 30 raise ValueError(f'could not parse the element from the UPF content: {content}') 31 32 ValueError: could not parse the element from the UPF content: Not FoundEnvironment fingerprint
By submitting this issue I confirm that I am aware that this information can
potentially be used to determine what kind of calculation was performed at the
time of error.