-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Running Google Colab example from README, at "Initialize the source with OpenAPI Spec" step, this cell:
!dlt-init-openapi pokemon --no-interactive --url https://raw.githubusercontent.com/cliffano/pokeapi-clients/ec9a2707ef2a85f41b747d8df013e272ef650ec5/specification/pokeapi.yml
Errors:
2025-03-10 12:16:40.858 | SUCCESS | dlt_init_openapi.cli:_init_command_wrapped:91 - Starting dlt openapi generator
2025-03-10 12:16:40.858 | INFO | dlt_init_openapi.utils.update_rest_api:update_rest_api:14 - Syncing rest_api verified source
2025-03-10 12:16:40.859 | INFO | dlt_init_openapi.utils.update_rest_api:update_rest_api:25 - Copying https://raw.githubusercontent.com/dlt-hub/verified-sources/master/sources/rest_api/README.md
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /usr/local/lib/python3.11/dist-packages/dlt_init_openapi/cli/__init__.py:58 in init │
│ │
│ 55 ) -> None: │
│ 56 │ """Generate a new dlt pipeline""" │
│ 57 │ │
│ ❱ 58 │ _init_command_wrapped( │
│ 59 │ │ source=source, │
│ 60 │ │ url=url, │
│ 61 │ │ path=path, │
│ │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ allow_openapi_2 = False │ │
│ │ config_path = None │ │
│ │ global_limit = 0 │ │
│ │ interactive = False │ │
│ │ log_level = 20 │ │
│ │ output_path = None │ │
│ │ path = None │ │
│ │ source = 'pokemon' │ │
│ │ update_rest_api_source = False │ │
│ │ url = 'https://raw.githubusercontent.com/cliffano/pokeapi-clients/ec9a27… │ │
│ │ version = None │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /usr/local/lib/python3.11/dist-packages/dlt/common/runtime/telemetry.py:97 in _wrap │
│ │
│ 94 │ │ │ │ return f(*f_args, **f_kwargs) │
│ 95 │ │ │ # some commands we track after, where we can pass the success │
│ 96 │ │ │ try: │
│ ❱ 97 │ │ │ │ rv = f(*f_args, **f_kwargs) │
│ 98 │ │ │ │ # if decorated function returns int, 0 is a success - used to track dlt │
│ 99 │ │ │ │ if isinstance(rv, int): │
│ 100 │ │ │ │ │ success = rv == 0 │
│ │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ args = ('source', 'url', 'path') │ │
│ │ bound_args = <BoundArguments (source='pokemon', │ │
│ │ url='https://raw.githubusercontent.com/cliffano/pokeapi-clients/ec9a2707ef2a… │ │
│ │ path=None, output_path=None, config_path=None, interactive=False, │ │
│ │ log_level=20, global_limit=0, update_rest_api_source=False, │ │
│ │ allow_openapi_2=False)> │ │
│ │ category = 'command' │ │
│ │ command = 'init-openapi' │ │
│ │ f_args = () │ │
│ │ f_kwargs = { │ │
│ │ │ 'source': 'pokemon', │ │
│ │ │ 'url': │ │
│ │ 'https://raw.githubusercontent.com/cliffano/pokeapi-clients/ec9a2707ef2a85f4… │ │
│ │ │ 'path': None, │ │
│ │ │ 'output_path': None, │ │
│ │ │ 'config_path': None, │ │
│ │ │ 'interactive': False, │ │
│ │ │ 'log_level': 20, │ │
│ │ │ 'global_limit': 0, │ │
│ │ │ 'update_rest_api_source': False, │ │
│ │ │ 'allow_openapi_2': False │ │
│ │ } │ │
│ │ props = { │ │
│ │ │ 'source': 'pokemon', │ │
│ │ │ 'url': │ │
│ │ 'https://raw.githubusercontent.com/cliffano/pokeapi-clients/ec9a2707ef2a85f4… │ │
│ │ │ 'path': None, │ │
│ │ │ 'elapsed': 0.22127056121826172, │ │
│ │ │ 'success': False, │ │
│ │ │ 'event_category': 'command', │ │
│ │ │ 'event_name': 'init-openapi' │ │
│ │ } │ │
│ │ sig = <Signature (source: str, url: Optional[str] = None, path: │ │
│ │ Optional[pathlib.Path] = None, output_path: Optional[pathlib.Path] = None, │ │
│ │ config_path: Optional[pathlib.Path] = None, interactive: bool = True, │ │
│ │ log_level: int = 20, global_limit: int = 0, update_rest_api_source: bool = │ │
│ │ False, allow_openapi_2: bool = False) -> None> │ │
│ │ start_ts = 1741609000.8322601 │ │
│ │ track_before = False │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /usr/local/lib/python3.11/dist-packages/dlt_init_openapi/cli/__init__.py:103 in │
│ _init_command_wrapped │
│ │
│ 100 │ try: │
│ 101 │ │ │
│ 102 │ │ # sync rest api │
│ ❱ 103 │ │ update_rest_api.update_rest_api(force=update_rest_api_source) │
│ 104 │ │ │
│ 105 │ │ config = _load_config( │
│ 106 │ │ │ path=config_path, │
│ │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ allow_openapi_2 = False │ │
│ │ config_path = None │ │
│ │ global_limit = 0 │ │
│ │ interactive = False │ │
│ │ log_level = 20 │ │
│ │ output_path = None │ │
│ │ path = None │ │
│ │ source = 'pokemon' │ │
│ │ update_rest_api_source = False │ │
│ │ url = 'https://raw.githubusercontent.com/cliffano/pokeapi-clients/ec9a27… │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /usr/local/lib/python3.11/dist-packages/dlt_init_openapi/utils/update_rest_api.py:27 in │
│ update_rest_api │
│ │
│ 24 │ │ dst_path = REST_API_SOURCE_LOCATION + "/" + file │
│ 25 │ │ logger.info(f"Copying {src_path}") │
│ 26 │ │ with requests.get(src_path, stream=True) as r: │
│ ❱ 27 │ │ │ r.raise_for_status() │
│ 28 │ │ │ with open(dst_path, "wb") as f: │
│ 29 │ │ │ │ for chunk in r.iter_content(chunk_size=8192): │
│ 30 │ │ │ │ │ f.write(chunk) │
│ │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ dst_path = '/usr/local/lib/python3.11/dist-packages/dlt_init_openapi/../rest_api/README.md' │ │
│ │ file = 'README.md' │ │
│ │ force = False │ │
│ │ path = PosixPath('/usr/local/lib/python3.11/dist-packages/dlt_init_openapi/../rest_api') │ │
│ │ r = <Response [404]> │ │
│ │ src_path = 'https://raw.githubusercontent.com/dlt-hub/verified-sources/master/sources/rest_… │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /usr/local/lib/python3.11/dist-packages/requests/models.py:1024 in raise_for_status │
│ │
│ 1021 │ │ │ ) │
│ 1022 │ │ │
│ 1023 │ │ if http_error_msg: │
│ ❱ 1024 │ │ │ raise HTTPError(http_error_msg, response=self) │
│ 1025 │ │
│ 1026 │ def close(self): │
│ 1027 │ │ """Releases the connection back to the pool. Once this method has been │
│ │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ http_error_msg = '404 Client Error: Not Found for url: │ │
│ │ https://raw.githubusercontent.com/dlt-hub/v'+49 │ │
│ │ reason = 'Not Found' │ │
│ │ self = <Response [404]> │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
HTTPError: 404 Client Error: Not Found for url:
https://raw.githubusercontent.com/dlt-hub/verified-sources/master/sources/rest_api/README.md
https://github.com/dlt-hub/verified-sources/tree/master/sources/rest_api doesn't have README.md
Metadata
Metadata
Assignees
Labels
No labels