O.load: Input stream error

Asked by Huang peilun


I just update the yadedaily. It's now Yade 20210313-5135~5285d37~bionic1.
Before I update, O.load works fine. Now it reports this error:

RuntimeError Traceback (most recent call last)
/usr/bin/yadedaily in <module>()
----> 1 O.load('Triax_PSD1.xml.bz2')

RuntimeError: input stream error

I don't know why this happen. Can someone help me out?

Question information

English Edit question
Yade Edit question
No assignee Edit question
Solved by:
Jan Stránský
Last query:
Last reply:
Revision history for this message
Best Jan Stránský (honzik) said :


how did you saved the files you want to load? With the same version you load it, or with the older version of Yade? If the older version, this behavior is expected [1] ("The file should be saved in the same version of Yade, otherwise compatibility is not guaranteed")


[1] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Omega.load

Revision history for this message
Huang peilun (hpl16) said :

Thanks. Now I understand. I saved the files with the old version. But in this case if I want to repeat the simulation or try some other conditions, I should not update Yade often?

Revision history for this message
Huang peilun (hpl16) said :

Thanks Jan Stránský, that solved my question.

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

Not updating often is one approach.
Re-saving the files for next version is another approach.

Yet another approach, IMO preferable, is not to O.save :-) E.g. if you only need packing (and you create O.engines, materials etc. from scratch), then you can export.text / ymport.text particle positions.
But it depends on specific use case (which is not described much here), there are cases where O.save might be really needed..


Revision history for this message
Huang peilun (hpl16) said :

Thanks a lot.