Error - Exception : Element groups is not defined in this scope

T-Shirt.sm2d (2.7 KB)

I think the Error occured after I created and removed node groups on my pattern.

Now when I try to open this file I get this error.

I share the problematic file here.

Question 1) How can I open this file now?

Question 2) How to prevent this error from happening?

You might be using a version that had a bug writing the groups and images tag when the image feature was added.

If you open the pattern file in a text editor you need to switch the order of the < groups > and < images > block(s) so they are in this order:

    </pieces>
    <groups/>
    <images/>
</draftBlock>

Update to the current release which does not have the groups / images tags bug. It also fixes some other bugs related to internal paths.

I updated Seamly App.

I still can not open the Pattern file.

I did not try the open the pattern file with a text editor yet.

Correct… because the file was written incorrectly with the previous ver. The new release will only write patterns correctly, it can’t read an incorrect pattern file. I fixed the pattern in the other topic, but here it is again:

T-Shirt_fixed.sm2d (2.6 KB)

Thank you very much for the answer again.

Again… you may have to adjust the path of the measurement file and the values for the added measurements in SeamlyMe.

I also encountered the bug. Seamly crashed 3 times while I was trying to make a very simple file. I recreated it twice and the answer is not obvious to me even with a text editor. Could you fix this so I can open it pretty please. It has no associated measurement file. I used custom variables. In case it is a new bug, I had just deleted the last element of a group and it crashed when I tried to delete the group. I now have the latest version of seamly2d. (Built on September 14 2:07:12)

simplepintuck.sm2d (4.2 KB)

This is quite an old bug that has been fixed. .. but while newer versions don’t cause the mixed up tags, they won’t fix the file themselves.

The issue is here… where the <groups> and <images> tags are out of order.

Just need to edit the file to switch the order:

simplepintuck_fixed.sm2d (4.2 KB)

That fixed it. thank you

You are welcome.

The bug was an unintemded oversight when the image import was added in that when the draft block section was created it was not implicitly writing out out the full schema of element tags - evenl if they are empty - which led to sometimes the <images> getting written before <groups>. Because the pattern XML is validated against the schema the order has to match. The excception “Element groups is not defined in this scope” is computerese for the ‘groups’ element is out of order with the ‘images’ element. "