Bug: Gui crashes when emptying quantity field
Hey Nomad,
if i make a editquanitity empty again it breaks:
ERROR nomad.processing 2023-02-24T21:33:52 process failed
- exception: Traceback (most recent call last):
File "/home/a2853/Documents/Projects/nomad/nomad-FAIR/nomad/processing/data.py", line 1155, in parsing
parser.parse(self.mainfile_file.os_path, self._parser_results, logger=logger, **kwargs)
File "/home/a2853/Documents/Projects/nomad/nomad-FAIR/nomad/parsing/parser.py", line 484, in parse
self.parse_file(mainfile, f, archive, logger)
File "/home/a2853/Documents/Projects/nomad/nomad-FAIR/nomad/parsing/parser.py", line 478, in parse_file
archive.m_update_from_dict(archive_data)
File "/home/a2853/Documents/Projects/nomad/nomad-FAIR/nomad/datamodel/datamodel.py", line 937, in m_update_from_dict
super().m_update_from_dict(dct)
File "/home/a2853/Documents/Projects/nomad/nomad-FAIR/nomad/metainfo/metainfo.py", line 2208, in m_update_from_dict
sub_section_value, m_parent=self, m_context=m_context)
File "/home/a2853/Documents/Projects/nomad/nomad-FAIR/nomad/metainfo/metainfo.py", line 2248, in m_from_dict
return MSection.from_dict(data, cls=cls, **kwargs)
File "/home/a2853/Documents/Projects/nomad/nomad-FAIR/nomad/metainfo/metainfo.py", line 2313, in from_dict
section.m_update_from_dict(dct)
File "/home/a2853/Documents/Projects/nomad/nomad-FAIR/nomad/metainfo/metainfo.py", line 2208, in m_update_from_dict
sub_section_value, m_parent=self, m_context=m_context)
File "/home/a2853/Documents/Projects/nomad/nomad-FAIR/nomad/metainfo/metainfo.py", line 2248, in m_from_dict
return MSection.from_dict(data, cls=cls, **kwargs)
File "/home/a2853/Documents/Projects/nomad/nomad-FAIR/nomad/metainfo/metainfo.py", line 2313, in from_dict
section.m_update_from_dict(dct)
File "/home/a2853/Documents/Projects/nomad/nomad-FAIR/nomad/metainfo/metainfo.py", line 2234, in m_update_from_dict
section.__dict__[property_def.name] = self.__deserialize(section, quantity_def, quantity_value)
File "/home/a2853/Documents/Projects/nomad/nomad-FAIR/nomad/metainfo/metainfo.py", line 2165, in __deserialize
return tgt_type(quantity_value)
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
- exception_hash: XWv0-WBM9gZDFAH2y1_hPJcfECQ0
- nomad.commit:
- nomad.deployment: devel
- nomad.entry_id: zKFPUKjiUeIT9gshEOnpZ2U_JSc4
- nomad.mainfile: sample.archive.json
- nomad.processing.error: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
- nomad.processing.errors: parser failed with exception
- nomad.processing.logger: nomad.processing
- nomad.processing.parser: parsers/archive
- nomad.processing.proc: Entry
- nomad.processing.process: process_entry_local
- nomad.processing.process_status: RUNNING
- nomad.processing.process_worker_id: Z-GGvhFYR5estUBzgZY8sA
- nomad.processing.step: parsers/archive
- nomad.service: app
- nomad.upload_id: jNIJKiLTSRy4aQfbFOmA3Q
- nomad.version: 1.1.7.dev368+g21f8058a2.d20230224
simplescreenrecorder-2023-02-24_22.38.35
Best Micha
part of #1493 (closed)
Edited by Mohammad Nakhaee