tudorelu / pyjuque

⚡ Open Source Algorithmic Trading Bot for Python.
MIT License
463 stars 88 forks source link

Error executing examples/try_order_management.py in feature branch / order_management #2

Closed 4n71chr157 closed 4 years ago

4n71chr157 commented 4 years ago

Description When i am execute the python file examples/try_order_management.py in feature/order_management, i will get following error stack:

$ python examples/try_order_management.py 
Getting active pairs:
Traceback (most recent call last):
  File "examples/try_order_management.py", line 73, in <module>
    Main()
  File "examples/try_order_management.py", line 63, in Main
    execute_bot(
  File "E:\Develop\pyjuque\bot\Engine\OrderManagement.py", line 16, in execute_bot
    active_pairs = bot.getActivePairs(session)
AttributeError: 'NoneType' object has no attribute 'getActivePairs'

System Information

Additional Info I think some values are not set in the database at this point, so it deliver a NoneType Error. I hope you can help me at this point to figure what the problem is in this case.

Thank you very much!

tudorelu commented 4 years ago

Hey, thanks for submitting a first issue! Yes, first time you run it you must uncomment line 57 in try_order_management.py which initialises a database.

https://github.com/tudorelu/pyjuque/blob/feature/order_management/examples/try_order_management.py#L57