Hi all, I'm totally new to Meltano and I'm trying ...
# troubleshooting
a
Hi all, I'm totally new to Meltano and I'm trying to run my first custom Extractor to extract data from API. I'm getting this error message when I try to run
python3 tap.py --config confog.json --discover
: AttributeError: 'NoneType' object has no attribute 'name' Here is my
tap.py
file:
Copy code
from singer_sdk import Tap, Stream
from typing import List
from streams import TestStream, TestTestStream

class TapTestX(Tap):
    name = "tap-test"
    config_jsonschema = {
        "type": "object",
        "properties": {
            "api_base_url": {
                "type": "string",
                "default": "<https://api.api.com>",
                "description": "some desc"
            }
        },
        "required": ["api_base_url"]
    }

    def discover_streams(self) -> List[Stream]:
        """Return a list of streams."""
        return [
            TestStream(tap=self),
            TestTestStream(tap=self),
        ]

if __name__ == "__main__":

    TapTestX().cli()
r
Have you assigned names to your streams?
e
Try calling
cli()
on the class instead of the instance:
Copy code
TapTestX.cli()