jessepollak / mixpanel-python-async

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

Unable to find setup.py from pip install #5

Closed RedBlueThing closed 10 years ago

RedBlueThing commented 10 years ago

Getting the following error when I run pip install:

Running setup.py egginfo for package mixpanel-py-async Traceback (most recent call last): File "", line 16, in IOError: [Errno 2] No such file or directory: '/var/folders/c/8v6s9zgn6g55byn0ykrm7pv40000gn/T/pip-build/mixpanel-py-async/setup.py' Complete output from command python setup.py egginfo: Traceback (most recent call last): File "", line 16, in IOError: [Errno 2] No such file or directory: '/var/folders/c/8v6s9zgn6g55byn0ykrm7pv40000gn/T/pip-build/mixpanel-py-async/setup.py'

jessepollak commented 10 years ago

What platform are you on?

RedBlueThing commented 10 years ago

Mac OS X - 10.9.2 Python 2.7.6 pip 1.2.1

jessepollak commented 10 years ago

can you try upgrading your pip?

RedBlueThing commented 10 years ago

Will do. I'll let you know how I go. :)

RedBlueThing commented 10 years ago

Yep. That worked thanks.

I am having a separate issue now with some events being lost. I am guessing the apache instance is shutting down and queued events are dropped.

I am sure there is somewhere in Django I can put a consumer.flush(async=False) (when the apache process ends), but I am not familiar enough with Django to know where. :)

jessepollak commented 10 years ago

Are you using 0.0.3? I just fixed a bug that was causing some events to be lost.

RedBlueThing commented 10 years ago

I was actually using 0.0.2, but I just upgraded and retested my problem and had the same issue. Finding lots of events not appearing in MP. I tried doing this and still not seeing these events come through:

    # tell mixpanel
    mp.track(request.user.id, 'tip', updated_tip_data)

    # flush all the things async
    consumer.flush(async=True)

If I set async=False I see the events come through.

jessepollak commented 10 years ago

Where is that flush being called? If it's in a script, and you flush async then the script exits, those events will be lost.

RedBlueThing commented 10 years ago

Nope it's in a view.

jessepollak commented 10 years ago

Any chance you could post a minimal case that replicates the flaw?

RedBlueThing commented 10 years ago

Hi Jesse, sorry for the long delay getting back to you. I have since switched to celery to solve my mixpanel performance issues, but when I get some bandwidth I will try and come back to this.

jessepollak commented 10 years ago

No problem — I think that long-term using celery is definitely a better solution. When you have a sec, I'd really like to track down the issues you were experiencing though.