mobie / mobie-utils-python

Python tools for MoBIE
MIT License
9 stars 5 forks source link

path names in `dataset.json` generated in Windows contain `\` #132

Closed martinschorb closed 6 months ago

martinschorb commented 6 months ago

Hi,

I have run a conversion using mobie_utils on Windows. The resulting dataset.json contains

        "imageData": {
          "ome.zarr": {
            "relativePath": "images\\ome-zarr\\FLM_a1_R.ome.zarr"
          }

which makes the viewer crash.

I remember vaguely that there was a fix at some point. Any ideas why it is wrong again?

martinschorb commented 6 months ago

To be more precise. The viewer works when run on Windows.

found something here.. https://github.com/mobie/mobie-utils-python/issues/78

@constantinpape would it make sense to change the code for generating the source metadata in using / no matter the platform you run it on?

I can look into that if you like.

martinschorb commented 6 months ago

I would basically modify https://github.com/mobie/mobie-utils-python/blob/b4a7de66f1c849a7e8952731b0d61f93fb7fc8c6/mobie/metadata/source_metadata.py#L166 to write forward slashes and check the validation and tests that this implies.

Any objections?

I think it makes sense to enable creating cross-platform MoBIE projects also from Windows.

constantinpape commented 6 months ago

Hi @martinschorb , yes that makes sense, no objections from my side.

constantinpape commented 6 months ago

Fixed by #134