Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSONDecodeError while extracting 'receive' object #6

Open
dsprayberry opened this issue Apr 17, 2018 · 3 comments
Open

JSONDecodeError while extracting 'receive' object #6

dsprayberry opened this issue Apr 17, 2018 · 3 comments

Comments

@dsprayberry
Copy link

INFO tap_log - Traceback (most recent call last):
INFO tap_log - File "tap-env/bin/tap-klaviyo", line 11, in
INFO tap_log - sys.exit(main())
INFO tap_log - File "/code/orchestrator/tap-env/lib/python3.5/site-packages/tap_klaviyo/init.py", line 139, in main
INFO tap_log - do_sync(args.config, state, catalog)
INFO tap_log - File "/code/orchestrator/tap-env/lib/python3.5/site-packages/tap_klaviyo/init.py", line 95, in do_sync
INFO tap_log - api_key, start_date)
INFO tap_log - File "/code/orchestrator/tap-env/lib/python3.5/site-packages/tap_klaviyo/utils.py", line 96, in get_incremental_pull
INFO tap_log - events = response.json().get('data')
INFO tap_log - File "/code/orchestrator/tap-env/lib/python3.5/site-packages/requests/models.py", line 866, in json
INFO tap_log - return complexjson.loads(self.text, **kwargs)
INFO tap_log - File "/code/orchestrator/tap-env/lib/python3.5/site-packages/simplejson/init.py", line 516, in loads
INFO tap_log - return _default_decoder.decode(s)
INFO tap_log - File "/code/orchestrator/tap-env/lib/python3.5/site-packages/simplejson/decoder.py", line 370, in decode
INFO tap_log - obj, end = self.raw_decode(s)
INFO tap_log - File "/code/orchestrator/tap-env/lib/python3.5/site-packages/simplejson/decoder.py", line 400, in raw_decode
INFO tap_log - return self.scan_once(s, idx=_w(s, idx).end())
INFO tap_log - simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
DEBUG tap_log - Thread terminating

@dctanugi
Copy link

We recently experienced a similar error (see log below). @dylan-stitch, did you ever find a solution to this issue?

...
2019-10-29 21:17:12,195Z    tap - INFO Replicated receive up to {'since': '2019-10-01T15:48:16Z'}
2019-10-29 21:17:12,405Z    tap - INFO HTTP request to "receive" endpoint took 0.200s, returned status code 200
2019-10-29 21:17:12,416Z    tap - INFO Replicated receive up to {'since': '2019-10-01T15:48:17Z'}
2019-10-29 21:17:13,490Z    tap - INFO HTTP request to "receive" endpoint took 1.066s, returned status code 200
2019-10-29 21:17:13,500Z    tap - INFO Replicated receive up to {'since': '2019-10-01T15:48:17Z'}
2019-10-29 21:17:13,706Z    tap - INFO HTTP request to "receive" endpoint took 0.198s, returned status code 200
2019-10-29 21:17:13,710Z target - INFO Sending batch with 1919 messages for table receive to https://api.stitchdata.com/v2/import/batch
2019-10-29 21:17:14,379Z    tap - INFO Replicated receive up to {'since': '2019-10-01T15:48:18Z'}
2019-10-29 21:17:14,535Z    tap - INFO HTTP request to "receive" endpoint took 0.142s, returned status code 200
2019-10-29 21:17:14,545Z    tap - INFO Replicated receive up to {'since': '2019-10-01T15:48:18Z'}
2019-10-29 21:17:14,885Z   main - INFO State update: changing bookmarks.receive.since from "2019-10-01T15:48:08Z" to "2019-10-01T15:48:17Z"
2019-10-29 21:19:14,309Z    tap - INFO HTTP request to "receive" endpoint took 119.757s, returned status code 504
2019-10-29 21:19:14,310Z    tap - INFO replicated 2700 records from "receive" endpoint
2019-10-29 21:19:14,314Z    tap - Traceback (most recent call last):
2019-10-29 21:19:14,314Z    tap -   File "tap-env/bin/tap-klaviyo", line 10, in <module>
2019-10-29 21:19:14,314Z    tap -     sys.exit(main())
2019-10-29 21:19:14,314Z    tap -   File "/code/orchestrator/tap-env/lib/python3.5/site-packages/tap_klaviyo/__init__.py", line 158, in main
2019-10-29 21:19:14,314Z    tap -     do_sync(args.config, state, catalog)
2019-10-29 21:19:14,314Z    tap -   File "/code/orchestrator/tap-env/lib/python3.5/site-packages/tap_klaviyo/__init__.py", line 114, in do_sync
2019-10-29 21:19:14,315Z    tap -     api_key, start_date)
2019-10-29 21:19:14,315Z    tap -   File "/code/orchestrator/tap-env/lib/python3.5/site-packages/tap_klaviyo/utils.py", line 95, in get_incremental_pull
2019-10-29 21:19:14,315Z    tap -     events = response.json().get('data')
2019-10-29 21:19:14,315Z    tap -   File "/code/orchestrator/tap-env/lib/python3.5/site-packages/requests/models.py", line 897, in json
2019-10-29 21:19:14,315Z    tap -     return complexjson.loads(self.text, **kwargs)
2019-10-29 21:19:14,315Z    tap -   File "/code/orchestrator/tap-env/lib/python3.5/site-packages/simplejson/__init__.py", line 516, in loads
2019-10-29 21:19:14,315Z    tap -     return _default_decoder.decode(s)
2019-10-29 21:19:14,315Z    tap -   File "/code/orchestrator/tap-env/lib/python3.5/site-packages/simplejson/decoder.py", line 370, in decode
2019-10-29 21:19:14,315Z    tap -     obj, end = self.raw_decode(s)
2019-10-29 21:19:14,315Z    tap -   File "/code/orchestrator/tap-env/lib/python3.5/site-packages/simplejson/decoder.py", line 400, in raw_decode
2019-10-29 21:19:14,315Z    tap -     return self.scan_once(s, idx=_w(s, idx).end())
2019-10-29 21:19:14,315Z    tap - simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2019-10-29 21:19:14,335Z target - INFO Sending batch with 191 messages for table receive to https://api.stitchdata.com/v2/import/batch
2019-10-29 21:19:14,528Z   main - INFO State update: changing bookmarks.receive.since from "2019-10-01T15:48:17Z" to "2019-10-01T15:48:18Z"
2019-10-29 21:19:14,531Z target - INFO Requests complete, stopping loop
2019-10-29 21:19:14,532Z target - INFO Writing final state.
2019-10-29 21:19:14,575Z   main - INFO Target exited normally with status 0
2019-10-29 21:19:14,577Z   main - INFO No tunnel subprocess to tear down
2019-10-29 21:19:14,577Z   main - INFO Exit status is: Discovery succeeded. Tap failed with code 1. Target succeeded.

@JoseMMontoro
Copy link

Hi, I just configured Klaviyo <> Stitch integration, but I got an error the first time the data was queried. Seems like the previous errors as well.

2020-04-23 23:44:50,205Z   main - INFO Running tap-klaviyo version 0.1.1 and target-stitch version 3.0.2
2020-04-23 23:44:50,364Z   main - INFO Starting tap to discover schemas: tap-env/bin/tap-klaviyo --config /tmp/tap_discover_config.json --discover
2020-04-23 23:44:50,836Z    tap - INFO HTTP request to "metric_list" endpoint took 0.134s, returned status code 200
2020-04-23 23:44:50,868Z   main - INFO Tap exited normally.
2020-04-23 23:44:50,869Z   main - INFO Saving list of discovered streams
2020-04-23 23:44:50,919Z   main - INFO Saving structure of stream bounce (tap_stream_id: KxNKfc)
2020-04-23 23:44:50,939Z   main - INFO Saving structure of stream click (tap_stream_id: MNtEJq)
2020-04-23 23:44:50,955Z   main - INFO Saving structure of stream dropped_email (tap_stream_id: MkeCKF)
2020-04-23 23:44:50,972Z   main - INFO Saving structure of stream mark_as_spam (tap_stream_id: PKFySM)
2020-04-23 23:44:50,991Z   main - INFO Saving structure of stream open (tap_stream_id: Q9hkw8)
2020-04-23 23:44:51,010Z   main - INFO Saving structure of stream receive (tap_stream_id: MHQqp2)
2020-04-23 23:44:51,027Z   main - INFO Saving structure of stream subscribe_list (tap_stream_id: Qz2jSk)
2020-04-23 23:44:51,042Z   main - INFO Saving structure of stream unsubscribe (tap_stream_id: HKnRJH)
2020-04-23 23:44:51,058Z   main - INFO Saving structure of stream unsub_list (tap_stream_id: QxvNrA)
2020-04-23 23:44:51,091Z   main - INFO Saving structure of stream update_email_preferences (tap_stream_id: H6qSEE)
2020-04-23 23:44:51,110Z   main - INFO Saving structure of stream global_exclusions (tap_stream_id: global_exclusions)
2020-04-23 23:44:51,128Z   main - INFO Saving structure of stream lists (tap_stream_id: lists)
2020-04-23 23:44:51,148Z   main - INFO Writing catalog to file
2020-04-23 23:44:51,161Z   main - INFO Selected fields for stream KxNKfc: uuid, datetime, object, person, event_properties, timestamp, event_name, id, statistic_id
2020-04-23 23:44:51,161Z   main - INFO Selected fields for stream HKnRJH: uuid, datetime, object, person, event_properties, timestamp, event_name, id, statistic_id
2020-04-23 23:44:51,161Z   main - INFO Selected fields for stream MNtEJq: uuid, datetime, object, person, event_properties, timestamp, event_name, id, statistic_id
2020-04-23 23:44:51,161Z   main - INFO Selected fields for stream Qz2jSk: uuid, datetime, object, person, event_properties, timestamp, event_name, id, statistic_id
2020-04-23 23:44:51,162Z   main - INFO Selected fields for stream H6qSEE: uuid, datetime, object, person, event_properties, timestamp, event_name, id, statistic_id
2020-04-23 23:44:51,162Z   main - INFO Selected fields for stream MHQqp2: uuid, datetime, object, person, event_properties, timestamp, event_name, id, statistic_id
2020-04-23 23:44:51,162Z   main - INFO Selected fields for stream Q9hkw8: uuid, datetime, object, person, event_properties, timestamp, event_name, id, statistic_id
2020-04-23 23:44:51,162Z   main - INFO Selected fields for stream MkeCKF: uuid, datetime, object, person, event_properties, timestamp, event_name, id, statistic_id
2020-04-23 23:44:51,162Z   main - INFO Selected fields for stream lists: name, updated, object, created, person_count, id, type
2020-04-23 23:44:51,162Z   main - INFO Selected fields for stream global_exclusions: timestamp, email, reason, object
2020-04-23 23:44:51,162Z   main - INFO Selected fields for stream PKFySM: uuid, datetime, object, person, event_properties, timestamp, event_name, id, statistic_id
2020-04-23 23:44:51,162Z   main - INFO Selected fields for stream QxvNrA: uuid, datetime, object, person, event_properties, timestamp, event_name, id, statistic_id
2020-04-23 23:44:51,166Z   main - INFO Current state: {}
2020-04-23 23:44:51,167Z   main - INFO Starting tap: tap-env/bin/tap-klaviyo --config /tmp/tap_config.json --properties /tmp/properties.json --catalog /tmp/catalog.json --state /tmp/tap_state.json
2020-04-23 23:44:51,176Z   main - INFO Starting target: target-env/bin/target-stitch --config /tmp/target_config.json
2020-04-23 23:44:51,730Z target - INFO Using batch_size_prefernces of {'batch_size_preference': None, 'user_batch_size_preference': None, 'full_table_streams': []}
2020-04-23 23:44:51,730Z target - INFO Using turbo_boost_factor of 5
2020-04-23 23:46:22,431Z    tap - INFO HTTP request to "bounce" endpoint took 90.935s, returned status code 502
2020-04-23 23:46:22,431Z    tap - INFO replicated 0 records from "bounce" endpoint
2020-04-23 23:46:22,432Z    tap - Traceback (most recent call last):
2020-04-23 23:46:22,432Z    tap -   File "tap-env/bin/tap-klaviyo", line 11, in <module>
2020-04-23 23:46:22,432Z    tap -     load_entry_point('tap-klaviyo==0.1.1', 'console_scripts', 'tap-klaviyo')()
2020-04-23 23:46:22,432Z    tap -   File "/code/orchestrator/tap-env/lib/python3.5/site-packages/tap_klaviyo/__init__.py", line 158, in main
2020-04-23 23:46:22,432Z    tap -     do_sync(args.config, state, catalog)
2020-04-23 23:46:22,432Z    tap -   File "/code/orchestrator/tap-env/lib/python3.5/site-packages/tap_klaviyo/__init__.py", line 114, in do_sync
2020-04-23 23:46:22,432Z    tap -     api_key, start_date)
2020-04-23 23:46:22,432Z    tap -   File "/code/orchestrator/tap-env/lib/python3.5/site-packages/tap_klaviyo/utils.py", line 95, in get_incremental_pull
2020-04-23 23:46:22,432Z    tap -     events = response.json().get('data')
2020-04-23 23:46:22,432Z    tap -   File "/code/orchestrator/tap-env/lib/python3.5/site-packages/requests/models.py", line 897, in json
2020-04-23 23:46:22,432Z    tap -     return complexjson.loads(self.text, **kwargs)
2020-04-23 23:46:22,433Z    tap -   File "/code/orchestrator/tap-env/lib/python3.5/site-packages/simplejson/__init__.py", line 516, in loads
2020-04-23 23:46:22,433Z    tap -     return _default_decoder.decode(s)
2020-04-23 23:46:22,433Z    tap -   File "/code/orchestrator/tap-env/lib/python3.5/site-packages/simplejson/decoder.py", line 370, in decode
2020-04-23 23:46:22,433Z    tap -     obj, end = self.raw_decode(s)
2020-04-23 23:46:22,433Z    tap -   File "/code/orchestrator/tap-env/lib/python3.5/site-packages/simplejson/decoder.py", line 400, in raw_decode
2020-04-23 23:46:22,433Z    tap -     return self.scan_once(s, idx=_w(s, idx).end())
2020-04-23 23:46:22,433Z    tap - simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2020-04-23 23:46:22,459Z target - INFO Requests complete, stopping loop
2020-04-23 23:46:22,507Z   main - INFO Target exited normally with status 0
2020-04-23 23:46:22,508Z   main - INFO No tunnel subprocess to tear down
2020-04-23 23:46:22,509Z   main - INFO Exit status is: Discovery succeeded. Tap failed with code 1. Target succeeded.

@JoseMMontoro
Copy link

Nevermind, the second time I ran it seems like it's going fine. I wonder if it got fixed for the previous people that opened the Issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants