Sporadically experiencing: the url is not a valid metainfo reference
When I have a brand new nomad and I try to upload a schema and then to instantiate a template from it I got the following FAILURE in the generated json file.
If I keep uploading the same schema or others and then the same again, the error disappears. It is also not reproducible because it happens rarely. I also experienced it on the Beta Nomad on the web.
I also attach the schema file.
root":{
"errors":string"parser failed with exception"
"event":string"process failed"
"proc":string"Entry"
"process":string"process_entry_local"
"process_worker_id":string"z2yKdtb1RlaN_wMDXJaDtg"
"parser":string"parsers/archive"
"error":string"the url ../uploads/zjf2TgJQSDq2-Cl7D9EUEQ/raw/Einwaage-Substance.schema.archive.yaml is not a valid metainfo reference"
"step":string"parsers/archive"
"logger":string"nomad.processing"
"exception":string"Traceback (most recent call last): File "./nomad/processing/data.py", line 1089, in parsing parser.parse(self.mainfile_file.os_path, self._parser_results, logger=logger, **kwargs) File "./nomad/parsing/parser.py", line 348, in parse self.parse_file(mainfile, f, archive, logger) File "./nomad/parsing/parser.py", line 342, in parse_file archive.m_update_from_dict(archive_data) File "./nomad/datamodel/datamodel.py", line 681, in m_update_from_dict super().m_update_from_dict(dct) File "./nomad/metainfo/metainfo.py", line 2114, in m_update_from_dict sub_section = sub_section_def.sub_section.section_cls.m_from_dict(sub_section_value, m_parent=self, m_context=m_context) File "./nomad/metainfo/metainfo.py", line 2147, in m_from_dict return MSection.from_dict(data, cls=cls, **kwargs) File "./nomad/metainfo/metainfo.py", line 2181, in from_dict cls = m_def_proxy.section_cls File "./nomad/metainfo/metainfo.py", line 261, in __getattr__ if self.m_proxy_resolve() is not None: File "./nomad/metainfo/metainfo.py", line 256, in m_proxy_resolve self._set_resolved(self.m_proxy_type.resolve(self)) File "./nomad/metainfo/metainfo.py", line 680, in resolve context_section = context.resolve_archive_url(url.archive_url) File "./nomad/datamodel/context.py", line 223, in resolve_archive_url self.cache_archive(url, self.load_url(url)) File "./nomad/datamodel/context.py", line 211, in load_url installation_url, upload_id, kind, id_or_path = self._parse_url(url) File "./nomad/datamodel/context.py", line 201, in _parse_url raise MetainfoReferenceError(f'the url {url} is not a valid metainfo reference') nomad.metainfo.metainfo.MetainfoReferenceError: the url ../uploads/zjf2TgJQSDq2-Cl7D9EUEQ/raw/Einwaage-Substance.schema.archive.yaml is not a valid metainfo reference"
"timestamp":string"2022-08-31 14:16.53"
"level":string"ERROR"
}
Traceback (most recent call last):
File "./nomad/processing/data.py", line 1089, in parsing
parser.parse(self.mainfile_file.os_path, self._parser_results, logger=logger, **kwargs)
File "./nomad/parsing/parser.py", line 348, in parse
self.parse_file(mainfile, f, archive, logger)
File "./nomad/parsing/parser.py", line 342, in parse_file
archive.m_update_from_dict(archive_data)
File "./nomad/datamodel/datamodel.py", line 681, in m_update_from_dict
super().m_update_from_dict(dct)
File "./nomad/metainfo/metainfo.py", line 2114, in m_update_from_dict
sub_section = sub_section_def.sub_section.section_cls.m_from_dict(sub_section_value, m_parent=self, m_context=m_context)
File "./nomad/metainfo/metainfo.py", line 2147, in m_from_dict
return MSection.from_dict(data, cls=cls, **kwargs)
File "./nomad/metainfo/metainfo.py", line 2181, in from_dict
cls = m_def_proxy.section_cls
File "./nomad/metainfo/metainfo.py", line 261, in __getattr__
if self.m_proxy_resolve() is not None:
File "./nomad/metainfo/metainfo.py", line 256, in m_proxy_resolve
self._set_resolved(self.m_proxy_type.resolve(self))
File "./nomad/metainfo/metainfo.py", line 680, in resolve
context_section = context.resolve_archive_url(url.archive_url)
File "./nomad/datamodel/context.py", line 223, in resolve_archive_url
self.cache_archive(url, self.load_url(url))
File "./nomad/datamodel/context.py", line 211, in load_url
installation_url, upload_id, kind, id_or_path = self._parse_url(url)
File "./nomad/datamodel/context.py", line 201, in _parse_url
raise MetainfoReferenceError(f'the url {url} is not a valid metainfo reference')
nomad.metainfo.metainfo.MetainfoReferenceError: the url ../uploads/zjf2TgJQSDq2-Cl7D9EUEQ/raw/Einwaage-Substance.schema.archive.yaml is not a valid metainfo reference
definitions:
name: 'Substance entry 7'
sections:
Substance:
base_section: nomad.datamodel.data.EntryData
sub_sections:
SampleID:
section:
base_sections:
- 'nomad.datamodel.metainfo.eln.SampleID'
- 'nomad.datamodel.data.EntryData'
m_annotations:
template:
eln:
# hide: ['children', 'parents']
# hide: ['children', 'parents', institute]
hide: []
quantities:
comment:
type: str
m_annotations:
eln:
component: StringEditQuantity
name:
type: str
description: The name of the chemical that is typically used in literature
m_annotations:
eln:
component: StringEditQuantity
empirical_formula:
type: str
description: chemical formula
m_annotations:
eln:
component: StringEditQuantity
iupac_name:
type: str
description: the IUPAC nomenclature of the chemical
m_annotations:
eln:
component: StringEditQuantity
state_or_phase:
type: str
description: Phase of the chemical in the bottle
m_annotations:
eln:
component: StringEditQuantity
supplier:
type: str
description: Fabricating company
m_annotations:
eln:
component: StringEditQuantity
purity:
type: str
description: Purity of the Chemical
m_annotations:
eln:
component: StringEditQuantity
buying_date:
type: Datetime
description: Date of the Invoice Mail
m_annotations:
eln:
component: DateTimeEditQuantity
opening_date:
type: Datetime
description: Date of Opening the Chemical bottle in the Glove box
m_annotations:
eln:
component: DateTimeEditQuantity
cas_number:
type: str
description: CAS number
m_annotations:
eln:
component: StringEditQuantity
sku_number:
type: str
description: sku number
m_annotations:
eln: