Error "RuntimeError: XML start/end tag mismatch"

Asked by Hien Nguyen

Hi all, again I have questions.
In my simulation, sometimes I have to save the simulation under XML file to load it later into another process.
For example, in my case I use
O.save('firstpoint.xml')
and in other script(2nd script), to load it I use O.load('firstpoint.xml')
but when I run the 2nd script in the terminal there is an error like this

Error "RuntimeError: XML start/end tag mismatch"

I googled that and saw that is somethings like error in writing XML file itself, but I don't make any change in the content of the XML file, so how could this happen? And how to resolve it?
Thank you.

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Hien Nguyen
Solved:
Last query:
Last reply:
Revision history for this message
Hien Nguyen (giahien) said :
#1

More info:
I'm running YADE 0.97
Ubuntu 12.04
And I run the script also with another version Yade-Daily but still the same error.

Revision history for this message
Jan Stránský (honzik) said :
#2

Hello,
could you please provide us with minimal working example(s) reproducing the
error?
thanks
Jan

2013/6/17 Nguyen N.G. Hien <email address hidden>

> Question #230900 on Yade changed:
> https://answers.launchpad.net/yade/+question/230900
>
> Nguyen N.G. Hien posted a new comment:
> More info:
> I'm running YADE 0.97
> Ubuntu 12.04
> And I run the script also with another version Yade-Daily but still the
> same error.
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Hien Nguyen (giahien) said :
#3

This is the two script. I do the triaxial test.
1st one: http://pastebin.com/0ParWY5u
In this part I'll do the triaxial test and make the 'check point' of several states that I want to next process

2nd one: http://pastebin.com/3LjyBpFj
Then I'll run this script to do the stress probing.

 When I run the 1st script, effectively it will create XML files from firstpoint.xml to fourthpoint.xml
Then I'll run the 2nd script, I'll load from those XML file to process my next step. But I had that error.
Hope this is clear enough for you.
Thanks in advance.

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#4

After a quick look, I don't understand everything (e.g., why defining a triax in 2nd script before loading the scene?), but at least I see you have no reason to save in xml format.
Do you still have problems when saving in binary (O.save("final.yade"))?

Also, is there a delay between script 1 and script 2 so that everything is effectively flushed to the HD? Your error message suggests the saved file is malformed.

Bruno

Revision history for this message
Hien Nguyen (giahien) said :
#5

Hello Bruno,
I split the script into 2 because this time I want to do the stress probing: in the curve I have from the triaxial test (result from first script), I pick 4 points to do the stress probing (that why I save into 4 files), and I don't want to run from the beginning if when I only want to change in the stress probing process. (For example, I change the probing value from d_sigma=1000Pa tp d_sigma=3000Pa).
I can combine two scripts but for that I can only run 1 case and I don't like that because I can only run only one case with this combined script.
The error happens when I start to run the 2nd script, I know that there must be problem with the saving of the XML file but I don't know exactly the reason, before I run it normally.
I'll try again with saving the file with the .yade extension, but since the simulation is slow like hell, I can only report to you the next day.
Pardon me for not as clear as you want.

And you ask me why I defined triax one more time in the 2nd script, that's because of in the probing process, when I modified the goal1, goal2, goal3 (triax.goal1, triax.goal2,triax.goal3, I want to keep it to make it more understandable when I have to re-read my code in the futur, personal reason then), if there's no triax re-definition, the code doesn't understand and stop right away.

I'll run it again and see if the problem is solved, when it's confirmed I'll close this question. Thank you.

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#6

> since the simulation is slow like hell, I can only report to you the next day

?!
Maybe test your scripts with 50 spheres?

Revision history for this message
Hien Nguyen (giahien) said :
#7

Somehow the problem was caused by the error of transfering file between server and my computer (since I run the script on server), when I run on personal PC the problem is gone.
Thank you.

Revision history for this message
Jan Stránský (honzik) said :
#8

Hello Nguyen,
just small question, did you use the same or different versions of Yade on
the server on in personal PC?
Thanks
Jan

2013/6/20 Nguyen N.G. Hien <email address hidden>

> Question #230900 on Yade changed:
> https://answers.launchpad.net/yade/+question/230900
>
> Status: Answered => Solved
>
> Nguyen N.G. Hien confirmed that the question is solved:
> Somehow the problem was caused by the error of transfering file between
> server and my computer (since I run the script on server), when I run on
> personal PC the problem is gone.
> Thank you.
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Hien Nguyen (giahien) said :
#9

Hello Jan Stránský,
I use different versions
On my pc it's yade-stable 0.97, ubuntu 12.04 64 bit.
On server it's yade-daily (I dont rememner the version number), Ubuntu 11.10

Revision history for this message
Jan Stránský (honzik) said :
#10

Ok, so this is the source of the problem :-) O.save and O.load functions
should be used with the same version. It would alsio be nice to have this
information in the documentation, thanks for pointing it out.
Jan

2013/6/20 Nguyen N.G. Hien <email address hidden>

> Question #230900 on Yade changed:
> https://answers.launchpad.net/yade/+question/230900
>
> Nguyen N.G. Hien posted a new comment:
> Hello Jan Stránský,
> I use different versions
> On my pc it's yade-stable 0.97, ubuntu 12.04 64 bit.
> On server it's yade-daily (I dont rememner the version number), Ubuntu
> 11.10
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>