Welcome! Log In Create A New Profile

Advanced

more errors / suggestions

Posted by ameridan 
more errors / suggestions
February 10, 2013 08:59PM
OK, my previous error is resolved. Now that I had more confidence in PalOMoney, I installed it on my own PC. but have run into new issues:

When running the program first-time, the Quote Sources don't show up as the ini file isn't created until the first exit, so I added this to the Help page.

None of my internal quote sources work, so I proceeded in adding YahooExtQuoteCSV as a python external quote source. My PC OS is XP SP3.

I was getting "External Module returned error code 2" and determined that I needed to add quotes to my output and schema file paths which contain blank spaces.

Although the quotes show up in the ini file, they don't "stick" in the QuoteSource window or the program and now I get "External Module returned error code 1" and "QuoteCSVpy.csv output file does not exist 123 or is empty (0)" even though the folder has write permissions.

[YahooExtQuoteCSV Section]
Name=YahooExtQuoteCSV
AddOn=c:\python26\python
Output File="C:\Documents and Settings\Dan's\My Documents\Microsoft Money\PalOMoney\quoteCSVpy.csv"
Output Format=0
Header Schema=1
Schema="C:\Documents and Settings\Dan's\My Documents\Microsoft Money\PalOMoney\quoteCSVSchema.csv"
URL Template="C:\Documents and Settings\Dan's\My Documents\Microsoft Money\PalOMoney\QuoteCSV.py" "http:// finance.yahoo.com/d/quotes.csv?s=%s+&f=sl1d1t1"
Real Time=1
Historical=0
Tickers in Output=1
Request Tickers=20
Login ID=
Password=
Found this in the ini file which again shows how the quotes aren't working properly ( 2 of them are missing)
Last External Launch=c:\python26\python C:\Documents and Settings\Dan's\My Documents\Microsoft Money\PalOMoney\QuoteCSV.py" "http:// finance.yahoo.com/d/quotes.csv?s=F+DD&f=sl1d1t1 "C:\Documents and Settings\Dan's\My Documents\Microsoft Money\PalOMoney\quoteCSVpy.csv"
; Note: space added after 'http://'


PalOMoney seems to assume that every investment needs to get quotes from the same source which is not true, unless that is what the future Grouping feature is for.

Activating the Hidden button doen't appear to reveal any old or closed out securities. It turns out all my closed out securities were zero shares, so without the zero option enabled they wouldn't show up :)

It would be nice if the selected Quote Source would be remembered in the pull-down.



Edited 7 time(s). Last edit at 02/11/2013 10:29PM by dev.
Re: more errors / suggestions
February 11, 2013 08:56PM
Thanks for the input. You are having a lot of problems. One at a time.

Quote

When running the program first-time, the Quote Sources don't show up as the ini file isn't created until the first exit, so I added this to the Help page.

Thank you for updating Help! Hmm. They should, because PalOMoney is supposed to add them whenever it finds the quote sources missing in PalOMoney.ini, and the writing to the disk should occur within a few seconds after population of the Quote Source selector. I will look into this.

Quote

None of my internal quote sources work, so I proceeded in adding YahooExtQuoteCSV as a python external quote source. My PC OS is XP SP3.

This is a drop dead issue, it just simply must work! Let's fix this immediately:

The first 2 sources are the live sources, one using the Yahoo Finance api and the second using the YQL api. The second 2nd and 3rd read the .csv and .xml files created by the 1st and 2nd and any external quote source you hook up.

What happens with the first (Yahoo Finance) source selected and press Update Now?
    1 Does a console window open?
    2 Does the console window list your securities?
    3 Do you see quotes in the listing?
The Yahoo Finance source produces 3 date and time stamped log files in your MnyUpdates folder, for example:
    1 MnyUpdate_2013-01-24_01-25.log
    2 MnyUpdate_2013-01-24_01-25_YahooFinanceQuote.log
    3 MnyUpdate_2013-01-24_01-25_YahooFinanceQuote.csv
