Closed jni closed 5 years ago
Hello @jni! Thanks for updating the PR.
podocytes/main.py
, following are the PEP8 issues :
Line 9:1: E402 module level import not at top of file Line 10:1: E402 module level import not at top of file Line 11:1: E402 module level import not at top of file Line 12:1: E402 module level import not at top of file Line 14:1: E402 module level import not at top of file Line 15:1: E402 module level import not at top of file Line 17:1: E402 module level import not at top of file Line 18:1: E402 module level import not at top of file Line 19:1: E402 module level import not at top of file Line 20:1: E402 module level import not at top of file Line 21:1: E402 module level import not at top of file Line 23:1: E402 module level import not at top of file Line 60:13: E128 continuation line under-indented for visual indent Line 62:13: E128 continuation line under-indented for visual indent Line 78:1: E302 expected 2 blank lines, found 0 Line 357:80: E501 line too long (84 > 79 characters) Line 358:80: E501 line too long (84 > 79 characters) Line 462:80: E501 line too long (84 > 79 characters) Line 552:20: E127 continuation line over-indented for visual indent Line 553:20: E127 continuation line over-indented for visual indent Line 559:80: E501 line too long (87 > 79 characters) Line 578:80: E501 line too long (82 > 79 characters)
Closes https://github.com/monashmicroimaging/podocytes/issues/11 'Bundle loci_tools.jar into the app build'
What needs to happen to get this out of WIP and merged into master?
The reason we need to install pims from its master branch in our environment is to prevent an error when running pyinstaller: AttributeError: module 'pims.bioformats' has no attribute '_download_jar'
.
For reference, here's the traceback if you've installed pims 0.4.1 instead of master:
$ pyinstaller Podo.spec -w -F -y
129 INFO: PyInstaller: 3.4
129 INFO: Python: 3.6.7
144 INFO: Platform: Darwin-18.2.0-x86_64-i386-64bit
158 INFO: UPX is available.
436 INFO: checking Tree
438 INFO: checking Tree
Traceback (most recent call last):
File "/anaconda3/envs/podo/bin/pyinstaller", line 11, in <module>
sys.exit(run())
File "/anaconda3/envs/podo/lib/python3.6/site-packages/PyInstaller/__main__.py", line 111, in run
run_build(pyi_config, spec_file, **vars(args))
File "/anaconda3/envs/podo/lib/python3.6/site-packages/PyInstaller/__main__.py", line 63, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "/anaconda3/envs/podo/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 838, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "/anaconda3/envs/podo/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 784, in build
exec(text, spec_namespace)
File "<string>", line 17, in <module>
AttributeError: module 'pims.bioformats' has no attribute '_download_jar'
Also FYI if pims.Bioformats can't open a file it will produce this message about the Java Advanced Imaging (JAI) library. This shouldn't be an issue, the code should just move on to the next image if a corrupt file is encountered.
2018-11-19 15:24:31,958 Exception raised when trying to open /podocytes/test/testdata/corrupt_image.tif
2018-11-19 15:24:31,959 jpype._jexception.loci.formats.MissingLibraryExceptionPyRaisable: loci.formats.MissingLibraryException: Java Advanced Imaging (JAI) is required to read some TIFF files. Please install JAI from https://jai.dev.java.net/
2018-11-19 15:24:31,959 No glomeruli identified in this image.
2018-11-19 15:24:31,959 ValueError: No objects to concatenate
The ValueError is a problem, but is being fixed in another branch.
WIP, this isn't yet tested...