CellProfiler-Analyst
CellProfiler-Analyst copied to clipboard
Implement handling of URLs in image paths
Seems that if the image path is a URL instead of an absolute file path, the image loader fails.
To create an example error:
- Open the welcome screen pipeline, add an ExportToDB module and have it write to a MySQL/SQLite db + props file.
- Open the props file with CPA, and try to fetch an image.
File "C:\Python27\Lib\threading.py", line 774, in __bootstrap
self.__bootstrap_inner()
File "C:\Python27\Lib\threading.py", line 801, in __bootstrap_inner
self.run()
 File "C:\Trunk\pull_requests\CellProfiler-Analyst\cpa\tilecollection.py", line 133, in run
new_data = imagetools.FetchTile(obKey)
 File "C:\Trunk\pull_requests\CellProfiler-Analyst\cpa\imagetools.py", line 39, in FetchTile
imgs = FetchImage(imKey)
 File "C:\Trunk\pull_requests\CellProfiler-Analyst\cpa\imagetools.py", line 52, in FetchImage
imgs = ir.ReadImages(filenames)
 File "C:\Trunk\pull_requests\CellProfiler-Analyst\cpa\imagereader.py", line 24, in ReadImages
return self.read_images_via_bioformats(fds)
 File "C:\Trunk\pull_requests\CellProfiler-Analyst\cpa\imagereader.py", line 99, in read_images_via_bioformats
image = self._read_image_via_bioformats(filename_or_url)
 File "C:\Trunk\pull_requests\CellProfiler-Analyst\cpa\imagereader.py", line 44, in _read_image_via_bioformats
return bioformats.load_image(filename_or_url)
File "C:\Python27\Lib\site-packages\bioformats\formatreader.py", line 948, in load_using_bioformats
with ImageReader(path=path) as rdr:
File "C:\Python27\Lib\site-packages\bioformats\formatreader.py", line 618, in __init__
path)
IOError: [Errno 2] The file, "http://cellprofiler.org/ExampleFlyImages\01_POS076_D.TIF", does not exist.: 'http://cellprofiler.org/ExampleFlyImages\\01_POS076_D.TIF'