Skip to content

PermissionError: [Errno 13] Permission denied: #10

Open

Description

@jrachid

Hello,

When I launch your example, the program begins by download we_bert_similarity.tar.gz, and at the end of the download I have the following error:
Failed to download model: web-bert-similarity Traceback (most recent call last): File "semantic_similarity.py", line 4, in <module> web_model = WebBertSimilarity(device='cpu', batch_size=10) #defaults to GPU prediction File "F:\Users\rachidj\Anaconda3\envs\nlpenv\lib\site-packages\semantic_text_similarity\models\bert\web_similarity.py", line 7, in __init__ model_path = get_model_path(model_name) File "F:\Users\rachidj\Anaconda3\envs\nlpenv\lib\site-packages\semantic_text_similarity\models\util.py", line 40, in get_model_path raise exc File "F:\Users\rachidj\Anaconda3\envs\nlpenv\lib\site-packages\semantic_text_similarity\models\util.py", line 36, in get_model_path tar = tarfile.open(temp_file.name) File "F:\Users\rachidj\Anaconda3\envs\nlpenv\lib\tarfile.py", line 1573, in open return func(name, "r", fileobj, **kwargs) File "F:\Users\rachidj\Anaconda3\envs\nlpenv\lib\tarfile.py", line 1638, in gzopen fileobj = gzip.GzipFile(name, mode + "b", compresslevel, fileobj) File "F:\Users\rachidj\Anaconda3\envs\nlpenv\lib\gzip.py", line 163, in __init__ fileobj = self.myfileobj = builtins.open(filename, mode or 'rb') PermissionError: [Errno 13] Permission denied: 'C:\\Users\\rachidj\\AppData\\Local\\Temp\\tmpq6i6wt_s'

So I downloaded them manually, but I don't know where put them to make the example script working

Activity

  1. rod08018 commented on Mar 13, 2020

    @rod08018

    I have this exacto problem could you get this running?

  2. AndriyMulyar commented on Mar 13, 2020

    @AndriyMulyar
    Owner
  3. jaehong-park-78 commented on Dec 3, 2020

    @jaehong-park-78

    Can you make it work on Windows platform?

  4. AndriyMulyar commented on Dec 3, 2020

    @AndriyMulyar
    Owner
  5. TheMarvelousWhale commented on Jan 26, 2021

    @TheMarvelousWhale

    Hi all,

    For this problem, you can download bert pretrained model (*.tar.gz) manually and tweak the get_model_path. Works for me on a Windows 10 machine, with Anaconda.

    Cheers

  6. sumanA92 commented on Jan 31, 2021

    @sumanA92

    Thank you TheMarvelousWhale. I am able to execute web-bert-similarity in windows 10 machine

    Suman

  7. ibtehajali67 commented on Feb 27, 2023

    @ibtehajali67

    weak the get_model_p

    how you give path

  8. Firas-al commented on Mar 26, 2024

    @Firas-al

    To avoid PermissionError: [Errno 13] Permission denied:

    To change the path first install the the folder. Then click on WebBertSimilarity().
    image
    Then you will get :
    image
    you should change as the following :
    image
    Then run the program :
    image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions