Flair: Status code 301 when loading model

Created on 28 Sep 2020  路  3Comments  路  Source: flairNLP/flair

Describe the bug
I got status code 301 when I load ner model.

To Reproduce

from flair.models import SequenceTagger
tagger: SequenceTagger = SequenceTagger.load("ner")

Screenshots
image

Environment (please complete the following information):

  • OS [e.g. iOS, Linux]: Ubuntu 16.04
  • Version [e.g. flair-0.3.2]: flair-0.6.1
bug

All 3 comments

Same error when loading embeddings

from flair.embeddings import WordEmbeddings
WordEmbeddings('en')

The error is looking like:

Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/Users/user/.pyenv/versions/nlp/lib/python3.6/site-packages/flair/embeddings/token.py", line 157, in __init__
    f"{base_path}en-fasttext-news-300d-1M.vectors.npy", cache_dir=cache_dir
  File "/Users/user/.pyenv/versions/nlp/lib/python3.6/site-packages/flair/file_utils.py", line 88, in cached_path
    return get_from_cache(url_or_filename, dataset_cache)
  File "/Users/user/.pyenv/versions/nlp/lib/python3.6/site-packages/flair/file_utils.py", line 163, in get_from_cache
    f"HEAD request failed for url {url} with status code {response.status_code}."
OSError: HEAD request failed for url https://s3.eu-central-1.amazonaws.com/alan-nlp/resources/embeddings-v0.3/en-fasttext-news-300d-1M.vectors.npy with status code 301.

Copying the url into the browser, I got the following message:
image

Hello you are likely using an old version of Flair. Can you update to 0.6.1? This should fix the error.

Yes, upgrading to the last version solved the problem for me

Was this page helpful?
0 / 5 - 0 ratings