jessepollak / mixpanel-python-async

:zap: Batch and send your Mixpanel API calls asynchronously in Python
Other
56 stars 14 forks source link

not working with mixpanel version 4.8.0 #18

Closed dbalosh closed 3 years ago

dbalosh commented 3 years ago

Hi, first thanks for this library. using mixpanel-py-async = "==0.2.0", When I've update mixpanel to version 4.8.0 I got:

Traceback (most recent call last):
  File "run.py", line 12, in <module>
    consumer.flush(async_=False)
  File ".../python3.6/site-packages/mixpanel_async/async_buffered_consumer.py", line 221, in flush
    self._sync_flush(endpoint=endpoint)
  File ".../python3.6/site-packages/mixpanel_async/async_buffered_consumer.py", line 261, in _sync_flush
    super(AsyncBufferedConsumer, self)._flush_endpoint(endpoint)
  File ".../python3.6/site-packages/mixpanel/__init__.py", line 711, in _flush_endpoint
Exception in thread Thread-1:
Traceback (most recent call last):
  File ".../lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File ".../python3.6/site-packages/mixpanel_async/async_buffered_consumer.py", line 37, in run
    self.consumer._sync_flush()
  File ".../python3.6/site-packages/mixpanel_async/async_buffered_consumer.py", line 261, in _sync_flush
    super(AsyncBufferedConsumer, self)._flush_endpoint(endpoint)
  File ".../python3.6/site-packages/mixpanel/__init__.py", line 711, in _flush_endpoint
    self._consumer.send(endpoint, batch_json, self._api_key, self._api_secret)
AttributeError: 'AsyncBufferedConsumer' object has no attribute '_api_secret'

    self._consumer.send(endpoint, batch_json, self._api_key, self._api_secret)
AttributeError: 'AsyncBufferedConsumer' object has no attribute '_api_secret'

git repo that reproduce it: https://gitlab.com/danielbalosh/mixpanel-bug-4.8.0.git

Am I missing something, or is the new mixpanel version broke the support?

seizethedave commented 3 years ago

I have released a mixpanel-python 4.8.1 that should fix this.

dbalosh commented 3 years ago

@seizethedave, thank you. I can confirm this is fixed with mixpanel-python 4.8.1