bmonkaba / ga-bitbot

Automatically exported from code.google.com/p/ga-bitbot
GNU General Public License v3.0
0 stars 0 forks source link

bcbookie.py traceback #64

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Configuration loaded.
Note: The Amazon SNS text messaging service can be enabled/disabled by 
modifying the bcbookie_main.json configuration file
MtGoxHMAC: Enter your API key file encryption password.
Password:
Flash crash protection enabled (14400 sec delay)
--------------------------------------------------------------------------------
main: generating inital report
Traceback (most recent call last):
  File "bcbookie.py", line 586, in <module>
    b.report()
  File "bcbookie.py", line 99, in report
    export = sorted(self.records, key=itemgetter('priority'),reverse=True)
KeyError: 'priority'

==============

4 gene_defs, each have a priority set, one had trading enabled.

Original issue reported on code.google.com by anderson...@gmail.com on 13 Mar 2013 at 2:30

GoogleCodeExporter commented 9 years ago
tried putting a print self.records in before line 99.

I do see iterations of  u'priority': u'1363827310868602' in the records, though 
I wasnt able to check all of the records (not enough scrollback, didnt >> to 
file).

I'll try and get a full dump of self.records if/when I encounter this issue 
again.

Original comment by anderson...@gmail.com on 21 Mar 2013 at 12:57

GoogleCodeExporter commented 9 years ago
This traceback occurs when bookie is trying to place a sell order.

Original comment by anderson...@gmail.com on 23 Mar 2013 at 1:25

GoogleCodeExporter commented 9 years ago
Testing possible fix:

Line 99:
export = sorted(self.records, key=lambda priority: itemgetter('priority'), 
reverse=True)

This then caused an issue with line 123, noting that it could not find key 
'type'.
replaced 123 with:
if key == "u'type'":

Original comment by anderson...@gmail.com on 23 Mar 2013 at 2:34