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

TypeError using conda environment #190

Open
rocketeer1998 opened this issue Apr 25, 2023 · 4 comments
Open

TypeError using conda environment #190

rocketeer1998 opened this issue Apr 25, 2023 · 4 comments

Comments

@rocketeer1998
Copy link

Hi @jmuhlich, thanks for your great devotion to ASHLAR! I've created a new conda environment on my Windows10 computer and successfully installed ASHLAR. However, I can't run it on exemplar-001 data, where there was an error said,
TypeError: Invalid instance of ‘java/lang/Integer’ passed for a ‘java/lang/Boolean’.
What's the reason and how can I fix it? Thanks a lot!

@rocketeer1998 rocketeer1998 changed the title TypeError using conda environment on Windows10 TypeError using conda environment Apr 25, 2023
@rocketeer1998
Copy link
Author

I've also tested it on Centos. Unfortunately, the same error occurred.

@jmuhlich
Copy link
Collaborator

What version of Ashlar are you using? Can you provide the full stack trace so I can see which line of Ashlar code is causing that error? This looks like something we fixed back in Ashlar 1.15.1 (current version is 1.17.0).

@bpavie
Copy link

bpavie commented Nov 22, 2023

I have the same error too,I have installed it on Windows 11 Enterprise following the instruction found at https://labsyspharm.github.io/ashlar/instructions/installation.html:

mamba create -y -n ashlar python=3.7
mamba activate ashlar
mamba install -y -c conda-forge numpy scipy matplotlib networkx scikit-image=0.16.2 scikit-learn pyjnius
pip install ashlar

Unzipped the exemplar-001.zip and try to stitch the ashlar exemplar-001-cycle-06.ome.tiff

ashlar exemplar-001-cycle-06.ome.tiff --version
ashlar 1.14.1
ashlar exemplar-001-cycle-06.ome.tiff
Cycle 0:
    reading exemplar-001-cycle-06.ome.tiff
Traceback (most recent call last):
  File "C:\mambaforge\envs\ashlar\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\mambaforge\envs\ashlar\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\mambaforge\envs\ashlar\Scripts\ashlar.exe\__main__.py", line 7, in <module>
  File "C:\mambaforge\envs\ashlar\lib\site-packages\ashlar\scripts\ashlar.py", line 184, in main
    args.quiet
  File "C:\mambaforge\envs\ashlar\lib\site-packages\ashlar\scripts\ashlar.py", line 212, in process_single
    reader = build_reader(filepaths[0], plate_well=plate_well)
  File "C:\mambaforge\envs\ashlar\lib\site-packages\ashlar\scripts\ashlar.py", line 338, in build_reader
    reader = reader_class(path, **kwargs)
  File "C:\GBW_MyPrograms\mambaforge\envs\ashlar\lib\site-packages\ashlar\reg.py", line 391, in __init__
    self.metadata = BioformatsMetadata(self.path)
  File "C:\mambaforge\envs\ashlar\lib\site-packages\ashlar\reg.py", line 207, in __init__
    self._init_metadata()
  File "C:\mambaforge\envs\ashlar\lib\site-packages\ashlar\reg.py", line 228, in _init_metadata
    options.setBoolean('zeissczi.autostitch', False)
  File "jnius\jnius_export_class.pxi", line 879, in jnius.JavaMethod.__call__
  File "jnius\jnius_conversion.pxi", line 71, in jnius.populate_args
  File "jnius\jnius_utils.pxi", line 205, in jnius.check_assignable_from_str
TypeError: Invalid instance of 'java/lang/Integer' passed for a 'java/lang/Boolean'

@bpavie
Copy link

bpavie commented Nov 22, 2023

I answer to myself:

updating the python version to 3.8 and installing the last version of ashlar fixed it:

mamba create -y -n ashlar python=3.8
mamba activate ashlar
mamba install -y -c conda-forge numpy scipy matplotlib networkx scikit-image=0.19.3 scikit-learn pyjnius
pip install ashlar==1.17.0

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

3 participants