Null Pointer Exception with IJ.getLuts

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Null Pointer Exception with IJ.getLuts

Alex-2
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
Reply | Threaded
Open this post in threaded view
|

Re: Null Pointer Exception with IJ.getLuts

Curtis Rueden
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