<#8801 bug: Investigate S3 `Failed to persist stat...
# meltano-repo-activity
g
#8801 bug: Investigate S3
Failed to persist state
when the key doesn't exist during the first pipeline run
Issue created by edgarrmondragon Meltano Version 3.5.3 Python Version 3.12 Bug scope CLI (options, error messages, logging, etc.) Operating System NA Description Traceback (most recent call last): File \"/venv/lib/python3.10/site-packages/smart_open/s3.py\", line 434, in _get return client.get_object(**params) File \"/venv/lib/python3.10/site-packages/botocore/client.py\", line 569, in _api_call return self._make_api_call(operation_name, kwargs) File \"/venv/lib/python3.10/site-packages/botocore/client.py\", line 1023, in _make_api_call raise error_class(parsed_response, operation_name) botocore.errorfactory.NoSuchKey: An error occurred (NoSuchKey) when calling the GetObject operation: The specified key does not exist. The above exception was the direct cause of the following exception: Traceback (most recent call last): File \"/venv/lib/python3.10/site-packages/meltano/core/plugin/singer/target.py\", line 79, in writeline self.state_service.add_state( File \"/venv/lib/python3.10/site-packages/meltano/core/state_service.py\", line 150, in add_state self.state_store_manager.set(job_state) File \"/venv/lib/python3.10/site-packages/meltano/core/state_store/filesystem.py\", line 324, in set raise e File \"/venv/lib/python3.10/site-packages/meltano/core/state_store/filesystem.py\", line 314, in set with self.get_reader(filepath) as current_state_reader: File \"/usr/local/lib/python3.10/contextlib.py\", line 135, in enter return next(self.gen) File \"/venv/lib/python3.10/site-packages/meltano/core/state_store/filesystem.py\", line 105, in get_reader with open( File \"/venv/lib/python3.10/site-packages/smart_open/smart_open_lib.py\", line 224, in open binary = _open_binary_stream(uri, binary_mode, transport_params) File \"/venv/lib/python3.10/site-packages/smart_open/smart_open_lib.py\", line 400, in _open_binary_stream fobj = submodule.open_uri(uri, mode, transport_params) File \"/venv/lib/python3.10/site-packages/smart_open/s3.py\", line 308, in open_uri return open(parsed_uri['bucket_id'], parsed_uri['key_id'], mode, **kwargs) File \"/venv/lib/python3.10/site-packages/smart_open/s3.py\", line 392, in open fileobj = Reader( File \"/venv/lib/python3.10/site-packages/smart_open/s3.py\", line 698, in init self.seek(0) File \"/venv/lib/python3.10/site-packages/smart_open/s3.py\", line 793, in seek self._current_pos = self._raw_reader.seek(offset, whence) File \"/venv/lib/python3.10/site-packages/smart_open/s3.py\", line 521, in seek self._open_body(start, stop) File \"/venv/lib/python3.10/site-packages/smart_open/s3.py\", line 542, in _open_body response = _get( File \"/venv/lib/python3.10/site-packages/smart_open/s3.py\", line 442, in _get raise wrapped_error from error OSError: unable to access bucket: 'my-s3-bucket' key: 'path/to/<state-id>/state.json' version: None error: An error occurred (NoSuchKey) when calling the GetObject operation: The specified key does not exist. Code No response Link to Slack/Linen No response meltano/meltano