monashmicroimaging / podocytes

GNU General Public License v3.0
2 stars 3 forks source link

Error caused by improper packaging #28

Closed GenevieveBuckley closed 5 years ago

GenevieveBuckley commented 6 years ago

Our tester observes this when running both the Podo executable file, and the Podo bundled app v0.1.1-alpha (Mac High Sierra 10.13.5).

I observe this error only when running the Podo.app bundle (and not when running the Podo executable file, or running podocytes/main.py directly).

2018-08-31 10:36:59,017 Podocyte automated analysis program
2018-08-31 10:36:59,017 31-Aug-2018_10-36AM
2018-08-31 10:36:59,017 ========== USER INPUT ARGUMENTS ==========
2018-08-31 10:36:59,018 input_directory: /Volumes/NO NAME/PODO test/51718GLOM1input
2018-08-31 10:36:59,018 output_directory: /Volumes/NO NAME/PODO test/51718GLOM1output
2018-08-31 10:36:59,018 file_extension[0]: .tif
2018-08-31 10:36:59,018 glomeruli_channel_number: 1
2018-08-31 10:36:59,018 podocyte_channel_number: 2
2018-08-31 10:36:59,018 minimum_glomerular_diameter: 30.0
2018-08-31 10:36:59,018 maximum_glomerular_diameter: 300.0
2018-08-31 10:36:59,018 ======= END OF USER INPUT ARGUMENTS =======
2018-08-31 10:36:59,018 1 .tif files found.
2018-08-31 10:36:59,018 Processing file: /Volumes/NO NAME/PODO test/51718GLOM1input/glom 1.tif
2018-08-31 10:36:59,481 Exception raised when trying to open /Volumes/NO NAME/PODO test/51718GLOM1input/glom 1.tif:
[54120] Failed to execute script launch-gui
Traceback (most recent call last):
  File "podocytes/main.py", line 44, in main
  File "site-packages/pims/bioformats.py", line 361, in __init__
  File "site-packages/jpype/_jpackage.py", line 62, in __call__
TypeError: Package loci.formats.ChannelFiller is not Callable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "bin/launch-gui.py", line 3, in <module>
  File "podocytes/main.py", line 47, in main
TypeError: 'type' object is not subscriptable
GenevieveBuckley commented 6 years ago

Have asked our tester to upgrade her OS to Mac High Sierra 10.13.6 (to match Gen's development environment). She's doing that now.

GenevieveBuckley commented 6 years ago

It's weird that the Podo executable file runs fine on my machine (but not our tester's laptop).

I can launch it from the terminal and have it run successfully, doesn't matter whether my active conda environment in the terminal shell is podo-dev, my root/default conda env, or a completely bare environment with just python3.6.6 installed.

GenevieveBuckley commented 6 years ago

Tester has upgraded OS to Mac High Sierra, v10.13.6 (now matches the development environment OS).

jni commented 6 years ago

Have you tried building the whole thing on the tester's machine? ie I want to see whether it's a build error or a "not bundling everything correctly" error.

GenevieveBuckley commented 6 years ago

No - we tried recreating the development conda environment this afternoon, but did not succeed before it got too late to continue. We'll try again later on.

GenevieveBuckley commented 5 years ago

More verbose output:

