SegmentEditor: No node found for itemID

Whenever a new segment is created in ‘Segment editor’, this message appears in the python console:

No node found for itemID {19…??}

It is unknown in which release it started, it is noted in factory release 5.7.0-2024-08-05 r32964 / 52af5a2.

Just reporting as it floods the console and can cast doubts about user code.

Regards.

Tha ks for reporting. Could you please describe how to reproduce it?

Start slicer.
Load a scalar volume.
Go to ‘Segment editor’.
Click ‘Add’ a new segment.

The messages appear in the Python console, even with no ‘.slicerrc.py’ loaded. I agree it’s certainly harmless.

I cannot reproduce this on Windows, using the latest Slicer Preview Release. Could you please upload the full application log somewhere (dropbox, onedrive, …) and post the link here? Thank you.

Thank you for considering this.

The log file is here.

After further testing, it is related to SlicerEditor since the lines do not appear if SlicerEditor is not installed. I’ll use Slicer without this module as I’ve got another issue with it.

Sorry to have bothered you.

Ping @muratmaga .

2 Likes

Hi,

Thanks for reporting this issue. I think I found its source. This can quickly be resolved by removing the else statement in the method below, but I should investigate why this is being triggered when you are working in SegmentEditor.

I’ll remove this statement for now and push an update to the repo.

Oshane

Ok, thanks, I’ll keep you informed after my next build this weekend.

These messages no longer appear in the Python console.

The code completion combobox appears nicely. However, every time it appears, the following is printed in the terminal where Slicer is launched (not Python console):

Running "json.dumps(list(globals().keys()))" result is "[\"__name__\", \"__doc__\", ... very loooooong list... \"json\"]"

There is code completion though.

Hello @oothomas ,

This message also appears many many times in the terminal:

In "PyFileFileWriter" class, function 'canWriteObject' is expected to return a boolean !

I don’t mean to bother you, it’s just that I sometimes look for expected messages in the terminal and have to scroll much to find them.

Regards.

These will be good things to sort out - can you file issues on the repository?

Here you go.

1 Like