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

Error using ABBA using Installation via Windows Installer #191

Closed
Sarruedi opened this issue Jan 23, 2024 · 13 comments
Closed

Error using ABBA using Installation via Windows Installer #191

Sarruedi opened this issue Jan 23, 2024 · 13 comments

Comments

@Sarruedi
Copy link

Sarruedi commented Jan 23, 2024

Hi Nico,

I'm trying to use ABBA for the first time and have tried installing ABBA and its dependencies via the brand-new Windows Installer.
The installation itself seems to go through without an obvious error, but once I start ABBA in ImageJ, I get the following error message and I wonder whether you have any advice on how to fix these:

hdf5 file already downloaded - skipping
xml file already downloaded - skipping
Ontology file already downloaded - skipping
Spimdata mpicbg.spim.data.SpimData@4d4081eb is using the Bdv Playground global cache.
[WARNING] Ignoring unsupported output: ba [ch.epfl.biop.atlas.mouse.allen.ccfv3p1.command.AllenBrainAdultMouseAtlasCCF2017v3p1Command]
[WARNING] Ignoring unsupported output: atlas [ch.epfl.biop.atlas.mouse.allen.ccfv3p1.command.AllenBrainAdultMouseAtlasCCF2017v3p1Command]
[ERROR] Command errored: ABBA - Align Big Brains and Atlases (no GUI)
java.lang.ExceptionInInitializerError
	at sc.fiji.bdvpg.sourceandconverter.SourceAndConverterHelper.cloneConverter(SourceAndConverterHelper.java:219)
	at sc.fiji.bdvpg.sourceandconverter.transform.SourceAffineTransformer.apply(SourceAffineTransformer.java:101)
	at sc.fiji.bdvpg.sourceandconverter.transform.SourceAffineTransformer.get(SourceAffineTransformer.java:83)
	at ch.epfl.biop.atlas.aligner.ReslicedAtlas.computeReslicedSources(ReslicedAtlas.java:222)
	at ch.epfl.biop.atlas.aligner.ReslicedAtlas.setResolution(ReslicedAtlas.java:83)
	at ch.epfl.biop.atlas.aligner.command.ABBAStartCommand.run(ABBAStartCommand.java:57)
	at org.scijava.command.CommandModule.run(CommandModule.java:196)
	at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:125)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:64)
	at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:247)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.RuntimeException: Couldn't find pwsh.exe or powershell.exe on path or in default system locations
	at dev.dirs.Util.windowsFallback(Util.java:284)
	at dev.dirs.Util.getWinDirs(Util.java:166)
	at dev.dirs.ProjectDirectories.fromPath(ProjectDirectories.java:255)
	at dev.dirs.ProjectDirectories.from(ProjectDirectories.java:309)
	at bdv.BigDataViewer.<clinit>(BigDataViewer.java:112)
	... 15 more
Caused by: java.io.IOException: Cannot run program "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe": CreateProcess error=225, Operation did not complete successfully because the file contains a virus or potentially unwanted software
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
	at dev.dirs.Util.runCommands(Util.java:197)
	at dev.dirs.Util.runWinCommands(Util.java:233)
	at dev.dirs.Util.windowsFallback(Util.java:282)
	... 19 more
Caused by: java.io.IOException: CreateProcess error=225, Operation did not complete successfully because the file contains a virus or potentially unwanted software
	at java.lang.ProcessImpl.create(Native Method)
	at java.lang.ProcessImpl.<init>(ProcessImpl.java:453)
	at java.lang.ProcessImpl.start(ProcessImpl.java:139)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
	... 22 more
java.util.concurrent.ExecutionException: java.lang.RuntimeException: Module threw error
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.util.concurrent.FutureTask.get(FutureTask.java:192)
	at ch.epfl.biop.atlas.aligner.gui.bdv.ABBABdvStartCommand.run(ABBABdvStartCommand.java:48)
	at org.scijava.command.CommandModule.run(CommandModule.java:196)
	at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:125)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:64)
	at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:247)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.RuntimeException: Module threw error
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:131)
	... 6 more
Caused by: java.lang.ExceptionInInitializerError
	at sc.fiji.bdvpg.sourceandconverter.SourceAndConverterHelper.cloneConverter(SourceAndConverterHelper.java:219)
	at sc.fiji.bdvpg.sourceandconverter.transform.SourceAffineTransformer.apply(SourceAffineTransformer.java:101)
	at sc.fiji.bdvpg.sourceandconverter.transform.SourceAffineTransformer.get(SourceAffineTransformer.java:83)
	at ch.epfl.biop.atlas.aligner.ReslicedAtlas.computeReslicedSources(ReslicedAtlas.java:222)
	at ch.epfl.biop.atlas.aligner.ReslicedAtlas.setResolution(ReslicedAtlas.java:83)
	at ch.epfl.biop.atlas.aligner.command.ABBAStartCommand.run(ABBAStartCommand.java:57)
	at org.scijava.command.CommandModule.run(CommandModule.java:196)
	at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:125)
	... 6 more
Caused by: java.lang.RuntimeException: Couldn't find pwsh.exe or powershell.exe on path or in default system locations
	at dev.dirs.Util.windowsFallback(Util.java:284)
	at dev.dirs.Util.getWinDirs(Util.java:166)
	at dev.dirs.ProjectDirectories.fromPath(ProjectDirectories.java:255)
	at dev.dirs.ProjectDirectories.from(ProjectDirectories.java:309)
	at bdv.BigDataViewer.<clinit>(BigDataViewer.java:112)
	... 15 more
Caused by: java.io.IOException: Cannot run program "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe": CreateProcess error=225, Operation did not complete successfully because the file contains a virus or potentially unwanted software
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
	at dev.dirs.Util.runCommands(Util.java:197)
	at dev.dirs.Util.runWinCommands(Util.java:233)
	at dev.dirs.Util.windowsFallback(Util.java:282)
	... 19 more
Caused by: java.io.IOException: CreateProcess error=225, Operation did not complete successfully because the file contains a virus or potentially unwanted software
	at java.lang.ProcessImpl.create(Native Method)
	at java.lang.ProcessImpl.<init>(ProcessImpl.java:453)
	at java.lang.ProcessImpl.start(ProcessImpl.java:139)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
	... 22 more
@NicoKiaru
Copy link
Member

Oh, whoa! Super weird...

Could it your antivirus ?

You can try to run Fiji first as a standalone application and see if it works (not all functionality will work, but at least you can test if this message disappear). The shipped executable Fiji is in:

C:\Users\username\AppData\Local\abba-python-0.8.0\win\Fiji.app

Or, I believe, in

C:\ProgramData\abba-python-0.8.0\win\Fiji.app

if ABBA was installed for all users

@NicoKiaru
Copy link
Member

You're running the headless version of ABBA (ABBA - Align Big Brains and Atlases (no GUI)): is this on purpose ? Do you get the same message if you run ABBA - ABBA Start ?

image

@NicoKiaru
Copy link
Member

@tpietzsch (just to let you know, no need to do anything)

There seem to be an issue in some weird scenario (pyimagej) in a static initializer of the BigDataViewer class:

Caused by: java.lang.RuntimeException: Couldn't find pwsh.exe or powershell.exe on path or in default system locations
	at dev.dirs.Util.windowsFallback(Util.java:284)
	at dev.dirs.Util.getWinDirs(Util.java:166)
	at dev.dirs.ProjectDirectories.fromPath(ProjectDirectories.java:255)
	at dev.dirs.ProjectDirectories.from(ProjectDirectories.java:309)
	at bdv.BigDataViewer.<clinit>(BigDataViewer.java:112)
	... 15 more

@NicoKiaru
Copy link
Member

@NicoKiaru
Copy link
Member

Maybe it's linked to this bug:

dirs-dev/directories-jvm#28

and they have been suffering with windows:

dirs-dev/directories-jvm#49

@tpietzsch would it be ok if I try to file a PR that would catch the error inside a static initializer bloc, or do you think there's a better option ?

@Sarruedi
Copy link
Author

I tried deactivating the antivirus, but so far no luck. But I agree that one issue may be related to the antivirus; also got a 225 error when trying to pip install DeepSlice on its own.

@NicoKiaru
Copy link
Member

Ah so maybe it's more general security issue, so it's probably not worth changing anything codewise for now.

@NicoKiaru
Copy link
Member

NicoKiaru commented Jan 23, 2024

As part of testing, you can try to run ABBA in administrator mode (or try to pip install DeepSlice in admin mode and see if it works).

@Sarruedi
Copy link
Author

Yes, exactly the same error, probably installation issue. Unfortunately installing components individually still causes issues, but it seems to have to do with DeepSlice:

Collecting DeepSlice
Using cached DeepSlice-1.1.6-py3-none-any.whl (24 kB)
Collecting protobuf==3.20
Downloading protobuf-3.20.0-cp310-cp310-win_amd64.whl (903 kB)
---------------------------------------- 903.8/903.8 kB 5.2 MB/s eta 0:00:00
Collecting DeepSlice
Using cached DeepSlice-1.1.5-py3-none-any.whl (35 kB)
Using cached DeepSlice-1.1.4-py3-none-any.whl (35 kB)
Using cached DeepSlice-1.1.3-py3-none-any.whl (35 kB)
Using cached DeepSlice-1.1.2-py3-none-any.whl (34 kB)
Using cached DeepSlice-1.1.1-py3-none-any.whl (34 kB)
Using cached DeepSlice-1.1.0-py3-none-any.whl (34 kB)
Using cached DeepSlice-1.0.11-py3-none-any.whl (33 kB)
Using cached DeepSlice-1.0.6-py3-none-any.whl (33 kB)
Using cached DeepSlice-1.0.5.tar.gz (31 kB)
ERROR: Error [WinError 225] Operation did not complete successfully because the file contains a virus or potentially unwanted software while executing command python setup.py egg_info
Preparing metadata (setup.py) ... error
ERROR: Could not install packages due to an OSError: [WinError 225] Operation did not complete successfully because the file contains a virus or potentially unwanted software

