Login  Register

Re: cannot import AnalyzeSkeleton

Posted by ctrueden on Dec 28, 2015; 1:55am
URL: http://imagej.273.s1.nabble.com/cannot-import-AnalyzeSkeleton-tp5015289p5015293.html

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