MnyUpdate_XXXX.log
The MnyUpdate_XXXX.log file is the processing log, which is more or less a copy of the console window. It starts out with something like:
2013-01-24_01-25-55=Getting 'Finance.Yahoo.CSV' quotes for Money investments set for Online updates.
2013-01-24_01-25-55=OnLine	$INDU	Index	Dow Jones Industrial Average
A successful update would look like
2013-01-24_01-25-57=OnLine	CSCO	Stock	Cisco Systems
2013-01-24_01-25-58=CSCO: updating 'Wednesday, January 23, 2013' now 20.62 was 20.66.
In this case the stock was updated because the price for that date (which was already there) had changed.
2013-01-24_01-26-07=XXXXX: date 'Wednesday, January 23, 2013' not found in Money (closest was Tuesday, January 22, 2013).
2013-01-24_01-26-07=Creating XXXXX	11.02	Wednesday, January 23, 2013
In this case, the quote for 1/23 did not exist. The closest was the day before, so PalOMoney created a new online quote.

MnyUpdate_XXXX_YahooFinanceQuote.log
This is a very simple log that shows the ticker symbols stored in Money and whether the source had any data for them or not:
2013-01-24_01-25-55=$INDU returned 0 Quotes.
2013-01-24_01-25-58=CSCO returned 1 Quotes.
Use this to check and possibly adjust your symbols.
At some point, each quote source needs its own symbol mapper between ticker per Money and ticker per source.

MnyUpdate_XXXX_YahooFinanceQuote.csv
Ticker, Close, Date, Time
"$INDU",0.00,"N/A","N/A"
"CSCO",20.62,"1/23/2013","4:00pm"
This file can be fed into PalOMoney at a later date to update another file, or another program that can read the .csv.

Note the correct time of 4:00 pm. Regrettably, Money saves quote times as 0:00, which, if you think about it, is quite wrong, since the stock had not opened for trading that day at 0:00. There is a one-day-off quality to this scheme. Perhaps we can fix this.

Quote

I was getting "External Module returned error code 2" and determined that I needed to add quotes to my output and schema file paths which contain blank spaces.

Ok.

Quote

Although the quotes show up in the ini file, they don't "stick" in the QuoteSource window or the program and now I get "External Module returned error code 1" and "QuoteCSVpy.csv output file does not exist 123 or is empty (0)" even though the folder has write permissions.

Ignore Misunderstanding: Do you mean the quote source parameters ( not the "quotes" ) don't stick in the QuoteSource dialog? They should be the fifth entry record (entry). Check the " [ Quote Sources ] " index entry at the top of the .ini file:
[ Quote Sources ] 
... ( 4 internal source entries ) ...
YahooExtQuoteCSV=YahooExtQuoteCSV Section
These entries populate the Quote Source selector and the record selector in the Quote Source dialog.


Updated 2-13-2013: Thanks, this was the key, although I didn't understand your post at the time. The double quotes were being stripped when the .ini file was read. Of course, this caused a multitude of errors. This has been fixed in 1.0.3-a.


Looking at your section, I notice the following differences from the example:

Header Schema=1 (yours) vs Header Schema=0 (example). Does the example now add a header? If not, the schema is not in the header and the value should be 0.

; Yours
URL Template="C:\Documents and Settings\Dan's\My Documents\Microsoft Money\PalOMoney\QuoteCSV.py"  "http:// finance.yahoo.com/d/quotes.csv?s=%s+&f=sl1d1t1"
; Example
c:\python27\QuoteCSV.py  "http:// finance.yahoo.com/d/quotes.csv?s=%s+&f=sl1d1t1"

; Your Last Launched
Last External Launch=c:\python26\python C:\Documents and Settings\Dan's\My Documents\Microsoft Money\PalOMoney\QuoteCSV.py" "[finance.yahoo.com] "C:\Documents and Settings\Dan's\My Documents\Microsoft Money\PalOMoney\quoteCSVpy.csv"

Quote

Found this in the ini file which again shows how the quotes aren't working properly ( 2 of them are missing)
(followed by the Last External Launch entry above)