[58459] PyInstaller Bootloader 3.x
[58459] LOADER: executable is /Users/genevieb/Documents/GitHub/Code_repositories/podocytes/dist/Podo.app/Contents/MacOS/Podo
[58459] LOADER: homepath is /Users/genevieb/Documents/GitHub/Code_repositories/podocytes/dist/Podo.app/Contents/MacOS
[58459] LOADER: _MEIPASS2 is NULL
[58459] LOADER: archivename is /Users/genevieb/Documents/GitHub/Code_repositories/podocytes/dist/Podo.app/Contents/MacOS/Podo
[58459] LOADER: Extracting binaries
[58459] LOADER: Executing self as child
[58459] LOADER: set _MEIPASS2 to /var/folders/gz/6f0v_zhs09x38mb4td_h6py80000gn/T/_MEIIfFEDJ
[58460] PyInstaller Bootloader 3.x
[58460] LOADER: executable is /Users/genevieb/Documents/GitHub/Code_repositories/podocytes/dist/Podo.app/Contents/MacOS/Podo
[58460] LOADER: homepath is /Users/genevieb/Documents/GitHub/Code_repositories/podocytes/dist/Podo.app/Contents/MacOS
[58460] LOADER: _MEIPASS2 is /var/folders/gz/6f0v_zhs09x38mb4td_h6py80000gn/T/_MEIIfFEDJ
[58460] LOADER: archivename is /Users/genevieb/Documents/GitHub/Code_repositories/podocytes/dist/Podo.app/Contents/MacOS/Podo
[58460] LOADER: Already in the child - running user's code.
[58460] LOADER: Python library: /var/folders/gz/6f0v_zhs09x38mb4td_h6py80000gn/T/_MEIIfFEDJ/libpython3.6m.dylib
[58460] LOADER: Loaded functions from Python library.
[58460] LOADER: Manipulating environment (sys.path, sys.prefix)
[58460] LOADER: Pre-init sys.path is /var/folders/gz/6f0v_zhs09x38mb4td_h6py80000gn/T/_MEIIfFEDJ/base_library.zip:/var/folders/gz/6f0v_zhs09x38mb4td_h6py80000gn/T/_MEIIfFEDJ
[58460] LOADER: sys.prefix is /var/folders/gz/6f0v_zhs09x38mb4td_h6py80000gn/T/_MEIIfFEDJ
[58460] LOADER: Setting runtime options
[58460] LOADER: Runtime option: u
[58460] LOADER: Initializing python
[58460] LOADER: Overriding Python's sys.path
[58460] LOADER: Post-init sys.path is /var/folders/gz/6f0v_zhs09x38mb4td_h6py80000gn/T/_MEIIfFEDJ/base_library.zip:/var/folders/gz/6f0v_zhs09x38mb4td_h6py80000gn/T/_MEIIfFEDJ
[58460] LOADER: Setting sys.argv
[58460] LOADER: setting sys._MEIPASS
[58460] LOADER: importing modules from CArchive
[58460] LOADER: extracted struct
[58460] LOADER: callfunction returned...
[58460] LOADER: extracted pyimod01_os_path
[58460] LOADER: callfunction returned...
[58460] LOADER: extracted pyimod02_archive
[58460] LOADER: callfunction returned...
[58460] LOADER: extracted pyimod03_importers
[58460] LOADER: callfunction returned...
[58460] LOADER: Installing PYZ archive with Python modules.
[58460] LOADER: PYZ archive: out00-PYZ.pyz
[58460] LOADER: Running pyiboot01_bootstrap.py
[58460] LOADER: Running pyi_rth_traitlets.py
[58460] LOADER: Running pyi_rth_mplconfig.py
[58460] LOADER: Running pyi_rth_mpldata.py
[58460] LOADER: Running pyi_rth_multiprocessing.py
[58460] LOADER: Running pyi_rth_pkgres.py
[58460] LOADER: Running launch-gui.py
2018-09-12 16:56:16,728 Podocyte automated analysis program
2018-09-12 16:56:16,729 12-Sep-2018_16-56PM
2018-09-12 16:56:16,729 ========== USER INPUT ARGUMENTS ==========
2018-09-12 16:56:16,729 input_directory: /Users/genevieb/Desktop/podo_tests/input/lif
2018-09-12 16:56:16,729 output_directory: /Users/genevieb/Desktop/podo_tests/output_12Sept2018
2018-09-12 16:56:16,729 file_extension[0]: .lif
2018-09-12 16:56:16,729 glomeruli_channel_number: 1
2018-09-12 16:56:16,729 podocyte_channel_number: 2
2018-09-12 16:56:16,729 minimum_glomerular_diameter: 30.0
2018-09-12 16:56:16,729 maximum_glomerular_diameter: 300.0
2018-09-12 16:56:16,730 ======= END OF USER INPUT ARGUMENTS =======
2018-09-12 16:56:16,730 1 .lif files found.
2018-09-12 16:56:16,730 Processing file: /Users/genevieb/Desktop/podo_tests/input/lif/51559.lif
2018-09-12 16:56:17,236 Exception raised when trying to open /Users/genevieb/Desktop/podo_tests/input/lif/51559.lif:
[58460] Failed to execute script launch-gui
[58460] LOADER: OK.
[58460] LOADER: Cleaning up Python interpreter.
Traceback (most recent call last):
  File "podocytes/main.py", line 44, in main
  File "site-packages/pims/bioformats.py", line 361, in __init__
  File "site-packages/jpype/_jpackage.py", line 62, in __call__
TypeError: Package loci.formats.ChannelFiller is not Callable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "bin/launch-gui.py", line 3, in <module>
  File "podocytes/main.py", line 47, in main
TypeError: 'type' object is not subscriptable
[58459] LOADER: Back to parent (RC: 255)
[58459] LOADER: Doing cleanup
[58459] LOADER: Freeing archive status for /Users/genevieb/Documents/GitHub/Code_repositories/podocytes/dist/Podo.app/Contents/MacOS/Podo
GenevieveBuckley commented 5 years ago

Status: we are bundling java, but jpype goes looking for the system java not the version we bundled. Podo.app built with pyinstaller from jni/podocuytes packaging-loci-tools branch (see PR https://github.com/monashmicroimaging/podocytes/pull/31)

I get the same error as previously: TypeError: Package loci.formats.ChannelFiller is not Callable Java path: /System/Library/Frameworks/JavaVM.framework/JavaVM ... although the same build runs fine on my personal laptop & on Juan's machine.

Fulll log:

2018-10-09 13:44:34,934 Podocyte automated analysis program
2018-10-09 13:44:34,934 09-Oct-2018_13-44PM
2018-10-09 13:44:34,935 ========== USER INPUT ARGUMENTS ==========
2018-10-09 13:44:34,935 input_directory: /Users/genevieb/Desktop/podo_tests/input/lif
2018-10-09 13:44:34,935 output_directory: /Users/genevieb/Desktop/podo_tests/output_9thOct_2
2018-10-09 13:44:34,935 file_extension[0]: .lif
2018-10-09 13:44:34,935 glomeruli_channel_number: 1
2018-10-09 13:44:34,935 podocyte_channel_number: 2
2018-10-09 13:44:34,935 minimum_glomerular_diameter: 30.0
2018-10-09 13:44:34,935 maximum_glomerular_diameter: 300.0
2018-10-09 13:44:34,936 ======= END OF USER INPUT ARGUMENTS =======
2018-10-09 13:44:34,975 Java path: /System/Library/Frameworks/JavaVM.framework/JavaVM
2018-10-09 13:44:34,975 1 .lif files found.
2018-10-09 13:44:34,975 Processing file: /Users/genevieb/Desktop/podo_tests/input/lif/51559.lif
2018-10-09 13:44:35,322 Exception raised when trying to open /Users/genevieb/Desktop/podo_tests/input/lif/51559.lif
2018-10-09 13:44:35,322 TypeError: Package loci.formats.ChannelFiller is not Callable
2018-10-09 13:44:35,322 No glomeruli identified in this image.
2018-10-09 13:44:35,323 ValueError: No objects to concatenate
GenevieveBuckley commented 5 years ago

I think this is old now, closing.