BMCV / galaxy-image-analysis

Galaxy tools for image analysis
MIT License
14 stars 14 forks source link

Galaxy overlay_images plugin AttributeError: 'NoneType' object has no attribute 'seek' #121

Open cgirardot opened 3 months ago

cgirardot commented 3 months ago

Dear,

I have deployed the Galaxy overlay_images (Galaxy Version 0.0.4+galaxy3) in our local galaxy and followed the "Introduction to image analysis using Galaxy" tutorial, but I am getting this error (see below).

Note that I also used the "Galaxy Version 0.0.3-3" version as in the tutorial which worked after I fixed the mulled conda env ; I indeed had to (re)install numpy.

Could you advise?

Traceback (most recent call last):
  File "/g/funcgen/galaxy-production/shed_tools/toolshed.g2.bx.psu.edu/repos/imgteam/overlay_images/8dc02c854048/overlay_images/overlay_images.py", line 121, in <module>
    seg_contour(args.im1, args.im2, args.out,
  File "/g/funcgen/galaxy-production/shed_tools/toolshed.g2.bx.psu.edu/repos/imgteam/overlay_images/8dc02c854048/overlay_images/overlay_images.py", line 77, in seg_contour
    labels = giatools.io.imread(im2_fn)
  File "/g/funcgen/galaxy-production/database/dependencies/_conda/envs/mulled-v1-ab2c0f314a3c4674b82222c696598109c6abab527a4e27a3e115a79787e5ca0d/lib/python3.9/site-packages/giatools/io.py", line 25, in imread
    return impl(*args, **kwargs)
  File "/g/funcgen/galaxy-production/database/dependencies/_conda/envs/mulled-v1-ab2c0f314a3c4674b82222c696598109c6abab527a4e27a3e115a79787e5ca0d/lib/python3.9/site-packages/skimage/io/_io.py", line 48, in imread
    img = call_plugin('imread', fname, plugin=plugin, **plugin_args)
  File "/g/funcgen/galaxy-production/database/dependencies/_conda/envs/mulled-v1-ab2c0f314a3c4674b82222c696598109c6abab527a4e27a3e115a79787e5ca0d/lib/python3.9/site-packages/skimage/io/manage_plugins.py", line 207, in call_plugin
    return func(*args, **kwargs)
  File "/g/funcgen/galaxy-production/database/dependencies/_conda/envs/mulled-v1-ab2c0f314a3c4674b82222c696598109c6abab527a4e27a3e115a79787e5ca0d/lib/python3.9/site-packages/skimage/io/_plugins/imageio_plugin.py", line 10, in imread
    return np.asarray(imageio_imread(*args, **kwargs))
  File "/g/funcgen/galaxy-production/database/dependencies/_conda/envs/mulled-v1-ab2c0f314a3c4674b82222c696598109c6abab527a4e27a3e115a79787e5ca0d/lib/python3.9/site-packages/imageio/__init__.py", line 97, in imread
    return imread_v2(uri, format=format, **kwargs)
  File "/g/funcgen/galaxy-production/database/dependencies/_conda/envs/mulled-v1-ab2c0f314a3c4674b82222c696598109c6abab527a4e27a3e115a79787e5ca0d/lib/python3.9/site-packages/imageio/v2.py", line 360, in imread
    result = file.read(index=0, **kwargs)
  File "/g/funcgen/galaxy-production/database/dependencies/_conda/envs/mulled-v1-ab2c0f314a3c4674b82222c696598109c6abab527a4e27a3e115a79787e5ca0d/lib/python3.9/site-packages/imageio/plugins/pillow.py", line 252, in read
    image = self._apply_transforms(
  File "/g/funcgen/galaxy-production/database/dependencies/_conda/envs/mulled-v1-ab2c0f314a3c4674b82222c696598109c6abab527a4e27a3e115a79787e5ca0d/lib/python3.9/site-packages/imageio/plugins/pillow.py", line 335, in _apply_transforms
    meta = self.metadata(index=self._image.tell(), exclude_applied=False)
  File "/g/funcgen/galaxy-production/database/dependencies/_conda/envs/mulled-v1-ab2c0f314a3c4674b82222c696598109c6abab527a4e27a3e115a79787e5ca0d/lib/python3.9/site-packages/imageio/plugins/pillow.py", line 537, in metadata
    if self._image.getexif():
  File "/g/funcgen/galaxy-production/database/dependencies/_conda/envs/mulled-v1-ab2c0f314a3c4674b82222c696598109c6abab527a4e27a3e115a79787e5ca0d/lib/python3.9/site-packages/PIL/Image.py", line 1389, in getexif
    self._exif.load_from_fp(self.fp, self.tag_v2._offset)
  File "/g/funcgen/galaxy-production/database/dependencies/_conda/envs/mulled-v1-ab2c0f314a3c4674b82222c696598109c6abab527a4e27a3e115a79787e5ca0d/lib/python3.9/site-packages/PIL/Image.py", line 3445, in load_from_fp
    self.fp.seek(offset)
AttributeError: 'NoneType' object has no attribute 'seek'
bgruening commented 3 months ago

Is there an option to try the Container for that tool?

cgirardot commented 3 months ago

we dont have this set up available on our local instance, so ...no sorry.