Replies: 1 comment 1 reply
-
my recommended solution would be to use 'callable' method -
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I tried "ohlcv" sample as provided here -
https://github.com/bmoscon/cryptofeed/blob/master/examples/demo_ohlcv.py
unfortunately it throws error - AttributeError: 'function' object has no attribute 'start'
when I checked the Aggregate callback
class AggregateCallback:
def init(self, handler):
self.handler = handler
print(">>>>", self.handler, hasattr(self.handler, 'class')) # added by me for debugging
if hasattr(self.handler, 'class'):
setattr(self, 'start', self.handler.start)
setattr(self, 'stop', self.handler.stop)
self.name = self.handler.class
the hasattr returns true for async functions, I think an async function is an object as well.
I'm using latest cryptofeed release.
Beta Was this translation helpful? Give feedback.
All reactions