Re: Python/Jython code that doesn't work in ImageJ

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Python/Jython code that doesn't work in ImageJ

J. Daniel Fenn
Curtis, thanks for the update on tracking this bug.

I thought I'd add just a little, in case it helps someone else.

Deleting the jffi-1.2.7 jar file does work, IF you are using the newer version of Fiji.  

However, I'm using the older version, and there is no jffi jar file.  But using your method of "Find Jar for Class", I discovered that the jruby-complete-1.7.11.jar was the offending file in my version of Fiji.

I'm using the lifeline version of Fiji from June, due to other problems.  In case anyone else is using the old version, you need to delete the jruby-complete jar.  

I also have the newer Fiji as well, and deleting the jffi jar did work there for me.  So I can make this script work in both versions now.  

Thanks for you help.




--------------------------------
Hi everyone,

> The following code works fine on my desktop version of python (2.7)
> but it does not work using the ImageJ/Fiji code editor (which I
> believe is using python 2.5.2)

This bug is being tracked at:
https://github.com/fiji/fiji/issues/83

As a workaround, you can delete jffi-1.2.7jar and Jython will work again.

I figured this out as follows:

* Plugins > Utilities > Find Jar for Class
* Paste name of problematic class from the exception:
com.kenai.jffi.InvocationBuffer
* Click OK
* Note the warning that appears about how the class is present in two
different locations.

Regards,
Curtis


On Tue, Jul 8, 2014 at 4:38 AM, Emanuele Martini <[hidden email]>
wrote:

> Hi,
> I don't try directly your code, but I use os in my jython script.
> I think that could be a problem of ImageJ 2/Fiji; because i can run my
> script with last imagej 1 version using FIJI script editor, but they don't
> work if I update to ImageJ2.
>
> So maybe you can try to run your script a ImageJ1 version.
> Have a nice day,
> Emanuele Martini
> Image Analys @ifom-ieo ressearch campus
>
>
>
> --
> View this message in context:
> http://imagej.1557.x6.nabble.com/Python-Jython-code-that-doesn-t-work-in-ImageJ-tp5008609p5008619.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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

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