got an NotImplementedError when running demo script: backtesting_bbands.py, and backtesting_sma.py in quickstart #3
Closed
domodo2012
started this conversation in
General
Replies: 2 comments 1 reply
|
Thanks a lot for reporting the issue. This seems to be a bug related to signal handling not supported on Windows: https://docs.python.org/3.8/library/asyncio-eventloop.html?highlight=add_signal_handler#asyncio.loop.add_signal_handler I'll work on a fix soon. |
0 replies
|
@domodo2012 could you please upgrade to basana 1.2.2 and let me know how it goes ? |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
hi, gbeced.
running demo script: backtesting_bbands.py, and "backtesting_sma.py" in quickstart, got an NotImplementedError, below are full messages:
`Traceback (most recent call last):
File "D:\python projects\basana\samples\backtesting_bbands.py", line 94, in
asyncio.run(main())
File "D:\Anaconda3\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "D:\Anaconda3\lib\asyncio\base_events.py", line 647, in run_until_complete
return future.result()
File "D:\python projects\basana\samples\backtesting_bbands.py", line 85, in main
await event_dispatcher.run()
File "D:\python projects\basana\basana\core\dispatcher.py", line 205, in run
await super().run(stop_signals=stop_signals)
File "D:\python projects\basana\basana\core\dispatcher.py", line 107, in run
asyncio.get_event_loop().add_signal_handler(stop_signal, self.stop)
File "D:\Anaconda3\lib\asyncio\events.py", line 539, in add_signal_handler
raise NotImplementedError
NotImplementedError`
it seems that asyncio.get_event_loop() need to implement a 'add_signal_handler' method, but you have inherited and implemented in class BacktestingDispatcher, Why is this error still occurring?
btw:
quickstart said 'Basana requires Python 3.8.1 or above', my python = 3.9.13, asyncio = 3.4.3
thanks.
All reactions