allenai / kb

KnowBert -- Knowledge Enhanced Contextual Word Representations
Apache License 2.0
370 stars 50 forks source link

Cannot download s3://allennlp/knowbert/models/vocabulary_wordnet.tar.gz file #16

Closed liviabiggi closed 4 years ago

liviabiggi commented 4 years ago

Hi, I am encountering errors when trying to download s3://allennlp/knowbert/models/vocabulary_wordnet.tar.gz as specified in training_config/pretraining/knowbert_wordnet_linker.jsonnet.

I've had no issues when downloading the other s3 files in the config file (and even in the models folder), but vocabulary_wordnet.tar.gz gives me the error botocore.exceptions.ClientError: An error occurred (403) when calling the HeadObject operation: Forbidden

Full traceback:

Traceback (most recent call last):
  File "/home/livia/.local/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 3319, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-33-161fe1979b1e>", line 1, in <module>
    s3.download_file('allennlp', 'knowbert/models/vocabulary_wordnet.tar.gz', 'vocabulary.tar.gz')
  File "/home/livia/.local/lib/python3.6/site-packages/boto3/s3/inject.py", line 172, in download_file
    extra_args=ExtraArgs, callback=Callback)
  File "/home/livia/.local/lib/python3.6/site-packages/boto3/s3/transfer.py", line 307, in download_file
    future.result()
  File "/home/livia/.local/lib/python3.6/site-packages/s3transfer/futures.py", line 106, in result
    return self._coordinator.result()
  File "/home/livia/.local/lib/python3.6/site-packages/s3transfer/futures.py", line 265, in result
    raise self._exception
  File "/home/livia/.local/lib/python3.6/site-packages/s3transfer/tasks.py", line 255, in _main
    self._submit(transfer_future=transfer_future, **kwargs)
  File "/home/livia/.local/lib/python3.6/site-packages/s3transfer/download.py", line 343, in _submit
    **transfer_future.meta.call_args.extra_args
  File "/home/livia/.local/lib/python3.6/site-packages/botocore/client.py", line 276, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/home/livia/.local/lib/python3.6/site-packages/botocore/client.py", line 586, 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 have upgraded allennlp using pip install git+git://github.com/matt-peters/allennlp.git@2d7ba1cb108428aaffe2dce875648253b44cb5ba as in #14 but to no avail. If I try a simple curl https://allennlp.s3.amazonaws.com/knowbert/models/vocabulary_wordnet.tar.gz from the command line I get

\<?xml version="1.0" encoding="UTF-8"?> \<Error>\<Code>AccessDenied\</Code>\<Message>Access Denied\</Message>\EE39315B861F9F02\H/WFn0ut8JZiSGgaaxeR1iffK/mGhZwD8vEk9A5Wgvw9Ac9/LKPz+2TECiEpr0KswVbFDtu907M=\</HostId>\</Error>

Do you know how I could fix this?

alexanderpanchenko commented 4 years ago

The same here using aws tool:

aws s3 ls s3://allennlp/knowbert/models/vocabulary_wiki.tar.gz

An error occurred (AccessDenied) when calling the ListObjects operation: Access Denied
matt-peters commented 4 years ago

This should be public now, let me know if you are still seeing errors.

liviabiggi commented 4 years ago

It works fine now, thank you!

alexanderpanchenko commented 4 years ago

https://allennlp.s3.amazonaws.com/knowbert/models/vocabulary_wiki.tar.gz is still n/a Could you please fix permissions for this file?

matt-peters commented 4 years ago

Fixed! My apologies for all the s3 errors.