New Transaction using Python Script

Carlos Silveira's Avatar

Carlos Silveira

18 Mar, 2019 11:01 AM

Hello,

I am trying to add a new transaction using a python script. Although I've searched a lot in knowledge base and reference documentation, I was not able to write a code that works. The following lines, which are reported to work in other discussions, get me a NameError (name 'ParentTxn' is not defined):

from com.infinitekind.moneydance.model import *
book = moneydance.getCurrentAccountBook()
txn = ParentTxn(book)

Could anyone give me an insights? It would be greatly appreciated. Thanks

  1. 1 Posted by md_oz on 17 Apr, 2019 08:48 PM

    md_oz's Avatar

    I've had difficulty with bulk importing using the *, so I list out explicitly each imported module.

    So try "from com.infinitekind.moneydance.model import ParentTxn" to resolve your error.

    (I'm a fellow user and not official MD support.)

  2. System closed this discussion on 17 Jul, 2019 08:50 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

04 Feb, 2023 02:45 AM
04 Feb, 2023 02:41 AM
04 Feb, 2023 02:07 AM
04 Feb, 2023 12:47 AM
04 Feb, 2023 12:36 AM