https://prefect.io logo
#prefect-community
Title
# prefect-community
j

John Ramirez

04/01/2020, 6:58 PM
hey - I am getting this error when running a mapping task
Copy code
Failed to set task state with error: KeyError('endpoint_resolver')
Traceback (most recent call last):
  File "/opt/conda/lib/python3.7/site-packages/prefect/engine/cloud/task_runner.py", line 113, in call_runner_target_handlers
    cloud_state = prepare_state_for_cloud(new_state)
  File "/opt/conda/lib/python3.7/site-packages/prefect/engine/cloud/utilities.py", line 21, in prepare_state_for_cloud
    res.store_safe_value()
  File "/opt/conda/lib/python3.7/site-packages/prefect/engine/result.py", line 92, in store_safe_value
    value = self.result_handler.write(self.value)
  File "/opt/conda/lib/python3.7/site-packages/prefect/engine/result_handlers/s3_result_handler.py", line 103, in write
    self.client.upload_fileobj(stream, Bucket=self.bucket, Key=uri)
  File "/opt/conda/lib/python3.7/site-packages/prefect/engine/result_handlers/s3_result_handler.py", line 67, in client
    self.initialize_client()
  File "/opt/conda/lib/python3.7/site-packages/prefect/engine/result_handlers/s3_result_handler.py", line 60, in initialize_client
    aws_secret_access_key=aws_secret_access_key,
  File "/opt/conda/lib/python3.7/site-packages/boto3/__init__.py", line 91, in client
    return _get_default_session().client(*args, **kwargs)
  File "/opt/conda/lib/python3.7/site-packages/boto3/session.py", line 263, in client
    aws_session_token=aws_session_token, config=config)
  File "/opt/conda/lib/python3.7/site-packages/botocore/session.py", line 824, in create_client
    endpoint_resolver = self._get_internal_component('endpoint_resolver')
  File "/opt/conda/lib/python3.7/site-packages/botocore/session.py", line 697, in _get_internal_component
    return self._internal_components.get_component(name)
  File "/opt/conda/lib/python3.7/site-packages/botocore/session.py", line 923, in get_component
    del self._deferred[name]
KeyError: 'endpoint_resolver'
c

Chris White

04/01/2020, 7:00 PM
Hi @John Ramirez - this appears to be an issue with running boto3 clients across multiple threads; the most recent release of Prefect (0.10.0) should have a patch that should address this but let us know if the issue persists
j

John Ramirez

04/01/2020, 7:01 PM
ill upgrade an test it out. thanks!
c

Chris White

04/01/2020, 7:01 PM
anytime!
j

John Ramirez

04/01/2020, 8:16 PM
the upgrade worked
c

Chris White

04/01/2020, 8:27 PM
đź’Ż
j

josh

04/02/2020, 1:28 PM
@Marvin archive “Mapped tasks key error with boto3 clients shared across multiple threads”