O.load: Input stream error

Asked by Huang peilun on 2021-03-15

Hi,

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?
Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jan Stránský
Solved:
2021-03-15
Last query:
2021-03-15
Last reply:
2021-03-15
Best Jan Stránský (honzik) said : #1

Hello,

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")

cheers
Jan

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

Huang peilun (hpl16) said : #2

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?

Huang peilun (hpl16) said : #3

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

Jan Stránský (honzik) said : #4

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..

cheers
Jan

Huang peilun (hpl16) said : #5

Thanks a lot.