FAIRmat-NFDI / pynxtools

https://fairmat-nfdi.github.io/pynxtools/
Apache License 2.0
13 stars 8 forks source link

convert.py RuntimeError when executed in docker container #18

Closed domna closed 2 years ago

domna commented 2 years ago

I try to convert a file with the ellipsometry reader in a docker container with the commands

from nexusparser.tools.dataconverter.convert import convert

convert(input_file=["test.yaml"],
        reader='ellips',
        nxdl='NXellipsometry',
        output='ellips.test.nxs')

Outside the docker container this works fine. However, inside the container I get the error RuntimeError: dictionary keys changed during iteration (Full Stack trace here) I checked that I use the same branches inside and outside of the container. I also checked the mpes parser and it works fine inside the container.

The code for the docker image generation can be found here

Any ideas?

domna commented 2 years ago

Probably it's the python version, because it's newer in the container. I think that the older python version just didn't care about the header being changed in the loop. I think creating a new temporary header dict should help here (but I'll see if there is a more elegant solution).