tag:infinitekind.tenderapp.com,2009-01-14:/discussions/moneydance-development/2274-set_pricepyInfinite Kind: Discussion 2019-04-04T02:30:24Ztag:infinitekind.tenderapp.com,2009-01-14:Comment/467375142019-01-01T23:13:42Z2019-01-01T23:13:47ZSet_price.py<div><p>Running the set_price.py in the python scripting zeroes out existing security data when the moneydance file is closed. Any ideas as to what is going wrong.</p></div>richardtag:infinitekind.tenderapp.com,2009-01-14:Comment/467375142019-01-02T11:15:19Z2019-01-02T11:15:19ZSet_price.py<div><p>Hi Richard,<br>
Ah yes, sorry about that. We moved a while ago to requiring a sync/save call for snapshots to prevent an overflow of history entries which were coming from calls to create snapshots which weren't meant to be saved. Anyway, you should just change any calls to <code>security.setSnapshotInt(dateint, price)</code> to invoke syncItem() on the result: <code>security.setSnapshotInt(dateint, price).syncItem()</code>.</p>
<p>I'll update the sample code now too.</p>
<p>Thanks!</p>
<p>Sean Reilly<br>
Developer, The Infinite Kind<br>
<a href="http://infinitekind.com">http://infinitekind.com</a></p></div>Sean Reillytag:infinitekind.tenderapp.com,2009-01-14:Comment/467375142019-01-03T02:29:16Z2019-01-03T02:29:17ZSet_price.py<div><p>Thank you for the prompt response.</p></div>Richard