cannot import AnalyzeSkeleton

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

cannot import AnalyzeSkeleton

Aryeh Weiss
I have a python script that depends on the AnalyzeSkeleton_() class

This script was working properly last week when I tested the fix to the
memory
problem we had with Jython. However, today, the script cannot import
this class.

Here is the error:
from skeleton_analysis import AnalyzeSkeleton_
ImportError: No module named skeleton_analysis

And here is the line that generates this error:
from skeleton_analysis import AnalyzeSkeleton_
(which is actually  clear from the error message)

Here is what I find with the Command Finder:

Analyze Skeleton (2D/3D) Analyze>Skeleton
sc.fiji.analyzeSkeleton.AnalyzeSkeleton_
/Applications/local/fiji/Fiji.app/plugins/AnalyzeSkeleton_-3.0.0.jar


And with the updater I also find that plugins/AnalyzeSkeleton_jar is up
to date.

Why is the import failing?

Thanks in advance.
--aryeh

--
Aryeh Weiss
Faculty of Engineering
Bar Ilan University
Ramat Gan 52900 Israel

Ph:  972-3-5317638
FAX: 972-3-7384051


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: cannot import AnalyzeSkeleton

Aryeh Weiss
Update.

If I use
from org.doube.skeleton import AnalyzeSkeleton

and replace AnalyzeSkeleton_ with AnalyzeSkeleton, the script works
properly.

Does boneJ conflict with the stock Fiji distribution?

--aryeh


On 27/12/2015 2:23 PM, Aryeh Weiss wrote:

> I have a python script that depends on the AnalyzeSkeleton_() class
>
> This script was working properly last week when I tested the fix to
> the memory
> problem we had with Jython. However, today, the script cannot import
> this class.
>
> Here is the error:
> from skeleton_analysis import AnalyzeSkeleton_
> ImportError: No module named skeleton_analysis
>
> And here is the line that generates this error:
> from skeleton_analysis import AnalyzeSkeleton_
> (which is actually  clear from the error message)
>
> Here is what I find with the Command Finder:
>
> Analyze Skeleton (2D/3D) Analyze>Skeleton
> sc.fiji.analyzeSkeleton.AnalyzeSkeleton_
> /Applications/local/fiji/Fiji.app/plugins/AnalyzeSkeleton_-3.0.0.jar
>
>
> And with the updater I also find that plugins/AnalyzeSkeleton_jar is
> up to date.
>
> Why is the import failing?
>
> Thanks in advance.
> --aryeh
> --
> Aryeh Weiss
> Faculty of Engineering
> Bar Ilan University
> Ramat Gan 52900 Israel
>
> Ph:  972-3-5317638
> FAX: 972-3-7384051
>


--
Aryeh Weiss
Faculty of Engineering
Bar Ilan University
Ramat Gan 52900 Israel

Ph:  972-3-5317638
FAX: 972-3-7384051


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: cannot import AnalyzeSkeleton

Jan Eglinger
In reply to this post by Aryeh Weiss
Hi Aryeh,

 > from skeleton_analysis import AnalyzeSkeleton_
 > ImportError: No module named skeleton_analysis

The package was renamed in a recent commit:

https://github.com/fiji/AnalyzeSkeleton/commit/5587966

included in AnalyzeSkeleton_-3.0.0 shipped with Fiji now.


The following should work now:

     from sc.fiji.analyzeSkeleton import AnalyzeSkeleton_


This shouldn't interfere with BoneJ if you import the correct class.

Unfortunately, this breaking change for existing scripts wasn't
announced anywhere publicly before being uploaded to the update site.

Jan


On 27.12.15 13:23, Aryeh Weiss wrote:

