An error occurred (403) when calling the HeadObject operation: Forbidden

Hi there,

I’m getting an botocore.exceptions.ClientError: An error occurred (403) when calling the HeadObject operation: Forbidden error when running ./run_vis.sh

Here’s the full output:

$ ./run_viz.sh
Preprocessed file not found, downloading the 'viz' dataset using the Ego4D CLI to /home/jstm/ego4d_data/...
Datasets to download: {'viz'}
Download Path: /home/jstm/ego4d_data/v2
Ego4D Metadata: /home/jstm/ego4d_data/ego4d.json
Checking requested datasets and versions...
Created download directory for version 'v2_1' of dataset: 'viz' at: /home/jstm/ego4d_data/v2/viz
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/jstm/Projects/robovpt/Ego4d/ego4d/cli/cli.py", line 255, in <module>
    main()
  File "/home/jstm/Projects/robovpt/Ego4d/ego4d/cli/cli.py", line 251, in main
    main_cfg(config)
  File "/home/jstm/Projects/robovpt/Ego4d/ego4d/cli/cli.py", line 119, in main_cfg
    manifest_path = download_manifest_for_version(
  File "/home/jstm/Projects/robovpt/Ego4d/ego4d/cli/manifest.py", line 159, in download_manifest_for_version
    _manifest_object(version, dataset, s3).download_file(str(download_path))
  File "/home/jstm/Projects/robovpt/venv/lib/python3.10/site-packages/boto3/s3/inject.py", line 361, in object_download_file
    return self.meta.client.download_file(
  File "/home/jstm/Projects/robovpt/venv/lib/python3.10/site-packages/boto3/s3/inject.py", line 192, in download_file
    return transfer.download_file(
  File "/home/jstm/Projects/robovpt/venv/lib/python3.10/site-packages/boto3/s3/transfer.py", line 405, in download_file
    future.result()
  File "/home/jstm/Projects/robovpt/venv/lib/python3.10/site-packages/s3transfer/futures.py", line 103, in result
    return self._coordinator.result()
  File "/home/jstm/Projects/robovpt/venv/lib/python3.10/site-packages/s3transfer/futures.py", line 266, in result
    raise self._exception
  File "/home/jstm/Projects/robovpt/venv/lib/python3.10/site-packages/s3transfer/tasks.py", line 269, in _main
    self._submit(transfer_future=transfer_future, **kwargs)
  File "/home/jstm/Projects/robovpt/venv/lib/python3.10/site-packages/s3transfer/download.py", line 354, in _submit
    response = client.head_object(
  File "/home/jstm/Projects/robovpt/venv/lib/python3.10/site-packages/botocore/client.py", line 565, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/home/jstm/Projects/robovpt/venv/lib/python3.10/site-packages/botocore/client.py", line 1021, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (403) when calling the HeadObject operation: Forbidden

I installed ego4d from the github directly. The python package is version 1.7.0

I’ve run aws configure to set my aws credentials. The credentials were sent to me only a few days ago.

‘.aws/credentials’:

[default]
aws_access_key_id = <…>
aws_secret_access_key = <…>

‘.aws/config’:

[default]
region = us-west-2
output = json

How do I fix this error?

thanks

1 Like