Open mincentatties opened 6 years ago
This is a problem with the communication between Python and pyspinw. Please download the updated release from here (and remove the original executable from your machine): https://github.com/tsdev/spinw/releases/tag/v3.0.2py Now run the code:
tri = m.sw_model('triAF',1.)
m.swpref.setpref('fid',1.)
tri = m.sw_model('triAF',1.)
What did you get? The setting of fid
to 1 switches on the text output in pyspinw which caused your problem. It should be 0 by default which removes all text output from pyspinw.
That has fixed the problem. The first time I ran
tri = m.sw_model('triAF',1.)
I got the same error. Then after the fid
setting it went away.
Thanks
Strange, it should have been the opposite way. fid
is zero by default, so the first run should be fine, but the second after setting fid
to 1 should produce the error. Can you check what is the value of fid
right after pyspinw is started by using the command:
m.swpref.getpref('fid')
Thanks!
Thanks Sandor
Ok so I now get:
>>> m.swpref.getpref('fid')
{'label': 'file identifier for text output, default value is 1 (Command Window)', 'name': 'fid', 'val': 0.0}
Thanks! I didn't really solved the problem, just switched of the text output in pyspinw that caused it. I will do some tests to figure out what caused it.
{system: MacOS Sierra 10.12.6}
Hi Sandor
After installing pyspinw and trying your sample script I get the following:
Cheers Ross