Solved

[Python library] Using import_data

  • 25 November 2020
  • 2 replies
  • 86 views

Hey all,

I’m trying to import some past data into a new project

Therefore using the import_data method (docs)

Essentially I loop through the data and call this on each iteration

mp.import_data(<api_secret>, '12345', 'Event Name', timestamp, properties)

The script succeeds with no error however the data isn’t appearing in Mixpanel

Weirdly, if I test with the regular track method (reference) that does work

So the problem is isolated to using the import method, where I’m passing in timestamps in the past (as it’s intended to be used)

Has anyone here had success using the import_data method or have any ideas as to why the data isn’t showing up in Mixpanel?

Thanks!

Dan

icon

Best answer by drivn 19 December 2020, 11:39

Hi Cherise,

Thanks for your reply – I created an issue on the python library and the bug’s now been resolved https://github.com/mixpanel/mixpanel-python/issues/88#event-4130657039

Thanks,

Dan

View original

2 replies

Userlevel 6
Badge +3

Hey Dan, 

I think the issue is related to authentication. It looks like you're using the API Secret when you want to be using the API Key. Most of our libraries use the API Secret (API Key is a deprecated but still supported authentication method) and API Key is unfortunately sort of hidden. You can find it in your settings under Account > Account Information > Projects. Sorry for the confusion, it looks like that isn't well documented and I'll let my team know. I think it's hidden since using the API Secret is much more common. 

Anyhow, can you try again with the API Key in place of where you have the API Secret currently? Let me know if that doesn't work - in my testing using the API Secret will give the behavior you're seeing (no errors but events not in project) and just changing to the API Key works.
 

Hi Cherise,

Thanks for your reply – I created an issue on the python library and the bug’s now been resolved https://github.com/mixpanel/mixpanel-python/issues/88#event-4130657039

Thanks,

Dan

Reply


Mixpanel