Login  Register

Re: Null Pointer Exception with IJ.getLuts

Posted by Curtis Rueden on Jun 21, 2018; 5:59pm
URL: http://imagej.273.s1.nabble.com/Null-Pointer-Exception-with-IJ-getLuts-tp5020833p5020836.html

Hi Alex,

I cannot reproduce. How are you running the code? Inside ImageJ? From an
IDE? Headless?

See https://imagej.net/Bug_reporting_best_practices

Regards,
Curtis

--
Curtis Rueden
LOCI software architect - https://loci.wisc.edu/software
ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden
Did you know ImageJ has a forum? http://forum.imagej.net/


On Thu, Jun 21, 2018 at 12:30 PM, Alex <
[hidden email]> wrote:

> Any thoughts?  User error, or something more fundamental?
> The error :
> Traceback (most recent call last):
>   File "/Users/alex/Source/IdeaProjects/imageJTest/imageJTest.py", line
> 114, in <module>
>     setupDialog(nTypes)
>   File "/Users/alex/Source/IdeaProjects/imageJTest/imageJTest.py", line
> 37, in setupDialog
>     lutList = IJ.getLuts()
>     at ij.Menus.getImageJMenu(Menus.java:785)
>     at ij.IJ.getLuts(IJ.java:2194)
>     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:62)
>     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
>     at java.base/java.lang.reflect.Method.invoke(Method.java:564)
> java.lang.NullPointerException: java.lang.NullPointerException
>
>
> The code snippet:
>
> from ij import IJ
>
> def setupDialog(nTypes):
>     # Get list of LUTs
>     lutList = IJ.getLuts()
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html