Aha. You mean the double quotes, not the quotes from say, Yahoo! Not to mention that the forum software takes the word 'quote' and starts to make a quote out of it!

The first part of the URL Template properly identifies the python script. However, the quotes are not making it to the launch command. This is a bug. I wonder if this is a path length issue.

Until this is fixed, try creating a folder off the root or off python with no spaces or special characters, modify the script, and try again. I will create your directories, and run the example. Update: this is in process now, read the next post. Updated 2-13-2013: fixed in 1.0.3-a.


Quote

PalOMoney seems to assume that every investment needs to get quotes from the same source which is not true, unless that is what the future Grouping feature is for.

Overlooked! What you are saying is that, for some portfolios, multiple quote sources will be required. Indeed, for example, Yahoo does not seem to return the indexes. This would be handled by scheduling quotes using these quote sources, and requesting all the tickers from all of them. Besides not being very economical, this will not work if there is ticker namespace collision. Money has a prefix (e.g., "US:") which PalOMoney right now discards. Is this the namespace/quote source correspondence you mean? Can you give an example of a ticker and quote source? Do you know if Money saves a field to use as a clue re quote source? Their quotes source either worked, or didn't. We would have to add this capability fairly soon. For now, you can use an external quote source with fixed tickers as a workaround. The external quote sources don't have to use dynamic ticker lists from Money.

Quote

Activating the Hidden button doesn't appear to reveal any old or closed out securities. It turns out all my closed out securities were zero shares, so without the zero option enabled they wouldn't show up.

Quote

It would be nice if the selected Quote Source would be remembered in the pull-down.

Yes, it should. On for the next release.



Edited 9 time(s). Last edit at 02/13/2013 06:54PM by dev.
Re: more errors / suggestions
February 11, 2013 10:04PM
I set up my external quote source to match yours, down to the document path.

Then I realized the forum software mangled your post (and my earlier post) and I edited both of them. Let's put a space after "http:// " to block this reformatting, and agree to remove any spaces before using.

; Note: space added after 'http://'
; Before
URL Template="C:\Documents and Settings\Dan's\My Documents\Microsoft Money\PalOMoney\QuoteCSV.py" "http:// finance.yahoo.com/d/quotes.csv?s=%s+&f=sl1d1t1"
; Yields
Last External Launch=c:\python26\python C:\Documents and Settings\Dan's\My Documents\Microsoft Money\PalOMoney\QuoteCSV.py" "http:// finance.yahoo.com/d/quotes.csv?s=F+DD&f=sl1d1t1 "C:\Documents and Settings\Dan's\My Documents\Microsoft Money\PalOMoney\quoteCSVpy.csv"

The problem is that the double quotes are in the wrong places. The first double quote is missing before 'c:\Documents...' The trailing double quote is missing from the http, etc. parameter. The output file name is properly quoted.

Fortunately, you can copy and past the Last External Launch entry into a console (command prompt) window, make minor edits, and see what happens:

Running
c:\python27\python "C:\Documents and Settings\Dan's\My Documents\Microsoft Money\PalOMoney\QuoteCSV.py" "http:// finance.yahoo.com/d/quotes.csv?s=F+DD&f=sl1d1t1" "C:\Documents and Settings\Dan's\My Documents\Microsoft Money\PalOMoney\quoteCSVpy.csv"
Writes the file correctly:
"F",13.11,"2/11/2013","4:00pm"
"DD",47.76,"2/11/2013","4:00pm"

It looks like there is something in the path that is causing trouble. More Later in this post (refresh to get latest). Now to see what is causing this problem. -- The problem is coming from the .ini file, which strips the quotes from quoted strings. Adding a second to all entries with initial and closing quotes fixes the problem. This will be fixed in the next release.

Workaround For now, use script and output file folders that do not require quoting, or hand edit the ini file to add an additional set of beginning and ending quotes.



Edited 4 time(s). Last edit at 02/11/2013 11:49PM by dev.
Sorry, you can't reply to this topic. It has been closed.