-
Notifications
You must be signed in to change notification settings - Fork 82
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
Ij.io().open() raises java.lang.NullPointerException #285
Comments
I can confirm this problem still exists.
|
@kmilo9999 @biosciflo Another workaround: FileLocation = jimport("org.scijava.io.location.FileLocation")
loc = FileLocation("C:\\path\\to\\image.tif")
dataset = ij.io().open(loc) |
Specifically: if the URI resolution returns null, rather than actually returning null, let's wrap the string into a FileLocation as a fallback. See imagej/pyimagej#285.
I looked into this issue a bit... is it possible you are both using absolute paths but with forward slashes? For example: I can replicate the problematic I pushed a tentative fix: scijava/scijava-common@0d95340. |
That might be the reason. But when I use |
I don't know if this was fix or not but i ran into the same problem for some images like they describe it here (https://forum.image.sc/t/ij-io-open-raises-java-lang-nullpointerexception/72625)
But its a bit more frustrating for me i have two images in the same location imageA.lsm works fine, but imageB.lsm raises the exception (java.lang.NullPointerException: Cannot invoke "org.scijava.io.location.Location.getName()" because "loc" is null), and when i copy it into the fiji folder than it works. But this is only when I test it on a different windows machine, on my own both images work just fine.
The problem is i want to distribute the program as an standalone (via pyinstaller) and that works just fine on my machine but on others i get these inconsistent problems which is very hard to find out and fix.
The text was updated successfully, but these errors were encountered: