ome / omero-py

Python project containing Ice remoting code for OMERO
https://www.openmicroscopy.org/omero
GNU General Public License v2.0
20 stars 31 forks source link

Windows import fix #326

Closed sbesson closed 2 years ago

sbesson commented 2 years ago

See https://forum.image.sc/t/omero-cli-on-windows-for-image-import/67248 for a description of the issue

As suggested by @manics, zipfile.Zipfile uses / as the path separator agnosticly of the underlying platform. 1d99f7e71dcc37cb4ce16ff30d1ce9bb4c52ddbe updates the code accordingly and should fix the JAR fetching and hence the import on Windows systems.

Incidentally, this fix seems to be sufficient to re-enable all CLI import tests on Windows with an extra commit sanitizing the stderr output for the assert comparisons.

Proposed tag: 5.11.2

imagesc-bot commented 2 years ago

This pull request has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/omero-cli-on-windows-for-image-import/67248/3

joshmoore commented 2 years ago

Assuming the daily integrations builds are green, "Hurrah!" :tada:

sbesson commented 2 years ago

Recent runs of the OMERO integration test suite remained green with this included -see https://merge-ci.openmicroscopy.org/jenkins/job/OMERO-test-integration/1109/. @CamachoDejay's comment in https://forum.image.sc/t/omero-cli-on-windows-for-image-import/67248/4 suggests this change suffices to make omero import functional again on Windows. Capacity allowing, it might be useful if someone from the @ome/dundee team could confirm this on a working Windows environment.

dominikl commented 2 years ago

I'll give it a try. Would be great if that works!

dominikl commented 2 years ago

Works 👍

(base) C:\Users\User\Downloads>omero version
OMERO.py version:
5.11.2.dev0

(base) C:\Users\User\Downloads>omero import -T Dataset:83197 cat.jpg
Using OMERO.java-5.6.4-ice36-b232
...
2022-05-23 05:22:56,202 12446      [l.Client-1] INFO   ormats.importer.cli.LoggingImportMonitor - IMPORT_DONE Imported file: C:\Users\User\Downloads\cat.jpg
Image:4519355
Other imported objects:
Fileset:446551

==> Summary
1 file uploaded, 1 fileset created, 1 image imported, 0 errors in 0:00:07.623