Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loci_tools.jar missing #456

Open
bpavie opened this issue Jan 11, 2024 · 1 comment
Open

loci_tools.jar missing #456

bpavie opened this issue Jan 11, 2024 · 1 comment

Comments

@bpavie
Copy link

bpavie commented Jan 11, 2024

Pims cannot download loci_tools.jar when using bioformat, it seems it does not exist since version version 6.9 of bioformat:
(see https://downloads.openmicroscopy.org/bio-formats/6.9.0/artifacts/ )

[c:\GBW_MyPrograms\mambaforge\envs\trackpy\lib\site-packages\pims\bioformats.py:50](file:///C:/GBW_MyPrograms/mambaforge/envs/trackpy/lib/site-packages/pims/bioformats.py:50): UserWarning: loci_tools.jar not found, downloading
  warn('loci_tools.jar not found, downloading')
---------------------------------------------------------------------------
HTTPError                                 Traceback (most recent call last)
Cell In[2], [line 1](vscode-notebook-cell:?execution_count=2&line=1)
----> [1](vscode-notebook-cell:?execution_count=2&line=1) frames = pims.Bioformats('C:\\Users\\u0094799\\Documents\\Projects\\Leuven\\Marlies_leysen\\2024_01\\Image 17_PBS_Airyscan Processing.czi')
      [2](vscode-notebook-cell:?execution_count=2&line=2) frames

File [c:\GBW_MyPrograms\mambaforge\envs\trackpy\lib\site-packages\pims\bioformats.py:335](file:///C:/GBW_MyPrograms/mambaforge/envs/trackpy/lib/site-packages/pims/bioformats.py:335), in BioformatsReader.__init__(self, filename, meta, java_memory, read_mode, series)
    [332](file:///C:/GBW_MyPrograms/mambaforge/envs/trackpy/lib/site-packages/pims/bioformats.py:332) if not jpype.isJVMStarted():
    [333](file:///C:/GBW_MyPrograms/mambaforge/envs/trackpy/lib/site-packages/pims/bioformats.py:333)     from distutils.version import LooseVersion
--> [335](file:///C:/GBW_MyPrograms/mambaforge/envs/trackpy/lib/site-packages/pims/bioformats.py:335)     loci_path = _find_jar()
    [336](file:///C:/GBW_MyPrograms/mambaforge/envs/trackpy/lib/site-packages/pims/bioformats.py:336)     # If we can turn off string auto-conversion, do so,
    [337](file:///C:/GBW_MyPrograms/mambaforge/envs/trackpy/lib/site-packages/pims/bioformats.py:337)     # since this is the recommended practice.
    [338](file:///C:/GBW_MyPrograms/mambaforge/envs/trackpy/lib/site-packages/pims/bioformats.py:338)     if LooseVersion(jpype.__version__) >= LooseVersion('0.7.0'):

File [c:\GBW_MyPrograms\mambaforge\envs\trackpy\lib\site-packages\pims\bioformats.py:51](file:///C:/GBW_MyPrograms/mambaforge/envs/trackpy/lib/site-packages/pims/bioformats.py:51), in _find_jar()
     [48](file:///C:/GBW_MyPrograms/mambaforge/envs/trackpy/lib/site-packages/pims/bioformats.py:48)         return os.path.join(loc, 'loci_tools.jar')
     [50](file:///C:/GBW_MyPrograms/mambaforge/envs/trackpy/lib/site-packages/pims/bioformats.py:50) warn('loci_tools.jar not found, downloading')
---> [51](file:///C:/GBW_MyPrograms/mambaforge/envs/trackpy/lib/site-packages/pims/bioformats.py:51) return download_jar()

File [c:\GBW_MyPrograms\mambaforge\envs\trackpy\lib\site-packages\pims\bioformats.py:78](file:///C:/GBW_MyPrograms/mambaforge/envs/trackpy/lib/site-packages/pims/bioformats.py:78), in download_jar(version)
     [74](file:///C:/GBW_MyPrograms/mambaforge/envs/trackpy/lib/site-packages/pims/bioformats.py:74) url = ('http://downloads.openmicroscopy.org/bio-formats/' + version +
     [75](file:///C:/GBW_MyPrograms/mambaforge/envs/trackpy/lib/site-packages/pims/bioformats.py:75)        '/artifacts/loci_tools.jar')
     [77](file:///C:/GBW_MyPrograms/mambaforge/envs/trackpy/lib/site-packages/pims/bioformats.py:77) path = os.path.join(loc, 'loci_tools.jar')
---> [78](file:///C:/GBW_MyPrograms/mambaforge/envs/trackpy/lib/site-packages/pims/bioformats.py:78) loci_tools = urlopen(url).read()
     [79](file:///C:/GBW_MyPrograms/mambaforge/envs/trackpy/lib/site-packages/pims/bioformats.py:79) sha1_checksum = urlopen(url + '.sha1').read().split(b' ')[0].decode()
...
File [c:\GBW_MyPrograms\mambaforge\envs\trackpy\lib\urllib\request.py:641](file:///C:/GBW_MyPrograms/mambaforge/envs/trackpy/lib/urllib/request.py:641), in HTTPDefaultErrorHandler.http_error_default(self, req, fp, code, msg, hdrs)
    [640](file:///C:/GBW_MyPrograms/mambaforge/envs/trackpy/lib/urllib/request.py:640) def http_error_default(self, req, fp, code, msg, hdrs):
--> [641](file:///C:/GBW_MyPrograms/mambaforge/envs/trackpy/lib/urllib/request.py:641)     raise HTTPError(req.full_url, code, msg, hdrs, fp)

HTTPError: HTTP Error 404: Not Found
@joshmoore
Copy link
Contributor

Please see #403. loci_tools.jar has been deprecated for some time and was eventually removed due to security vulnerabilities in the third-party logging library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants