{"action":"opened","number":22,"pull_request":{"url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/pulls/22","id":65205600,"html_url":"https://github.com/cooncesean/mixpanel-query-py/pull/22","diff_url":"https://github.com/cooncesean/mixpanel-query-py/pull/22.diff","patch_url":"https://github.com/cooncesean/mixpanel-query-py/pull/22.patch","issue_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/issues/22","number":22,"state":"open","locked":false,"title":"Raw Export Bug Fix","user":{"login":"thesmallestduck","id":7416654,"avatar_url":"https://avatars.githubusercontent.com/u/7416654?v=3","gravatar_id":"","url":"https://api.github.com/users/thesmallestduck","html_url":"https://github.com/thesmallestduck","followers_url":"https://api.github.com/users/thesmallestduck/followers","following_url":"https://api.github.com/users/thesmallestduck/following{/other_user}","gists_url":"https://api.github.com/users/thesmallestduck/gists{/gist_id}","starred_url":"https://api.github.com/users/thesmallestduck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thesmallestduck/subscriptions","organizations_url":"https://api.github.com/users/thesmallestduck/orgs","repos_url":"https://api.github.com/users/thesmallestduck/repos","events_url":"https://api.github.com/users/thesmallestduck/events{/privacy}","received_events_url":"https://api.github.com/users/thesmallestduck/received_events","type":"User","site_admin":false},"body":"why\r\n---\r\nIt seems that mixpanel's raw export behavior changed, and we need to be more rigorous when fetching raw events. Mixpanel's raw event file format is a json document per line. It used to be the case that you could reach out to mixpanel and they would send data across the wire json document by json document. This allowed us to lazily interpret each chunk as we were pulling data down as a document. Unfortunately, mixpanel has changed it's behavior recently and now chunks documents independent of json document boundaries across the wire. Their recommendation is to pull the _entire_ response before attempting to interpret the data: https://mixpanel.com/docs/api-documentation/exporting-raw-data-you-inserted-into-mixpanel\r\n\r\nwhat\r\n---\r\nThis PR modifies the get_export endpoint so that rather than attempting to load each of the response chunks as a json document, it pulls the entire response content down, splits on the new line, and interprets those lines as json one at a time.","created_at":"2016-04-04T20:14:32Z","updated_at":"2016-04-04T20:14:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/pulls/22/commits","review_comments_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/pulls/22/comments","review_comment_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/issues/22/comments","statuses_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/statuses/a13f6299c13413ac34a4397ed446e238a25535e3","head":{"label":"cooncesean:raw_export_fix","ref":"raw_export_fix","sha":"a13f6299c13413ac34a4397ed446e238a25535e3","user":{"login":"cooncesean","id":47877,"avatar_url":"https://avatars.githubusercontent.com/u/47877?v=3","gravatar_id":"","url":"https://api.github.com/users/cooncesean","html_url":"https://github.com/cooncesean","followers_url":"https://api.github.com/users/cooncesean/followers","following_url":"https://api.github.com/users/cooncesean/following{/other_user}","gists_url":"https://api.github.com/users/cooncesean/gists{/gist_id}","starred_url":"https://api.github.com/users/cooncesean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cooncesean/subscriptions","organizations_url":"https://api.github.com/users/cooncesean/orgs","repos_url":"https://api.github.com/users/cooncesean/repos","events_url":"https://api.github.com/users/cooncesean/events{/privacy}","received_events_url":"https://api.github.com/users/cooncesean/received_events","type":"User","site_admin":false},"repo":{"id":22551642,"name":"mixpanel-query-py","full_name":"cooncesean/mixpanel-query-py","owner":{"login":"cooncesean","id":47877,"avatar_url":"https://avatars.githubusercontent.com/u/47877?v=3","gravatar_id":"","url":"https://api.github.com/users/cooncesean","html_url":"https://github.com/cooncesean","followers_url":"https://api.github.com/users/cooncesean/followers","following_url":"https://api.github.com/users/cooncesean/following{/other_user}","gists_url":"https://api.github.com/users/cooncesean/gists{/gist_id}","starred_url":"https://api.github.com/users/cooncesean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cooncesean/subscriptions","organizations_url":"https://api.github.com/users/cooncesean/orgs","repos_url":"https://api.github.com/users/cooncesean/repos","events_url":"https://api.github.com/users/cooncesean/events{/privacy}","received_events_url":"https://api.github.com/users/cooncesean/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cooncesean/mixpanel-query-py","description":"The Python interface to fetch data from Mixpanel.","fork":false,"url":"https://api.github.com/repos/cooncesean/mixpanel-query-py","forks_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/forks","keys_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/teams","hooks_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/hooks","issue_events_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/issues/events{/number}","events_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/events","assignees_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/assignees{/user}","branches_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/branches{/branch}","tags_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/tags","blobs_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/git/refs{/sha}","trees_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/statuses/{sha}","languages_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/languages","stargazers_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/stargazers","contributors_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/contributors","subscribers_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/subscribers","subscription_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/subscription","commits_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/commits{/sha}","git_commits_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/git/commits{/sha}","comments_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/comments{/number}","issue_comment_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/issues/comments{/number}","contents_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/contents/{+path}","compare_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/merges","archive_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/downloads","issues_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/issues{/number}","pulls_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/pulls{/number}","milestones_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/milestones{/number}","notifications_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/labels{/name}","releases_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/releases{/id}","deployments_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/deployments","created_at":"2014-08-02T17:17:32Z","updated_at":"2016-03-28T18:59:21Z","pushed_at":"2016-04-04T20:14:32Z","git_url":"git://github.com/cooncesean/mixpanel-query-py.git","ssh_url":"git@github.com:cooncesean/mixpanel-query-py.git","clone_url":"https://github.com/cooncesean/mixpanel-query-py.git","svn_url":"https://github.com/cooncesean/mixpanel-query-py","homepage":null,"size":49,"stargazers_count":12,"watchers_count":12,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":5,"forks":14,"open_issues":5,"watchers":12,"default_branch":"master"}},"base":{"label":"cooncesean:master","ref":"master","sha":"b365aa2ad7029fb429a2ccd0d647dfb2ef0f206c","user":{"login":"cooncesean","id":47877,"avatar_url":"https://avatars.githubusercontent.com/u/47877?v=3","gravatar_id":"","url":"https://api.github.com/users/cooncesean","html_url":"https://github.com/cooncesean","followers_url":"https://api.github.com/users/cooncesean/followers","following_url":"https://api.github.com/users/cooncesean/following{/other_user}","gists_url":"https://api.github.com/users/cooncesean/gists{/gist_id}","starred_url":"https://api.github.com/users/cooncesean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cooncesean/subscriptions","organizations_url":"https://api.github.com/users/cooncesean/orgs","repos_url":"https://api.github.com/users/cooncesean/repos","events_url":"https://api.github.com/users/cooncesean/events{/privacy}","received_events_url":"https://api.github.com/users/cooncesean/received_events","type":"User","site_admin":false},"repo":{"id":22551642,"name":"mixpanel-query-py","full_name":"cooncesean/mixpanel-query-py","owner":{"login":"cooncesean","id":47877,"avatar_url":"https://avatars.githubusercontent.com/u/47877?v=3","gravatar_id":"","url":"https://api.github.com/users/cooncesean","html_url":"https://github.com/cooncesean","followers_url":"https://api.github.com/users/cooncesean/followers","following_url":"https://api.github.com/users/cooncesean/following{/other_user}","gists_url":"https://api.github.com/users/cooncesean/gists{/gist_id}","starred_url":"https://api.github.com/users/cooncesean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cooncesean/subscriptions","organizations_url":"https://api.github.com/users/cooncesean/orgs","repos_url":"https://api.github.com/users/cooncesean/repos","events_url":"https://api.github.com/users/cooncesean/events{/privacy}","received_events_url":"https://api.github.com/users/cooncesean/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cooncesean/mixpanel-query-py","description":"The Python interface to fetch data from Mixpanel.","fork":false,"url":"https://api.github.com/repos/cooncesean/mixpanel-query-py","forks_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/forks","keys_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/teams","hooks_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/hooks","issue_events_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/issues/events{/number}","events_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/events","assignees_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/assignees{/user}","branches_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/branches{/branch}","tags_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/tags","blobs_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/git/refs{/sha}","trees_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/statuses/{sha}","languages_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/languages","stargazers_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/stargazers","contributors_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/contributors","subscribers_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/subscribers","subscription_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/subscription","commits_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/commits{/sha}","git_commits_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/git/commits{/sha}","comments_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/comments{/number}","issue_comment_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/issues/comments{/number}","contents_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/contents/{+path}","compare_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/merges","archive_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/downloads","issues_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/issues{/number}","pulls_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/pulls{/number}","milestones_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/milestones{/number}","notifications_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/labels{/name}","releases_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/releases{/id}","deployments_url":"https://api.github.com/repos/cooncesean/mixpanel-query-py/deployments","created_at":"2014-08-02T17:17:32Z","updated_at":"2016-03-28T18:59:21Z","pushed_at":"2016-04-04T20:14:32Z","git_url":"git://github.com/cooncesean/mixpanel-query-py.git","ssh_url":"git@github.com:cooncesean/mixpanel-query-py.git","clone_url":"https://github.com/cooncesean/mixpanel-query-py.git","svn_url":"https://github.com/cooncesean/mixpanel-query-py","homepage":null,"size":49,"stargazers_count":12,"watchers_count":12,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":5,"forks":14,"open_issues":5,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cooncesean/mixpanel-query-py/pulls/22"},"html":{"href":"https://github.com/cooncesean/mixpanel-query-py/pull/22"},"issue":{"href":"https://api.github.com/repos/cooncesean/mixpanel-query-py/issues/22"},"comments":{"href":"https://api.github.com/repos/cooncesean/mixpanel-query-py/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/cooncesean/mixpanel-query-py/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/cooncesean/mixpanel-query-py/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cooncesean/mixpanel-query-py/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/cooncesean/mixpanel-query-py/statuses/a13f6299c13413ac34a4397ed446e238a25535e3"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":5,"deletions":1,"changed_files":1}}