> I have a python script that depends on the AnalyzeSkeleton_() class
>
> This script was working properly last week when I tested the fix to the
> memory
> problem we had with Jython. However, today, the script cannot import
> this class.
>
> Here is the error:
> from skeleton_analysis import AnalyzeSkeleton_
> ImportError: No module named skeleton_analysis
>
> And here is the line that generates this error:
> from skeleton_analysis import AnalyzeSkeleton_
> (which is actually  clear from the error message)
>
> Here is what I find with the Command Finder:
>
> Analyze Skeleton (2D/3D)     Analyze>Skeleton
> sc.fiji.analyzeSkeleton.AnalyzeSkeleton_
> /Applications/local/fiji/Fiji.app/plugins/AnalyzeSkeleton_-3.0.0.jar
>
>
> And with the updater I also find that plugins/AnalyzeSkeleton_jar is up
> to date.
>
> Why is the import failing?
>
> Thanks in advance.
> --aryeh
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: cannot import AnalyzeSkeleton

Aryeh Weiss
Hi Jan

Thank you for your rapid reply.

On 27/12/2015 6:16 PM, Jan Eglinger wrote:

> Hi Aryeh,
>
> > from skeleton_analysis import AnalyzeSkeleton_
> > ImportError: No module named skeleton_analysis
>
> The package was renamed in a recent commit:
> https://github.com/fiji/AnalyzeSkeleton/commit/5587966
> included in AnalyzeSkeleton_-3.0.0 shipped with Fiji now.
>
> The following should work now:
>
>     from sc.fiji.analyzeSkeleton import AnalyzeSkeleton_
>

Works as advertised.

--aryeh

>
> This shouldn't interfere with BoneJ if you import the correct class.
>
> Unfortunately, this breaking change for existing scripts wasn't
> announced anywhere publicly before being uploaded to the update site.
>
> Jan
>
>
> On 27.12.15 13:23, Aryeh Weiss wrote:
>> I have a python script that depends on the AnalyzeSkeleton_() class
>>
>> This script was working properly last week when I tested the fix to the
>> memory
>> problem we had with Jython. However, today, the script cannot import
>> this class.
>>
>> Here is the error:
>> from skeleton_analysis import AnalyzeSkeleton_
>> ImportError: No module named skeleton_analysis
>>
>> And here is the line that generates this error:
>> from skeleton_analysis import AnalyzeSkeleton_
>> (which is actually  clear from the error message)
>>
>> Here is what I find with the Command Finder:
>>
>> Analyze Skeleton (2D/3D)     Analyze>Skeleton
>> sc.fiji.analyzeSkeleton.AnalyzeSkeleton_
>> /Applications/local/fiji/Fiji.app/plugins/AnalyzeSkeleton_-3.0.0.jar
>>
>>
>> And with the updater I also find that plugins/AnalyzeSkeleton_jar is up
>> to date.
>>
>> Why is the import failing?
>>
>> Thanks in advance.
>> --aryeh
>>
>


--
Aryeh Weiss
Faculty of Engineering
Bar Ilan University
Ramat Gan 52900 Israel

Ph:  972-3-5317638
FAX: 972-3-7384051

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: cannot import AnalyzeSkeleton

ctrueden
Hi Aryeh,

> Here is what I find with the Command Finder:
>
> Analyze Skeleton (2D/3D)        Analyze>Skeleton
sc.fiji.analyzeSkeleton.AnalyzeSkeleton_ /Applications/local/fiji/Fiji.
app/plugins/AnalyzeSkeleton_-3.0.0.jar

Your instinct to check the Command Finder was good—you can see the
"sc.fiji.analyzeSkeleton" prefix above. You can always use this approach to
determine the right invocation for a plugin class.

Regards,
Curtis

On Sun, Dec 27, 2015 at 10:29 AM, Aryeh Weiss <[hidden email]> wrote:

