direct download from broker

David Reiser dbreiser at earthlink.net
Thu Jan 19 23:57:43 EST 2006


On Jan 7, 2006, at 7:54 PM, Victor Chudnovsky wrote:

>
> Hi all,
>
> I looked some more at the ofx.py script. I think I configured it
> correctly, but Python returns a "bad mac decode" error. Do any of you
> folks have any idea what this means? I've done very little Python and
> certainly not with sockets...
>
> Thanks,
>
> Victor
>
>
>
> Traceback (most recent call last):
>   File "./ofx.py", line 186, in ?
>     client.doQuery(query, argv[1]+dtnow+".ofx")
>   File "./ofx.py", line 154, in doQuery
>     f = urllib2.urlopen(request)
>   File "/usr/athena/lib/python2.3/urllib2.py", line 129, in urlopen
>     return _opener.open(url, data)
>   File "/usr/athena/lib/python2.3/urllib2.py", line 326, in open
>     '_open', req)
>   File "/usr/athena/lib/python2.3/urllib2.py", line 306, in  
> _call_chain
>     result = func(*args)
>   File "/usr/athena/lib/python2.3/urllib2.py", line 908, in https_open
>     return self.do_open(httplib.HTTPS, req)
>   File "/usr/athena/lib/python2.3/urllib2.py", line 884, in do_open
>     h.endheaders()
>   File "/usr/athena/lib/python2.3/httplib.py", line 712, in endheaders
>     self._send_output()
>   File "/usr/athena/lib/python2.3/httplib.py", line 597, in  
> _send_output
>     self.send(msg)
>   File "/usr/athena/lib/python2.3/httplib.py", line 564, in send
>     self.connect()
>   File "/usr/athena/lib/python2.3/httplib.py", line 985, in connect
>     ssl = socket.ssl(sock, self.key_file, self.cert_file)
>   File "/usr/athena/lib/python2.3/socket.py", line 73, in ssl
>     return _realssl(sock, keyfile, certfile)
> socket.sslerror: (1, 'error:140EC071:SSL  
> routines:SSL2_READ_INTERNAL:bad
> mac decode')

I was hoping someone else would comment, but now I'll just guess.

When I had a problem with finance::quote (a perl script) accessing a  
new https link, I had to add the package Crypt::SSLeay, which is  
designed to allow whatever other perl packages were running to  get  
to https sites.

I notice that for python, there are (at least):
python23-socket-ssl and
m2crypto-python
that both mention functions for python to handle ssl sockets. My mac  
doesn't seem to need them, so YMMV.

The other possibility is that Schwab really wants you to sign up  
first. You could try calling them and asking what do you have to do  
to get MS Money to connect directly (not that you're planning on it,  
and you aren't being dishonest -- just curious). If they say  
something about signing up seperately, or different authorizations,  
you have to decide if you want to ask them for access. Still doesn't  
mean you actually have to use Money, just that you want access via  
ofx (possibly ofc, in this case). I also don't recommend being  
confessive to support line folks. They'll just say it's impossible.
--
David Reiser
dbreiser at earthlink.net



More information about the gnucash-user mailing list