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

IV_temp example error #503

Open
sanbrock opened this issue Jan 8, 2025 · 3 comments
Open

IV_temp example error #503

sanbrock opened this issue Jan 8, 2025 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@sanbrock
Copy link
Collaborator

sanbrock commented Jan 8, 2025

Traceback (most recent call last):
  File "/home/sanya/work/FAIRmat/NOMAD2/nomad/nomad/metainfo/metainfo.py", line 2093, in items
    yield name, serialize_full(quantity, self.__dict__[name])
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sanya/work/FAIRmat/NOMAD2/nomad/nomad/metainfo/metainfo.py", line 2014, in serialize_full
    if a_result := serialize_attributes(
                   ^^^^^^^^^^^^^^^^^^^^^
  File "/home/sanya/work/FAIRmat/NOMAD2/nomad/nomad/metainfo/metainfo.py", line 1997, in serialize_attributes
    attr_def = resolve_variadic_name(all_attr, attr_key)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sanya/work/FAIRmat/NOMAD2/nomad/nomad/metainfo/util.py", line 373, in resolve_variadic_name
    raise ValueError(f'Cannot find a proper definition for name "{name}".')
ValueError: Cannot find a proper definition for name "nx_data_mean".

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/sanya/work/FAIRmat/NOMAD2/nomad/nomad/processing/base.py", line 991, in proc_task
    rv = unwrapped_func(proc, *args, **kwargs)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sanya/work/FAIRmat/NOMAD2/nomad/nomad/processing/data.py", line 1267, in process_entry
    self._process_entry_local()
  File "/home/sanya/work/FAIRmat/NOMAD2/nomad/nomad/processing/data.py", line 1364, in _process_entry_local
    entry.archiving()
  File "/home/sanya/work/FAIRmat/NOMAD2/nomad/nomad/processing/data.py", line 1598, in archiving
    archive_size = self.write_archive(self._parser_results)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sanya/work/FAIRmat/NOMAD2/nomad/nomad/processing/data.py", line 1643, in write_archive
    archive.m_to_dict(
  File "/home/sanya/work/FAIRmat/NOMAD2/nomad/nomad/metainfo/metainfo.py", line 2127, in m_to_dict
    return {key: value for key, value in items()}
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sanya/work/FAIRmat/NOMAD2/nomad/nomad/metainfo/metainfo.py", line 2127, in <dictcomp>
    return {key: value for key, value in items()}
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sanya/work/FAIRmat/NOMAD2/nomad/nomad/metainfo/metainfo.py", line 2125, in items
    yield name, sub_section.m_to_dict(**kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sanya/work/FAIRmat/NOMAD2/nomad/nomad/metainfo/metainfo.py", line 2127, in m_to_dict
    return {key: value for key, value in items()}
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sanya/work/FAIRmat/NOMAD2/nomad/nomad/metainfo/metainfo.py", line 2127, in <dictcomp>
    return {key: value for key, value in items()}
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sanya/work/FAIRmat/NOMAD2/nomad/nomad/metainfo/metainfo.py", line 2125, in items
    yield name, sub_section.m_to_dict(**kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sanya/work/FAIRmat/NOMAD2/nomad/nomad/metainfo/metainfo.py", line 2127, in m_to_dict
    return {key: value for key, value in items()}
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sanya/work/FAIRmat/NOMAD2/nomad/nomad/metainfo/metainfo.py", line 2127, in <dictcomp>
    return {key: value for key, value in items()}
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sanya/work/FAIRmat/NOMAD2/nomad/nomad/metainfo/metainfo.py", line 2117, in items
    serialised_list: list = [
                            ^
  File "/home/sanya/work/FAIRmat/NOMAD2/nomad/nomad/metainfo/metainfo.py", line 2118, in <listcomp>
    None if item is None else item.m_to_dict(**kwargs)
                              ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sanya/work/FAIRmat/NOMAD2/nomad/nomad/metainfo/metainfo.py", line 2127, in m_to_dict
    return {key: value for key, value in items()}
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sanya/work/FAIRmat/NOMAD2/nomad/nomad/metainfo/metainfo.py", line 2127, in <dictcomp>
    return {key: value for key, value in items()}
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sanya/work/FAIRmat/NOMAD2/nomad/nomad/metainfo/metainfo.py", line 2117, in items
    serialised_list: list = [
                            ^
  File "/home/sanya/work/FAIRmat/NOMAD2/nomad/nomad/metainfo/metainfo.py", line 2118, in <listcomp>
    None if item is None else item.m_to_dict(**kwargs)
                              ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sanya/work/FAIRmat/NOMAD2/nomad/nomad/metainfo/metainfo.py", line 2127, in m_to_dict
    return {key: value for key, value in items()}
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sanya/work/FAIRmat/NOMAD2/nomad/nomad/metainfo/metainfo.py", line 2127, in <dictcomp>
    return {key: value for key, value in items()}
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sanya/work/FAIRmat/NOMAD2/nomad/nomad/metainfo/metainfo.py", line 2117, in items
    serialised_list: list = [
                            ^
  File "/home/sanya/work/FAIRmat/NOMAD2/nomad/nomad/metainfo/metainfo.py", line 2118, in <listcomp>
    None if item is None else item.m_to_dict(**kwargs)
                              ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sanya/work/FAIRmat/NOMAD2/nomad/nomad/metainfo/metainfo.py", line 2127, in m_to_dict
    return {key: value for key, value in items()}
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sanya/work/FAIRmat/NOMAD2/nomad/nomad/metainfo/metainfo.py", line 2127, in <dictcomp>
    return {key: value for key, value in items()}
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sanya/work/FAIRmat/NOMAD2/nomad/nomad/metainfo/metainfo.py", line 2125, in items
    yield name, sub_section.m_to_dict(**kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sanya/work/FAIRmat/NOMAD2/nomad/nomad/metainfo/metainfo.py", line 2127, in m_to_dict
    return {key: value for key, value in items()}
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sanya/work/FAIRmat/NOMAD2/nomad/nomad/metainfo/metainfo.py", line 2127, in <dictcomp>
    return {key: value for key, value in items()}
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sanya/work/FAIRmat/NOMAD2/nomad/nomad/metainfo/metainfo.py", line 2098, in items
    raise ValueError(f'Value error ({str(e)}) for {quantity}')
ValueError: Value error (Cannot find a proper definition for name "nx_data_mean".) for pynxtools.nomad.schema.Sensor_scan.ENTRY.INSTRUMENT.ENVIRONMENT.SENSOR.value__field:Quantity
@lukaspie lukaspie added the bug Something isn't working label Jan 8, 2025
@sherjeelshabih sherjeelshabih self-assigned this Jan 9, 2025
@sanbrock
Copy link
Collaborator Author

Note that current version seem to work and read the nexus file SUCCESfully in, but the created nexus file is not correct anymore:
json mapping asks for list of strings:
"/ENTRY[entry]/DATA[data]/@auxiliary_signals": ["current_300C", "current_305C", "current_310C"],
"/ENTRY[entry]/INSTRUMENT[instrument]/ENVIRONMENT[environment]/measurement_sensors": ["current_sensor"],
"/ENTRY[entry]/INSTRUMENT[instrument]/ENVIRONMENT[environment]/independent_controllers": ["voltage_controller", "temperature_control"],
but the dataconverter creates a single (comma separated) string . Note that interestingly this one works:
"/ENTRY[entry]/DATA[data]/@axes": ["voltage"],

@sanbrock
Copy link
Collaborator Author

Note that the Ellipsometry example writes nxs file propoerly with a string array at auxiliary_signals:
auxiliary_signals [ , , , , ]

Maybe it is a specific issue with the json reader...

@sanbrock
Copy link
Collaborator Author

Checking with Rubel, we confirmed that the latest version:
nomad branch: try_search_unregistered_quantities
pynxtools branch: no_inner_sections
solves the issues, and the IV_temp example works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants