← Back to team overview

yade-dev team mailing list archive

[Bug 826176] Re: Problem with saveVars

 

The simulation needs to be saved and then loaded to use this function.

https://answers.launchpad.net/yade/+question/167511

** Changed in: yade
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Yade
developers, which is the registrant for Yade.
https://bugs.launchpad.net/bugs/826176

Title:
  Problem with saveVars

Status in Yet Another Dynamic Engine:
  Invalid

Bug description:
  Hi,

  I want to save some variables with utils.saveVars() and load it in
  another script with utils.loadVars().

  test script 1:

  #!/usr/bin/python
  # -*- coding: utf-8 -*-
  a = 1

  b = 2

  c = 3
  utils.saveVars('savedVars',a=a,b=b,c=c)

  test script 2:

  #!/usr/bin/python
  # -*- coding: utf-8 -*-
  utils.loadVars('savedVars')

  error message:

  Running script save-vars-test2.py
  Traceback (most recent call last):
    File "/home/me/YADE/bin/yade-bzr2877", line 183, in runScript
      execfile(script,globals())
    File "save-vars-test2.py", line 3, in <module>
      utils.loadVars('savedVars')
    File "/home/me/YADE/lib/yade-bzr2877/py/yade/utils.py", line 67, in loadVars
      d=cPickle.loads(Omega().tags['pickledPythonVariablesDictionary'+mark])
  KeyError: 'Invalid key: pickledPythonVariablesDictionarysavedVars.xml.'

To manage notifications about this bug go to:
https://bugs.launchpad.net/yade/+bug/826176/+subscriptions


References