> Hi Jan
>
> Thank you for your rapid reply.
>
> On 27/12/2015 6:16 PM, Jan Eglinger wrote:
>
>> Hi Aryeh,
>>
>> > from skeleton_analysis import AnalyzeSkeleton_
>> > ImportError: No module named skeleton_analysis
>>
>> The package was renamed in a recent commit:
>> https://github.com/fiji/AnalyzeSkeleton/commit/5587966
>> included in AnalyzeSkeleton_-3.0.0 shipped with Fiji now.
>>
>> The following should work now:
>>
>>     from sc.fiji.analyzeSkeleton import AnalyzeSkeleton_
>>
>>
> Works as advertised.
>
> --aryeh
>
>
>> This shouldn't interfere with BoneJ if you import the correct class.
>>
>> Unfortunately, this breaking change for existing scripts wasn't announced
>> anywhere publicly before being uploaded to the update site.
>>
>> Jan
>>
>>
>> On 27.12.15 13:23, Aryeh Weiss wrote:
>>
>>> I have a python script that depends on the AnalyzeSkeleton_() class
>>>
>>> This script was working properly last week when I tested the fix to the
>>> memory
>>> problem we had with Jython. However, today, the script cannot import
>>> this class.
>>>
>>> Here is the error:
>>> from skeleton_analysis import AnalyzeSkeleton_
>>> ImportError: No module named skeleton_analysis
>>>
>>> And here is the line that generates this error:
>>> from skeleton_analysis import AnalyzeSkeleton_
>>> (which is actually  clear from the error message)
>>>
>>> Here is what I find with the Command Finder:
>>>
>>> Analyze Skeleton (2D/3D)     Analyze>Skeleton
>>> sc.fiji.analyzeSkeleton.AnalyzeSkeleton_
>>> /Applications/local/fiji/Fiji.app/plugins/AnalyzeSkeleton_-3.0.0.jar
>>>
>>>
>>> And with the updater I also find that plugins/AnalyzeSkeleton_jar is up
>>> to date.
>>>
>>> Why is the import failing?
>>>
>>> Thanks in advance.
>>> --aryeh
>>>
>>>
>>
>
> --
> Aryeh Weiss
> Faculty of Engineering
> Bar Ilan University
> Ramat Gan 52900 Israel
>
> Ph:  972-3-5317638
> FAX: 972-3-7384051
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: cannot import AnalyzeSkeleton

Aryeh Weiss
Hi Curtis,

On 28/12/2015 3:55 AM, Curtis Rueden wrote:

> Hi Aryeh,
>
> > Here is what I find with the Command Finder:
> >
> > Analyze Skeleton (2D/3D)        Analyze>Skeleton
> sc.fiji.analyzeSkeleton.AnalyzeSkeleton_
> /Applications/local/fiji/Fiji.app/plugins/AnalyzeSkeleton_-3.0.0.jar
>
> Your instinct to check the Command Finder was good—you can see the
> "sc.fiji.analyzeSkeleton" prefix above. You can always use this
> approach to determine the right invocation for a plugin class.
>

Thank you for following up.
I did not properly understand the significance of that column.
Now I do, and it will be very useful.

Best regards,
--aryeh

> Regards,
> Curtis
>
> On Sun, Dec 27, 2015 at 10:29 AM, Aryeh Weiss <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hi Jan
>
>     Thank you for your rapid reply.
>
>     On 27/12/2015 6:16 PM, Jan Eglinger wrote:
>
>         Hi Aryeh,
>
>         > from skeleton_analysis import AnalyzeSkeleton_
>         > ImportError: No module named skeleton_analysis
>
>         The package was renamed in a recent commit:
>         https://github.com/fiji/AnalyzeSkeleton/commit/5587966
>         included in AnalyzeSkeleton_-3.0.0 shipped with Fiji now.
>
>         The following should work now:
>
>             from sc.fiji.analyzeSkeleton import AnalyzeSkeleton_
>
>
>     Works as advertised.
>
>     --aryeh
>
>
>         This shouldn't interfere with BoneJ if you import the correct
>         class.
>
>         Unfortunately, this breaking change for existing scripts
>         wasn't announced anywhere publicly before being uploaded to
>         the update site.
>
>         Jan
>
>
>         On 27.12.15 13:23, Aryeh Weiss wrote:
>
>             I have a python script that depends on the
>             AnalyzeSkeleton_() class
>
>             This script was working properly last week when I tested
>             the fix to the
>             memory
>             problem we had with Jython. However, today, the script
>             cannot import
>             this class.
>
>             Here is the error:
>             from skeleton_analysis import AnalyzeSkeleton_
>             ImportError: No module named skeleton_analysis
>
>             And here is the line that generates this error:
>             from skeleton_analysis import AnalyzeSkeleton_
>             (which is actually  clear from the error message)
>
>             Here is what I find with the Command Finder:
>
>             Analyze Skeleton (2D/3D)     Analyze>Skeleton
>             sc.fiji.analyzeSkeleton.AnalyzeSkeleton_
>             /Applications/local/fiji/Fiji.app/plugins/AnalyzeSkeleton_-3.0.0.jar
>
>
>             And with the updater I also find that
>             plugins/AnalyzeSkeleton_jar is up
>             to date.
>
>             Why is the import failing?
>
>             Thanks in advance.
>             --aryeh
>
>
>
>
>     --
>     Aryeh Weiss
>     Faculty of Engineering
>     Bar Ilan University
>     Ramat Gan 52900 Israel
>
>     Ph:  972-3-5317638
>     FAX: 972-3-7384051
>
>     --
>     ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
>


--
Aryeh Weiss
Faculty of Engineering
Bar Ilan University
Ramat Gan 52900 Israel

Ph:  972-3-5317638
FAX: 972-3-7384051


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: cannot import AnalyzeSkeleton

Michael Doube-4
In reply to this post by Jan Eglinger
Hi Jan, Aryeh,

> The following should work now:
>
>     from sc.fiji.analyzeSkeleton import AnalyzeSkeleton_
>
>
> This shouldn't interfere with BoneJ if you import the correct class.

That's correct. The reason for changing the namespace is to allow BoneJ and other Java plugins to more easily reuse AnalyzeSkeleton. Better to use the sc.fiji.* package than the BoneJ package because we'll be dropping it in future BoneJ versions and using the sc.fiji.* package ourselves.

> Unfortunately, this breaking change for existing scripts wasn't announced anywhere publicly before being uploaded to the update site.

Point taken.

Michael


>
> Jan
>
>
> On 27.12.15 13:23, Aryeh Weiss wrote:
>> I have a python script that depends on the AnalyzeSkeleton_() class
>>
>> This script was working properly last week when I tested the fix to the
>> memory
>> problem we had with Jython. However, today, the script cannot import
>> this class.
>>
>> Here is the error:
>> from skeleton_analysis import AnalyzeSkeleton_
>> ImportError: No module named skeleton_analysis
>>
>> And here is the line that generates this error:
>> from skeleton_analysis import AnalyzeSkeleton_
>> (which is actually  clear from the error message)
>>
>> Here is what I find with the Command Finder:
>>
>> Analyze Skeleton (2D/3D)     Analyze>Skeleton
>> sc.fiji.analyzeSkeleton.AnalyzeSkeleton_
>> /Applications/local/fiji/Fiji.app/plugins/AnalyzeSkeleton_-3.0.0.jar
>>
>>
>> And with the updater I also find that plugins/AnalyzeSkeleton_jar is up
>> to date.
>>
>> Why is the import failing?
>>
>> Thanks in advance.
>> --aryeh
>>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
Michael Doube
BPhil BVSc PGCert(Vet Ed) PhD FHEA MRCVS
Lecturer, Comparative Biomedical Sciences
The Royal Veterinary College, University of London
Royal College Street
London NW1 0TU
United Kingdom

+44 (0)20 7121 1903 (Internal: 5503)
@mdoube

<http://www.rvc.ac.uk>

This message, together with any attachments, is intended for the stated addressee(s) only and may contain privileged or confidential information. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Royal Veterinary College.

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