tree copy and paste gives error and saves xml that differs from what you see in diamond

Bug #811200 reported by Cian Wilson
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
Fraser Waters

Bug Description

Copying and pasting an element in the tree produces the error:

  File "/usr/lib/python2.7/dist-packages/diamond/", line 673, in on_paste
    newnode =, node)
  File "/usr/lib/python2.7/dist-packages/diamond/", line 532, in read
    datatree = self.valid_node(root)
  File "/usr/lib/python2.7/dist-packages/diamond/", line 167, in valid_node
ValueError: list.remove(x): x not in list

A simple dummy schema and an example "dml" that reproduces this in the attached tar file.

Open dummy.dml in diamond using the dummy.rng schema. Navigate to the nonlinear_solver::Simple option underneath system::Dummy. Copy it and paste it into a new nonlinear_solver. The above error appears in the terminal. Save the file and reopen it and an extra nonlinear_solver now appears despite the fact that it wasn't visible when you last looked at the file. None of the data is actually copied.

Not sure if this is just a case of the schema being a bit too complicated - though it's no more complicated than some of the options in the fluidity schema - but please point out if it's just a case of something being illegal in it.

Related branches

Revision history for this message
Cian Wilson (cwilson) wrote :
Changed in spud:
assignee: nobody → Fraser Waters (fraser-waters08)
Changed in spud:
status: New → In Progress
importance: Undecided → High
Revision history for this message
Fraser Waters (fraser-waters08) wrote :

It seems this applies only to Choice elements. It's not quite a simple parent-child relationship with them, but working on it.

Revision history for this message
Fraser Waters (fraser-waters08) wrote :

I think the fix for this is in the slice-view branch. (I did some unifying of Trees and Choices in that branch to make them behave more similar). Once I can merge slice-view into trunk I should then be able to fix this.

Changed in spud:
status: In Progress → Confirmed
Changed in spud:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.