@Sarruedi
Copy link
Author

Sarruedi commented Jan 23, 2024

Managed to fix the installation issue, which was due to antivirus settings. It seems that DeepSlice specifically triggers the error.
remaining issues:

Spimdata mpicbg.spim.data.SpimData@2e96ea67 is using the Bdv Playground global cache.
[WARNING] Ignoring unsupported output: ba [ch.epfl.biop.atlas.mouse.allen.ccfv3p1.command.AllenBrainAdultMouseAtlasCCF2017v3p1Command]
[WARNING] Ignoring unsupported output: atlas [ch.epfl.biop.atlas.mouse.allen.ccfv3p1.command.AllenBrainAdultMouseAtlasCCF2017v3p1Command]
Creating MultiSlicePositioner instance
MultiSlicePositioner instance created
[WARNING] Ignoring unsupported output: mp [ch.epfl.biop.atlas.aligner.MultiSlicePositioner]
Keymap list file C:\Users\SRL_KiloSort\AppData\Roaming\fiji\bigdataviewer\config\keymaps\keymaps.yaml not found. Using builtin styles.
[WARNING] 2 exceptions occurred during plugin discovery.
Appearance settings file C:\Users\SRL_KiloSort\AppData\Roaming\fiji\bigdataviewer\config/appearance.yaml not found. Using defaults.
Registration plugin RegisterSlicesElastixAffineCommand discovered
Registration plugin RegisterSlicesBigWarpCommand discovered
Registration plugin MirrorDoCommand discovered
Registration plugin RegisterSlicesElastixSplineCommand discovered
[WARNING] Ignoring unsupported output: view [ch.epfl.biop.atlas.aligner.gui.bdv.BdvMultislicePositionerView]


...........

Reading IFDs
Populating metadata
Populating OME metadata
SISReader initializing C:\Users\SRL_KiloSort\Documents\Histology\Vlad\Vlad_Alignment_ABBA\Vlad Sld 4 Sct 7.tif
Reading IFDs
Populating metadata
Populating OME metadata
java.nio.file.NoSuchFileException: C:\Users\username\.conda\envs\deepslice\deepslice_cli_v1.1.5.1.py
	at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:79)
	at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
	at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
	at sun.nio.fs.WindowsFileSystemProvider.newByteChannel(WindowsFileSystemProvider.java:230)
	at java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:434)
	at java.nio.file.Files.newOutputStream(Files.java:216)
	at java.nio.file.Files.copy(Files.java:3016)
	at ch.epfl.biop.wrappers.deepslice.DeepSlice.ensureScriptIsCopied(DeepSlice.java:77)
	at ch.epfl.biop.wrappers.deepslice.DeepSlice.execute(DeepSlice.java:90)
	at ch.epfl.biop.wrappers.deepslice.DeepSlice.execute(DeepSlice.java:177)
	at ch.epfl.biop.wrappers.BiopWrappersCheck.isDeepSliceSet(BiopWrappersCheck.java:70)
	at ch.epfl.biop.wrappers.deepslice.ij2commands.DeepSlicePrefsSet.run(DeepSlicePrefsSet.java:36)
	at org.scijava.command.CommandModule.run(CommandModule.java:196)
	at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:125)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:64)
	at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:247)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:750)
Could not copy CLI script: C:\Users\username\.conda\envs\deepslice\deepslice_cli_v1.1.5.1.py
Please try to add the script file manually
The CLI script to DeepSlice could not be copied to the env folder (C:\Users\username\.conda\envs\deepslice)
You can try to copy manually deepslice_cli_v1.1.5.1.py to this folder

@NicoKiaru
Copy link
Member

Did you use the installer ? If yes, this last error should not happen...

You can fix it by copying this file to the indicated location (C:\Users\username\.conda\envs\deepslice)

@Sarruedi
Copy link
Author

Sarruedi commented Jan 23, 2024

Yeah, I used the 'ABBA package' Windows installer in the end as I kept getting errors trying to install DeepSlice on its own (Tensorflow version incompatibility).

Thanks a lot for the link to the file, this did the trick!

@NicoKiaru
Copy link
Member

Ah! Because the installer failed in the pip installation, some parts of the installer were not executed:

https://github.com/BIOP/abba-installer/blob/8fae5db6eb24944009078a9f60ce1af988b1bd0a/post_install_win.bat#L35C5-L37C35

It's the reason why you had to do this thing manually.

Good that it's working, but an alternative solution would have been to uninstall ABBA (there's an uninstaller), and then re-launch the installer with the proper antivirus settings if possible.

Can you please let me know which antivirus you have and which settings you changed to fix the installation ? There's a chance future users could benefit from your experience.

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