prratek_ramchandani
04/14/2021, 7:10 PMtap-stripe
using the Singer SDK (because why not) and am running into some issues. I figured I’d choose the “custom” tap and auth types since I wanted to use Stripe’s client library, filled in all the TODOs, but when running meltano elt tap-stripe target-zendesk
the target throws this error
meltano | Running extract & load...
target-jsonl | Traceback (most recent call last):
target-jsonl | File "/Users/pramchandani/projects/tap_stripe/.meltano/loaders/target-jsonl/venv/bin/target-jsonl", line 8, in <module>
target-jsonl | sys.exit(main())
target-jsonl | File "/Users/pramchandani/projects/tap_stripe/.meltano/loaders/target-jsonl/venv/lib/python3.8/site-packages/target_jsonl.py", line 94, in main
target-jsonl | state = persist_messages(input_messages, config.get('destination_path', ''), config.get('do_timestamp_file', True))
target-jsonl | File "/Users/pramchandani/projects/tap_stripe/.meltano/loaders/target-jsonl/venv/lib/python3.8/site-packages/target_jsonl.py", line 47, in persist_messages
target-jsonl | o = singer.parse_message(message).asdict()
target-jsonl | File "/Users/pramchandani/projects/tap_stripe/.meltano/loaders/target-jsonl/venv/lib/python3.8/site-packages/singer/messages.py", line 156, in parse_message
target-jsonl | obj = json.loads(msg)
target-jsonl | File "/Users/pramchandani/projects/tap_stripe/.meltano/loaders/target-jsonl/venv/lib/python3.8/site-packages/simplejson/__init__.py", line 516, in loads
target-jsonl | return _default_decoder.decode(s)
target-jsonl | File "/Users/pramchandani/projects/tap_stripe/.meltano/loaders/target-jsonl/venv/lib/python3.8/site-packages/simplejson/decoder.py", line 370, in decode
target-jsonl | obj, end = self.raw_decode(s)
target-jsonl | File "/Users/pramchandani/projects/tap_stripe/.meltano/loaders/target-jsonl/venv/lib/python3.8/site-packages/simplejson/decoder.py", line 400, in raw_decode
target-jsonl | return self.scan_once(s, idx=_w(s, idx).end())
target-jsonl | simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
meltano | Loading failed (1): simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Not sure if this is relevant but I’m able to run poetry run tap-stripe --config path/to/config.json
and see a mix of Singer logs and logs from the Stripe client library printed to stdout. Also, meltano config tap-stripe
shows me the config I have set in meltano.yml but meltano invoke tap-stripe
throws Plugin 'tap-stripe' is not known to Meltano
Any thoughts?aaronsteers
04/14/2021, 7:12 PMpoetry run tap-stripe --config path/to/config.json > dryrun.jsonl
douwe_maan
04/14/2021, 7:13 PMmeltano --log-level=debug elt <tap> <target>
will also print tap output with a tap (out)
prefix. Like AJ says, it looks like there's non-Singer stuff in there that the target is stumbling overaaronsteers
04/14/2021, 7:13 PM{
as the first character? (Minus any PII please. 😇 )prratek_ramchandani
04/14/2021, 7:43 PMtime=2021-04-14 15:08:20 name=stripe level=INFO message=message='Request to Stripe api' method=get path=<https://api.stripe.com/v1/events?type=customer.subscription.%2A&created[gte]=1618012800&limit=100&starting_after=evt_1IgD8fI8OBWPiWBSEGmIaBvA>
maybe i can change the log level for for the client library as a workaround?aaronsteers
04/14/2021, 7:46 PMprratek_ramchandani
04/14/2021, 7:48 PMpoetry run …
to a file i don’t see any of those logs, so maybe they are going to STDERR. everything written to the file looks like well-formatted Singer logs starting with a {
aaronsteers
04/14/2021, 7:54 PMaaronsteers
04/14/2021, 7:55 PMprratek_ramchandani
04/14/2021, 7:57 PM{"type": "SCHEMA", "stream": "subscriptions", "schema": {...}}
aaronsteers
04/14/2021, 7:59 PMaaronsteers
04/14/2021, 8:00 PMprratek_ramchandani
04/14/2021, 8:15 PMprratek_ramchandani
04/14/2021, 9:08 PMmeltano elt …
throws the same error 🤔aaronsteers
04/14/2021, 10:36 PMprratek_ramchandani
04/14/2021, 10:43 PMtap-stripe (out) | The virtual environment found in /Users/pramchandani/projects/tap_stripe/.meltano/extractors/tap-stripe/venv seems to be broken.
douwe_maan
04/14/2021, 10:43 PMdouwe_maan
04/14/2021, 10:43 PMdouwe_maan
04/14/2021, 10:44 PMdouwe_maan
04/14/2021, 10:45 PMmeltano install extractor tap-stripe
and see if that fixes it?douwe_maan
04/14/2021, 10:46 PMmeltano elt
?prratek_ramchandani
04/14/2021, 10:46 PMtap-stripe (out) | Recreating virtualenv tap-stripe-k2j-jsmB-py3.8 in /Users/pramchandani/Library/Caches/pypoetry/virtualenvs/tap-stripe-k2j-jsmB-py3.8
douwe_maan
04/14/2021, 10:48 PMdouwe_maan
04/14/2021, 10:48 PMmeltano.yml
definition for tap-stripe
?aaronsteers
04/14/2021, 10:50 PMprratek_ramchandani
04/14/2021, 10:51 PMaaronsteers
04/14/2021, 10:52 PMdouwe_maan
04/14/2021, 10:52 PM/Users/pramchandani/projects/tap_stripe/tap-stripe.sh
is not quite doing the right thing then. Can you share the contents? Did you edit anything compared to the template?aaronsteers
04/14/2021, 10:53 PMprratek_ramchandani
04/14/2021, 10:53 PMaaronsteers
04/14/2021, 10:53 PMdouwe_maan
04/14/2021, 10:54 PMpoetry install
stdout output to stderr, so that its output isn't interpreted as Singer tap output
• Figure out why it would be saying "The virtual environment found in ... seems to be broken."prratek_ramchandani
04/14/2021, 10:55 PMmeltano install …
seems to indicate that might be the case?prratek_ramchandani
04/14/2021, 10:57 PM.meltano/extractors/tap-stripe/venv
is empty! that doesn’t seem like a good thingdouwe_maan
04/14/2021, 10:58 PMpip_url
. Since you provided an absolute path to executable
, Meltano shouldn't need to use the venv.douwe_maan
04/14/2021, 10:58 PMdouwe_maan
04/14/2021, 10:59 PMmeltano --log-level=debug ...
output, can you share the Invoking
line that should have the full path to the executable being invoked?prratek_ramchandani
04/14/2021, 11:00 PMmeltano | DEBUG Invoking: ['/Users/pramchandani/projects/tap_stripe/tap-stripe.sh', '--config', '/Users/pramchandani/projects/tap_stripe/.meltano/run/elt/2021-04-14T223716--tap-stripe--target-jsonl/059ebbb9-afe0-4706-bdb4-248e9b9d75d3/tap.config.json']
douwe_maan
04/14/2021, 11:00 PM.meltano/extractors/tap-stripe/venv
in there. Are you still seeing that path in the tap-stripe (out) | The virtual environment found in ...
line?prratek_ramchandani
04/14/2021, 11:01 PM/Users/pramchandani/projects/tap_stripe/.meltano/extractors/tap-stripe/venv
douwe_maan
04/14/2021, 11:07 PMdouwe_maan
04/14/2021, 11:08 PMVIRTUAL_ENV
env var before running poetry install
, so that it won't think it's running in that venv by adding unset VIRTUAL_ENV
ahead of that line. It's still very possible, though, that that will cause poetry
to fail to run if it is itself installed inside a venv that it won't be able to locate because VIRTUAL_ENV is now unset... But at least we'll be one step closerdouwe_maan
04/14/2021, 11:08 PMVIRTUAL_ENV
if it detects that no pip_url
is set, as I suggested in https://gitlab.com/meltano/meltano/-/issues/2341#note_550791385douwe_maan
04/14/2021, 11:09 PMunset VIRTUAL_ENV
?prratek_ramchandani
04/14/2021, 11:14 PMsimplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
😕douwe_maan
04/14/2021, 11:14 PMtap-stripe (out)
prefix?aaronsteers
04/14/2021, 11:15 PMprratek_ramchandani
04/14/2021, 11:15 PMtap-stripe (out)
prefix
tap-stripe (out) | Installing dependencies from lock file
aaronsteers
04/14/2021, 11:16 PMpoetry install
line or replace with poetry install 2>&1
?douwe_maan
04/14/2021, 11:16 PM1>&2
douwe_maan
04/14/2021, 11:17 PMaaronsteers
04/14/2021, 11:17 PMprratek_ramchandani
04/14/2021, 11:19 PMprratek_ramchandani
04/14/2021, 11:19 PMdouwe_maan
04/14/2021, 11:19 PMprratek_ramchandani
04/14/2021, 11:20 PMdouwe_maan
04/14/2021, 11:20 PMaaronsteers
04/14/2021, 11:20 PM