Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in word2vec: model from Google Cloud Storage was not downloaded #40

Open
nikolaykurtsev opened this issue Mar 27, 2021 · 4 comments

Comments

@nikolaykurtsev
Copy link

Hello, good day!

Thank you for your work. I'm trying to run automated patent landscape notebook, but I've got an error I could not figure out.

Trying to run block Download Embedding Model if Necessary from patent landscape notebook, I got the following error message:


InvalidResponse Traceback (most recent call last)
C:\Anaconda\envs\new-environment\lib\site-packages\google\cloud\storage\client.py in download_blob_to_file(self, blob_or_uri, file_obj, start, end, raw_download, if_generation_match, if_generation_not_match, if_metageneration_match, if_metageneration_not_match, timeout, checksum)
718 try:
--> 719 blob_or_uri._do_download(
720 transport,

C:\Anaconda\envs\new-environment\lib\site-packages\google\cloud\storage\blob.py in _do_download(self, transport, file_obj, download_url, headers, start, end, raw_download, timeout, checksum)
960 )
--> 961 response = download.consume(transport, timeout=timeout)
962 self._extract_headers_from_download(response)

C:\Anaconda\envs\new-environment\lib\site-packages\google\resumable_media\requests\download.py in consume(self, transport, timeout)
167
--> 168 self._process_response(result)
169

C:\Anaconda\envs\new-environment\lib\site-packages\google\resumable_media_download.py in _process_response(self, response)
184 self._finished = True
--> 185 _helpers.require_status_code(
186 response, _ACCEPTABLE_STATUS_CODES, self._get_status_code

C:\Anaconda\envs\new-environment\lib\site-packages\google\resumable_media_helpers.py in require_status_code(response, status_codes, get_status_code, callback)
98 callback()
---> 99 raise common.InvalidResponse(
100 response,

InvalidResponse: ('Request failed with status code', 404, 'Expected one of', <HTTPStatus.OK: 200>, <HTTPStatus.PARTIAL_CONTENT: 206>)

During handling of the above exception, another exception occurred:

NotFound Traceback (most recent call last)
in
3 model_name = '5.9m'
4 model_download = W2VModelDownload(bq_project)
----> 5 model_download.download_w2v_model('patent_landscapes', model_name)
6 print('Done downloading model {}!'.format(model_name))

~\patents-public-data\models\landscaping\word2vec.py in download_w2v_model(self, landscape_bucket, model_name)
54 bucket = client.bucket('patent_landscapes')
55 blob = bucket.blob(checkpoint_list_file)
---> 56 checkpoints = blob.download_as_string(client=client).decode()
57 checkpoint_file = 'n/a'
58

C:\Anaconda\envs\new-environment\lib\site-packages\google\cloud\storage\blob.py in download_as_string(self, client, start, end, raw_download, if_generation_match, if_generation_not_match, if_metageneration_match, if_metageneration_not_match, timeout)
1385 stacklevel=1,
1386 )
-> 1387 return self.download_as_bytes(
1388 client=client,
1389 start=start,

C:\Anaconda\envs\new-environment\lib\site-packages\google\cloud\storage\blob.py in download_as_bytes(self, client, start, end, raw_download, if_generation_match, if_generation_not_match, if_metageneration_match, if_metageneration_not_match, timeout, checksum)
1294 client = self._require_client(client)
1295 string_buffer = BytesIO()
-> 1296 client.download_blob_to_file(
1297 self,
1298 string_buffer,

C:\Anaconda\envs\new-environment\lib\site-packages\google\cloud\storage\client.py in download_blob_to_file(self, blob_or_uri, file_obj, start, end, raw_download, if_generation_match, if_generation_not_match, if_metageneration_match, if_metageneration_not_match, timeout, checksum)
729 )
730 except resumable_media.InvalidResponse as exc:
--> 731 _raise_from_invalid_response(exc)
732
733 def list_blobs(

C:\Anaconda\envs\new-environment\lib\site-packages\google\cloud\storage\blob.py in _raise_from_invalid_response(error)
4059 )
4060
-> 4061 raise exceptions.from_http_status(response.status_code, message, response=response)
4062
4063

NotFound: 404 GET https://storage.googleapis.com/download/storage/v1/b/patent_landscapes/o/models%2F5.9m%2Fcheckpoints%2Fcheckpoint?alt=media: Not Found: ('Request failed with status code', 404, 'Expected one of', <HTTPStatus.OK: 200>, <HTTPStatus.PARTIAL_CONTENT: 206>)


They problem may be with the folder patent_landscapes in Google Cloud Storage. I couldn't access it manually. The message is:

Sorry, the server was not able to fulfil your request.

Thank you in advance!

@Aimnor
Copy link

Aimnor commented Apr 30, 2021

Hi, same problem here ! Seems this folder doesn't exist anymore. Where can we find it ?

1 similar comment
@d-w216
Copy link

d-w216 commented May 31, 2021

Hi, same problem here ! Seems this folder doesn't exist anymore. Where can we find it ?

@mlawson00
Copy link

Maybe someone has a local copy they can put up?

@peiyu-wang
Copy link

Hi, any solution here now? can't download the model

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants