Hi guys, I’m trying to run the tap I created with ...
# troubleshooting
r
Hi guys, I’m trying to run the tap I created with the SDK in Meltano and am getting this error:
Copy code
meltano invoke tap-spotify
Traceback (most recent call last):
  File "/project/.meltano/extractors/tap-spotify/venv/bin/tap-spotify", line 5, in <module>
    from tap_spotify.tap import TapSpotify
  File "/project/.meltano/extractors/tap-spotify/venv/lib/python3.6/site-packages/tap_spotify/tap.py", line 5, in <module>
    from singer_sdk import Tap, Stream
  File "/project/.meltano/extractors/tap-spotify/venv/lib/python3.6/site-packages/singer_sdk/__init__.py", line 3, in <module>
    from singer_sdk import streams
  File "/project/.meltano/extractors/tap-spotify/venv/lib/python3.6/site-packages/singer_sdk/streams/__init__.py", line 3, in <module>
    from singer_sdk.streams.core import Stream
  File "/project/.meltano/extractors/tap-spotify/venv/lib/python3.6/site-packages/singer_sdk/streams/core.py", line 33, in <module>
    from singer_sdk.helpers._catalog import pop_deselected_record_properties
  File "/project/.meltano/extractors/tap-spotify/venv/lib/python3.6/site-packages/singer_sdk/helpers/_catalog.py", line 9, in <module>
    from singer_sdk.helpers._singer import Catalog, SelectionMask
  File "/project/.meltano/extractors/tap-spotify/venv/lib/python3.6/site-packages/singer_sdk/helpers/_singer.py", line 2, in <module>
    from dataclasses import dataclass, fields
ModuleNotFoundError: No module named 'dataclasses'
I added the plugin using
meltano add --custom extractor tap-spotify
. `meltano.yml`:
Copy code
version: 1
send_anonymous_usage_stats: true
project_id: 67a2cd63-b43d-498a-9f1c-51a507d983de
plugins:
  extractors:
  - name: tap-spotify
    namespace: tap_spotify
    pip_url:  git+<https://github.com/Matatika/tap-spotify.git>
    executable: tap-spotify
    capabilities:
    - catalog
    - discover
    - properties
    - state
    settings:
    - name: client_id
      kind: password
    - name: client_secret
      kind: password
    - name: refresh_token
      kind: password
The missing
dataclasses
dependency isn’t installed after adding the plugin or running
meltano install extractor tap-spotify
, I’m not that familiar with
poetry
, but the
dataclasses
package seems to be listed as a
dev
dependency(?) in my `poetry.lock`:
Copy code
[[package]]
name = "dataclasses"
version = "0.8"
description = "A backport of the dataclasses module for Python 3.6"
category = "dev"
optional = false
python-versions = ">=3.6, <3.7"
e
Hi @Reuben (Matatika)! So,
dataclasses
were added to the stdlib in 3.7, so we have it as a dependency for 3.6.x, but is incorrectly marked as
dev
(fyi @aaronsteers our CI is not catching this cause we're doing
poetry install
which includes dev dependencies but
pip install ...
ignores them). In the meantime can you try to switch to 3.7? 3.6 is approaching EOL anyway
r
Yeah, I was a bit confused because I remember
dataclasses
being added in 3.7, I just assumed I was using that at first. I’ll report back after I have tested.
e
Another temporary solution is to add
dataclasses = {version = "*", markers = "python_version < \"3.7\""}
to your tap's
pyproject.toml
in the
[tool.poetry.dependencies]
table
r
@edgar_ramirez_mondragon Thanks for your help on this - all working fine after upgrading. 👍
e
Glad that it worked!