ParentTxn has disappeared? But not listed as Deprecated

v+ik's Avatar

v+ik

01 Apr, 2023 12:15 AM

So I have a little script to do some transactions, and it reads existing ones for input. Has been working fine for a couple years, but broke with the latest release of Moneydance.

isParent = isinstance( txn, ParentTxn )

NameError: global name 'ParentTxn' is not defined

Since it is still documented in the API, it is not clear why it fails. Help!

  1. 1 Posted by Stuart Beesley ... on 01 Apr, 2023 07:31 AM

    Stuart Beesley (Mr Toolbox)'s Avatar

    I just checked 2023.1(5006) and ParentTxn is still there and seems unchanged..

    In moneybot run this:

    from com.infinitekind.moneydance.model import ParentTxn

    What code exactly are you running? Have you lost the import?

    Email it to me and I'll check:
    … ?

  2. 2 Posted by Stuart Beesley ... on 16 Apr, 2023 04:58 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    ?

  3. 3 Posted by v+ik on 16 Apr, 2023 10:11 PM

    v+ik's Avatar

    I added the import, and it is working.
    Before I had from ... import *
    Apparently * no longer includes ParentTxn, but used to.

    And I thought I replied to this before, but it clearly didn't take. Maybe I forgot the last button. Sorry for the delay.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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