Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bcbookie.py traceback #64

Open
GoogleCodeExporter opened this issue Apr 27, 2015 · 3 comments
Open

bcbookie.py traceback #64

GoogleCodeExporter opened this issue Apr 27, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant