codyss / tap-greenhouse

Singer tap for extracting from Greenhouse Harvest API
Apache License 2.0
2 stars 5 forks source link

No module named 'tap_greenhouse.streams' error #1

Open kmturley opened 5 years ago

kmturley commented 5 years ago

Currently getting an error when running:

# Install virtualenv
pip install virtualenv

# Create virtual environment
virtualenv -p python3 env
source env/bin/activate

# Install dependencies
pip install git+https://github.com/Radico/tap-kit
pip install git+https://github.com/codyss/tap-greenhouse
pip install git+https://github.com/kmturley/target-json

# Extract greenhouse data and transform to json
tap-greenhouse | target-json

I'm getting an error:

Traceback (most recent call last):
  File "/greenhouse-migration/env/bin/tap-greenhouse", line 6, in <module>
    from tap_greenhouse import main
  File "/greenhouse-migration/env/lib/python3.7/site-packages/tap_greenhouse/__init__.py", line 3, in <module>
    from .streams import STREAMS
ModuleNotFoundError: No module named 'tap_greenhouse.streams'
kmturley commented 5 years ago

@nick-mccoy would you be able to advise on how to get this tap working?

It looks to me like the stream data format has changed maybe? The error i'm getting now is:

Traceback (most recent call last):
  File "/greenhouse-migration/env/bin/target-json", line 10, in <module>
    sys.exit(main())
  File "/greenhouse-migration/env/lib/python3.7/site-packages/target_json.py", line 128, in main
    config.get('bookmark_keys', {}))
  File "/greenhouse-migration/env/lib/python3.7/site-packages/target_json.py", line 43, in persist_lines
    raise Exception("Line is missing required key 'type': {}".format(line))
Exception: Line is missing required key 'type': {"streams": [{"stream": "applications", "tap_stream_id": "applications", "schema": {"type": "object", "properties": {"id": {"type": "integer"}, "candidate_id": {"type": "integer"}, "prospect": {"type": "boolean"}, "applied_at": {"type": "string", "format": "date-time"}, "rejected_at": {"type": "string", "format": "date-time"}, "last_activity_at": {"type": "string", "format": "date-time"}, "location": {"type": "object", "properties": {"address": {"type": "string"}}},

It seems as though it's not returning the data as per the spec? https://github.com/singer-io/getting-started/blob/master/docs/SPEC.md#example

{"type": "SCHEMA", "stream": "users", "key_properties": ["id"], "schema": {"required": ["id"], "type": "object", "properties": {"id": {"type": "integer"}}}}