I’ve built my own tap based on SDK. I have done a ...
# troubleshooting
j
I’ve built my own tap based on SDK. I have done a
poetry build
and a
poetry publish
to pypi. I created a separate repo and tried to install the tap via
meltano install
. I get the following output:
Copy code
Installed loader 'target-jsonl'
Installed extractor 'tap-rest-api-msdk'
Installed 2/2 plugins
Expecting value: line 1 column 1 (char 0)
for reference this is my meltano.yml
Copy code
version: 1
send_anonymous_usage_stats: false
plugins:
  extractors:
  - name: tap-rest-api-msdk
    namespace: tap_rest_api_msdk
    pip_url: tap-rest-api-msdk
    executable: tap-rest-api-msdk
    capabilities:
    - state
    - catalog
    - discover
    settings:
    - name: api_url
    - name: auth_method
    - name: auth_token
    - name: name
    - name: path
    - name: params
    - name: headers
    - name: records_path
    - name: primary_keys
    - name: replication_key
    - name: except_keys
    - name: num_inference_records
    config:
      name: us_earthquakes
      api_url: <https://earthquake.usgs.gov/fdsnws>
      path: /event/1/query
      params:
        format: geojson
        starttime: "2014-01-01"
        endtime: "2014-01-02"
        minmagnitude: 1
      primary_keys:
        - id
      records_path: "$.features[*]"
    select:
      - '*.*'
  loaders:
    - name: target-jsonl
      variant: andyh1203
      pip_url: target-jsonl
a
Can you try running with --log-level=debug?
j
here’s the stack trace:
Copy code
[2021-10-20 11:20:53,971] [15357|MainThread|meltano.cli.utils] [DEBUG] Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/meltano/cli/__init__.py", line 44, in main
    cli(obj={"project": None})
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/meltano/cli/params.py", line 23, in decorate
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/meltano/cli/params.py", line 56, in decorate
    func(project, *args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/meltano/cli/install.py", line 60, in install
    tracker = GoogleAnalyticsTracker(project)
  File "/usr/local/lib/python3.9/site-packages/meltano/core/tracking/ga_tracker.py", line 28, in __init__
    self.client_id = self.load_client_id()
  File "/usr/local/lib/python3.9/site-packages/meltano/core/tracking/ga_tracker.py", line 61, in load_client_id
    file_data = json.load(file)
  File "/usr/local/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/__init__.py", line 293, in load
    return loads(fp.read(),
  File "/usr/local/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/local/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/Cellar/python@3.9/3.9.7_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/meltano/cli/__init__.py", line 52, in main
    raise CliError(str(err)) from err
meltano.cli.utils.CliError: Expecting value: line 1 column 1 (char 0)
@aaronsteers ☝️ my
.meltano/analytics.json
file is indeed blank … but that shouldn’t affect the install. When I run
meltano elt tap-rest-api-msdk target-jsonl
I get the following, I assume this is the real issue:
Copy code
meltano           | Running extract & load...
meltano           | No state was found, complete import.
meltano           | ELT could not be completed: Cannot start extractor: Executable 'tap-rest-api-msdk' could not be found. Extractor 'tap-rest-api-msdk' may not have been installed yet using `meltano install extractor tap-rest-api-msdk`, or the executable name may be incorrect.
ELT could not be completed: Cannot start extractor: Executable 'tap-rest-api-msdk' could not be found. Extractor 'tap-rest-api-msdk' may not have been installed yet using `meltano install extractor tap-rest-api-msdk`, or the executable name may be incorrect.
a
There may be multiple things going on here... Is this being published based on the config file here?: https://github.com/Widen/tap-rest-api/blob/master/pyproject.toml#L24 One thing to check is if the
executable
matches the CLI declaration.
j
.meltano/extractors/tap-rest-api-msdk/venv/bin/tap-rest-api
Just noticed that it doesn’t
a
Okay, thanks for confirming. That's probably the main issue you are running into.
I've also logged an issue here to look into the other failure message you are seeing, which looks to be related to google analytics.
cc @taylor for visibility
j
thanks. I knew when I switched the name of the tap I was gonna get issues. on to the next error I guess …
a
Fair enough... yeah, this gets populated for you during cookie-cutter eval, but not obvious that it needs to change or be updated if the executable gets renamed.