Windows MD 2017.8 (1691) Command Line Interface (CLI) Script Bugs
There are two issues :
1. jpython script execution does not work:
This was also the case for MD 2017.6 (1656) (see my original post here:
I modified the sample python set securities prices script to update a single security. When I invoke the Python scripting dialog (Ctrl+Shift+2), open the script and run it; it executes perfectly but when I run it via the CLI it fails.
To test the CLI with a command that works I run "C:\Program Files\Moneydance\Moneydance.exe" -invoke moneydance:showabout, I get the about screen displayed as expected.
When I run "C:\Program Files\Moneydance\Moneydance.exe" -invoke moneydance:fmodule:jpython:runfile?=C:\Users\<user>\Desktop\Now\Code\Python\Unit\Moneydance\md_set_prices.py, I get nothing, no matter how long I wait.
The path/module name (C:\Users\<user>\Desktop\Now\Code\Python\Unit\Moneydance\md_set_prices.py) is the same as used in the invoke the Python scripting dialog.
If I run "C:\Program Files\Moneydance\Moneydance.exe" -invoke_and_quit moneydance:fmodule:jpython:runfile?=C:\Users\<user>\Desktop\Now\Code\Python\Unit\Moneydance\md_set_prices.py, MD is launched and shuts down without updating the security price.
I have also checked my syntax with all available documentation here http://infinitekind.com/dev/urischeme, here https://infinitekind.com/developer, and here http://moneydance.com/help_docs/command_line.html.
Please fix this as this is the last major thing preventing me from migrating from Quicken to Moneydance. Using python modules I was able to fully automate my Quicken reporting and data loading, which I will be able to do if the jpython LCI works again.
2. Unable to invoke any report or most graphs:
When I run "C:\Program Files\Moneydance\Moneydance.exe" -invoke moneydance:showreport:NetWorthReport I get a java.lang.NullPointerException error dialog box (see attached).
However, if I run the command "C:\Program Files\Moneydance\Moneydance.exe" -invoke moneydance:showreport:NetWorthGraph or the command "C:\Program Files\Moneydance\Moneydance.exe" -invoke moneydance:showgraph:NetWorthGraph the graph is displayed as expected.
Please note, running with the showreport or the showgraph command yields the same result for a given report or graph.
I ran all the reports and graphs listed on https://infinitekind.com/dev/urischeme, which resulted in all reports failing with the NullPointerException error and most graphs.
Here is a list of my results:
Result....Report or Graph Name
Error......VATReport (but I don't have VAT/GST setup)
I also had trouble getting this to work in MD 2017.6 (1656) but I don't recall the details.
Comments are currently closed for this discussion. You can start a new one.
|?||Show this help|
|ESC||Blurs the current field|
|r||Focus the comment reply box|
|^ + ↩||Submit the comment|
You can use
Command ⌘ instead of
Control ^ on Mac
1 Posted by md_oz on 25 Sep, 2018 12:06 PM
It has been 1 week since I posted this. Can someone from MD support please respond regarding the status of these two items.
Support Staff 2 Posted by Sean Reilly on 25 Sep, 2018 01:01 PM
Ah yes, the command-line interface. I'm sorry to say that that hasn't kept up with the times as on some platforms launching with the command line doesn't really make sense and sometimes isn't possible.
In this case I'd guess that it fails because even though Moneydance and the extension itself are loaded when the URI is invoked, that the data file itself hasn't loaded. For the short term, I'd recommend one of two options:
1.Run the script with the python script runner under the window menu. That uses the built-in python environment rather than the extension which we're no longer working on. 2. Package an extension (either from a python script or java/kotlin code) and have it run your automated tasks upon receiving notification that a file has been loaded.
Speaking of extensions and python scripting, Moneydance 2019 will have far better support and capabilities for python scripts, both running them directly as well as packaging them in a flexible way as extensions.
All the best,
Developer, The Infinite Kind
Support Staff 3 Posted by Sean Reilly on 25 Sep, 2018 01:04 PM
Sorry, I should add that I'd like to back away from allowing the invoking of scripts from URIs (at least URIs invoked from outside of Moneydance), since it would make it trivial for some bad software to invoke Moneydance and run a nasty script that damaged or accessed your data without any confirmation step.
Developer, The Infinite Kind
4 Posted by md_oz on 27 Sep, 2018 07:03 PM
Thank you for your response.
#2 is beyond my current technical knowledge, but I can manually execute #1 for now.
Currently, I use Quicken as my books and records, with all investment analysis, stock selection, etc. done in a custom python environment. I invoke Quicken through a batch python process to extract and update information.
For example, dump balances, holdings & security master from Quicken, do my asset allocation/rebalance analysis in python, perform stock trades with my broker, and then use a python batch process to automatically update Quicken with any new securities that result. That way when security transactions flow into Quicken from my broker the security reference data has already been added. I have daily, weekly, monthly and annual regularly scheduled python scrips to perform these kinds of tasks automatically and I only have to review the resulting outputs.
I was hoping to do something similar with MD. Right now I have to logon to MD, run a dump script via the python interpreter, wait for a non-MD batch python processing script to complete, logon/stay on MD to run an update script via the python interpreter. I hope that the improvements in 2019 will make this a little easier.
I can't wait to see what the new capabilities of MD2019 are.
Thank you again and keep up the good work.
System closed this discussion on 27 Dec, 2018 07:10 PM.