Moneydance - Error Generating Graph - occurs for any "Net Worth" based graph

Lyndon Stayte's Avatar

Lyndon Stayte

Nov 03, 2021 @ 03:51 PM

Hi

Until a few days ago I had no problems generating Net Worth - based graphs. After adding a few transactions I found that the message "Error generating Graph" appeared when I tried to generate them. Other types of graph were generated without problems (eg Expenses, Income, etc). I was using Moneydance 2017.10 (1706) and thought maybe an upgrade to Moneydance 2022 would solve the problem. It did not.
So currently I am running Moneydance 2022 (4060), Windows 10, 64 bit.
I have about 9 years of data in my file. Is there a limit to the amount of data that can be displayed on a Net Worth graph? What other causes might there be for this problem?
Please advise.

best regards
Lyndon Stayte

  1. 1 Posted by Lyndon Stayte on Nov 04, 2021 @ 03:52 PM

    Lyndon Stayte's Avatar

    Hi
    Further information on this problem.

    1. I restored a back-up of the last working file. Net worth graphs were OK.
    2. I re-entered transactions and checked Net Worth graphs for each transaction.
    3. Everything worked fine until I transferred funds from an Investment Account to a Bank Account (by entering a negative sum in the Investment account). This caused the Net Worth graphs to fail.
    4. I deleted to problem transaction and tried to make the same transfer from the Bank Account register (by entering a deposit from the Investment Account. The Net Worth graph worked after this work-around.
    5. Next I tried transferring funds from the Bank Account to a different Investment Account (using the Bank Account register). This caused the Net Worth graph to fail again.
    6. I deleted the problem transaction and tried to make the same transfer using the second Investment Account. The Net Worth graph worked after this work-around again.

    Hope this helps.

    Conclusion: I have no idea what is going on but perhaps you do? I do not know if the work-around will continue to work in future, so I hope you will advise of a good solution soon.

    Many thanks
    Lyndon Stayte

  2. 2 Posted by Lyndon Stayte on Nov 08, 2021 @ 04:04 PM

    Lyndon Stayte's Avatar

    Hi

    Another update.
    After adding a few transactions in a Bank Account, Net Worth graphs failed again.
    The next day I added more transactions and the Net Worth graphs started working again.

    The current situation is that the Net Worth graphs are working fine.
    If it fails again I will let you know.

    regards
    Lyndon Stayte

  3. 3 Posted by Stuart Beesley ... on Nov 08, 2021 @ 04:10 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    Ok. Try this.
    Help/show console. Keep console open.
    Try to get the error again.
    Go back to console. Post the output here.

  4. 4 Posted by Lyndon Stayte on Nov 11, 2021 @ 02:34 PM

    Lyndon Stayte's Avatar

    Thanks for the suggestion Stuart. The problem has not re-occurred but I will use the Console Window to try to capture it if it does happen again.

  5. 5 Posted by Lyndon Stayte on Nov 22, 2021 @ 06:02 PM

    Lyndon Stayte's Avatar

    Ok, I managed to get the error again and captured it in the Console Window.

    I had entered 3 transactions in 2 investment accounts, followed by a transaction in Bank Account A, then a transfer from Bank Account B to Bank Account A. When I tried to generate a Net Worth graph I got the message "Error Generating Graph". I tried a few times with the same result. When I deleted the transfer Net Worth Graph was OK. Entering the transfer again caused a failure.

    My original problem was caused by a transfer from the same Bank Account B to an Investment Account, so it seems that Bank Account B seems to be suspect maybe?

    I attach a copy of the Console Window with personal info removed. I would greatly appreciate it if you can see what the problem is and how I might solve it.

    Many thanks.

  6. 6 Posted by Stuart Beesley ... on Nov 22, 2021 @ 06:40 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    It's failing on a sort.... Can you try this to prove my theory.

    Window/Moneybot Console
    in the Python Snippet section paste this:

    from com.infinitekind.moneydance.model import AccountUtil
    MD_REF=moneydance
    book = MD_REF.getCurrentAccount().getBook()
    acctTxns = book.getTransactionSet().getAllTxns()
    AccountUtil.sortTransactions(acctTxns, 7)
    
    Click Run Snippet. Does it error in the console below?
  7. 7 Posted by Stuart Beesley ... on Nov 22, 2021 @ 06:41 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    The sort is:
    DATE_THEN_AMOUNT_COMPARATOR

    Can you screen shot the txn that causes the error. Also right-click it and show details and send that too?

  8. 8 Posted by sth on Nov 22, 2021 @ 07:07 PM

    sth's Avatar

    Also, can you post a screen shot of a transaction that causes it to fail?

    Try using the "toolbox" extension of Stuart's to look for problems with your datafile.

    Are you using multiple currencies?

    (Not IK support)

  9. 9 Posted by sth on Nov 22, 2021 @ 07:10 PM

    sth's Avatar

    In looking at the console log.... What date format are you using?

  10. 10 Posted by Lyndon Stayte on Nov 22, 2021 @ 08:15 PM

    Lyndon Stayte's Avatar

    Thanks for the suggestions. I will try them when I get a chance.

    Some further info:

    I left the problem transaction (a debit) in place in Bank Account B (Net Worth Graph failing). I then entered another transaction (a deposit) in Bank Account B - Net Worth Graph started working again!

    Thanks for the help.

  11. 11 Posted by Lyndon Stayte on Nov 22, 2021 @ 08:33 PM

    Lyndon Stayte's Avatar

    To answer sth's questions:

    I am not using multiple currencies.

    Date format is dd/MM/yyyy

  12. 12 Posted by sth on Nov 23, 2021 @ 01:22 AM

    sth's Avatar

    Wow, that is pretty standard. Stuart can look at the internals a lot better than I can.

  13. 13 Posted by Stuart Beesley ... on Nov 24, 2021 @ 06:00 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    ??

  14. 14 Posted by Lyndon Stayte on Nov 25, 2021 @ 01:10 PM

    Lyndon Stayte's Avatar

    Hi

    I deleted transactions until I got a working Net Worth graph then adding them again until it failed.. (It failed on a different transaction this time!)
    Attached are the following:
    1. Python script results before and after the problem
    2. Screenshot of the problem transaction
    3. Description of the problem transaction
    HTH
    Thanks again

  15. 15 Posted by Stuart Beesley ... on Nov 25, 2021 @ 01:18 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    Odd! That’s just a normal txn, nothing to do with investments.

    Do you have other txns going to bills?

    What happens if you just select this account and bills for the NW report?

    I’ll have to ponder.

  16. 16 Posted by Lyndon Stayte on Nov 25, 2021 @ 05:02 PM

    Lyndon Stayte's Avatar

    Hi

    I have many txns going to bills. The problem is not limited to these types of txns, it seems to be random. For example, after the latest problem txn described in my previous message, I added a txn in a credit card account, and the NW Graph worked again. I deleted the CC txn and the graph failed. I re-entered the CC txn but it still failed. Even though I was now back in a previously working situation.

    I have tried selecting a single account and restricting the date range (to limit the amount of data involved), but the NW graph still fails.

    NB The failure is in the NW Graph. The NW Report works fine even when the Graph fails.

    Many thanks.

  17. 17 Posted by sth on Nov 25, 2021 @ 05:34 PM

    sth's Avatar

    Lyndon,
    I am making a wild guess here. This is weird and shouldn't happen. Do you have both an "account" and a "category" as "bills"? Capitalization doesn't matter. This is unlikely but might confuse the database.

    The python snippet looks like it shows the same sorting problem that MD has. Hopefully Stuart can help with that.
    (Scott, NOT IK support)

  18. 18 Posted by Lyndon Stayte on Nov 25, 2021 @ 06:03 PM

    Lyndon Stayte's Avatar

    Hi Scott

    I don't have an account called bills just a category.

    Thanks.

  19. 19 Posted by Stuart Beesley ... on Nov 25, 2021 @ 07:46 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    I plan to look further but have been ‘busy’ today. Yes, my script was designed to fail in the same place.

  20. 20 Posted by Stuart Beesley ... on Nov 25, 2021 @ 09:14 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    OK, can you save this attached script, launch Moneybot and then OPEN this py file. Then click RUN (not run snippet)..... This will NOT solve the problem but it will say what iteration it's failing on... Tell me, then I will update the code to dump out more info that can help us....

  21. 21 Posted by Stuart Beesley ... on Nov 26, 2021 @ 06:58 AM

    Stuart Beesley (Mr Toolbox)'s Avatar

    Ignore the above script.... Can you try this new script attached
    nw_sort_v2.py

    It will run the normal MD sort and then a fixed version. If it reports FAILED twice and then OK on the third (fixed) attempt, then we have found the problem. Let me know..

    So, get NW to fail as you did before, then try this script....

  22. 22 Posted by Lyndon Stayte on Nov 26, 2021 @ 11:51 AM

    Lyndon Stayte's Avatar

    Hi Stuart

    I ran the script you sent. Result is attached.

    It seems to fail in the same place each time. What confuses me is that sometimes it works, sometimes not, even though I haven't touched the account or asset it seems to be failing on.

    I hope the attached is helpful and I really appreciate your help.

    best regards

  23. 23 Posted by Lyndon Stayte on Nov 26, 2021 @ 12:25 PM

    Lyndon Stayte's Avatar

    Hi Stuart

    Some more info:

    I looked at the Account/Asset which seemed to be causing the failure and found an incorrect asset value when I sold the asset. I have no idea where the value came from. Anyway I deleted that particular value, and the NW graph still fails.

  24. 24 Posted by Stuart Beesley ... on Nov 26, 2021 @ 12:53 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    Can you try this latest version attached and again send me result (as a txt file)?

    We think the issue will appear random as there is a potential issue with the fallback in the sort... I'm just trying to prove this theory....

  25. 25 Posted by Lyndon Stayte on Nov 26, 2021 @ 02:43 PM

    Lyndon Stayte's Avatar

    Hi

    Here is the result of v3.

  26. 26 Posted by Stuart Beesley ... on Nov 26, 2021 @ 05:17 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    So.. the sort is this:

    compare:
    date
    .. then amount ...... if needed, compare the hidden dtentered (date entered) date/times ......... if still needed, as a fallback, compare hidden object Hashcode's...

    (The technical reason for the compare failing, is that the sort may not be 'transitive' - due to a bug)

    Sean the developer thinks it's failing on the last check (in rare situations)... Very rare and I cannot personally reproduce... He's going to make a fix to stop the last situation from occurring...

    The odd thing is that my Python step two is working for you... But I'm not sure why unless it's actually a different data problem on large numbers...

    So you have several choices..:
    1/ Wait for next preview to come out and try again (eta unknown)
    2/ email me at the below for another suggestion I have... Up to you....

  27. 27 Posted by Lyndon Stayte on Nov 27, 2021 @ 10:45 AM

    Lyndon Stayte's Avatar

    Hi Stuart

    Thanks for the information. I think I will wait for the next preview. Currently the NW Graph is working. I am pretty sure that if it fails again it will start working when I add another txn or 2. If it fails permanently I will let you know.

    Again, many thanks for all your help.

    best regards

  28. 28 Posted by sth on Nov 27, 2021 @ 04:05 PM

    sth's Avatar

    @Lyndon, thanks for the help in tracking down this issue! I really hope that Sean has found the source of this bug. -Scott

  29. 29 Posted by Stuart Beesley ... on Dec 06, 2021 @ 07:22 AM

    Stuart Beesley (Mr Toolbox)'s Avatar

    This should be fixed in preview build 4063.. Can you get your data into a state where you can reproduce the NW error each time, restart MD, check the NW error still exists, and then exit MD, install preview 4063. Then try the NW error again...

  30. 30 Posted by Lyndon Stayte on Dec 28, 2021 @ 04:04 PM

    Lyndon Stayte's Avatar

    Hi Stuart

    Sorry for the delayed response. Your message went into the Spam folder and I only just found it.
    The NW graph has not failed during the last few weeks. If it fails again I will do as you suggest and let you know the result.

    Thanks again
    Lyndon

  31. System closed this discussion on Mar 29, 2022 @ 04:10 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