semantic-text-similarity icon indicating copy to clipboard operation
semantic-text-similarity copied to clipboard

PermissionError: [Errno 13] Permission denied:

Open jrachid opened this issue 4 years ago • 8 comments

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

jrachid avatar Feb 17 '20 13:02 jrachid

I have this exacto problem could you get this running?

rod08018 avatar Mar 13 '20 00:03 rod08018

The implementation works only on a Linux machine.

On Fri, Mar 13, 2020, 1:24 AM David Rodriguez [email protected] wrote:

I have this exacto problem could you get this running?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/AndriyMulyar/semantic-text-similarity/issues/10#issuecomment-598489137, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADJ4TBTYTB5HUHJEG5DPL53RHF4NNANCNFSM4KWRLMLQ .

AndriyMulyar avatar Mar 13 '20 04:03 AndriyMulyar

Can you make it work on Windows platform?

jaehong-park-78 avatar Dec 03 '20 08:12 jaehong-park-78

No sorry.

On Thu, Dec 3, 2020, 3:29 AM jaehong-park-78 [email protected] wrote:

Can you make it work on Windows platform?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/AndriyMulyar/semantic-text-similarity/issues/10#issuecomment-737747424, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADJ4TBTWEPWOKKVCUGPWARLSS5D5TANCNFSM4KWRLMLQ .

AndriyMulyar avatar Dec 03 '20 13:12 AndriyMulyar

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

TheMarvelousWhale avatar Jan 26 '21 15:01 TheMarvelousWhale

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

Suman

sumanA92 avatar Jan 31 '21 19:01 sumanA92

weak the get_model_p

how you give path

ibtehajali67 avatar Feb 27 '23 11:02 ibtehajali67

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

Firas-al avatar Mar 26 '24 13:03 Firas-al