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

Ошибка "no such table: word_tagsets" #3

Open
Silicium-K opened this issue Apr 29, 2021 · 3 comments
Open

Ошибка "no such table: word_tagsets" #3

Silicium-K opened this issue Apr 29, 2021 · 3 comments

Comments

@Silicium-K
Copy link

Silicium-K commented Apr 29, 2021

Добрый день.
При попытке использовать rupostagger ( например, с помощью кода указанного здесь в примере "кошки спят", или в примере со страницы rulemma) возникает ошибка
OperationalError: no such table: word_tagsets

Так эта ошибка выглядит, когда я запускаю rupostagger из под R с помощью reticulate.
Если попытаться выполнить предложенный пример в IDLE, то пишет подробнее.
Traceback (most recent call last): File "<pyshell#21>", line 1, in <module> for word, label in tagger.tag(u'кошки спят'.split()): print(u'{} -> {}'.format(word, label)) File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\rupostagger\rupostagger.py", line 133, in tag X = self.vectorize_sample(words) File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\rupostagger\rupostagger.py", line 124, in vectorize_sample features = self.get_word_features(words[iword2], str(j)) File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\rupostagger\rupostagger.py", line 104, in get_word_features for tagset in self.word2tags[uword]: File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\ruword2tags\ruword2tags.py", line 141, in __getitem__ for r in self.cur.execute('SELECT id_tagsets FROM word_tagsets WHERE word=:word', {'word': word}): sqlite3.OperationalError: no such table: word_tagsets

Я обычно не работаю с Python, по этому не уверен, что проблема не в моих действиях. Извините, если так.

@Koziev
Copy link
Owner

Koziev commented Apr 30, 2021

Привет,

возможно эта ошибка связана с проблемой скачивания файа БД sqlite из репозитория ruword2tags:

https://github.com/Koziev/ruword2tags#%D0%BE%D1%88%D0%B8%D0%B1%D0%BA%D0%B0-sqlite3databaseerror-file-is-not-a-database

Но я именно такую ошибку раньше не встречал, не уверен :(

@orlando-labs
Copy link

Привет, извините, что поднимаю старую проблему, но этой ошибке предшествует еще вот такое:

Access denied with the following error:

        Cannot retrieve the public link of the file. You may need to change
        the permission to 'Anyone with the link', or have had many accesses. 

You may still be able to access the file from the browser:

         https://drive.google.com/uc?id=1xlL8ijnwE6tAPpsil7Q1yWkXY4mn2YCd 

@tararonis
Copy link

Тоже словил проблему

---------------------------------------------------------------------------
FileURLRetrievalError                     Traceback (most recent call last)
File /opt/anaconda3/lib/python3.12/site-packages/gdown/download.py:267, in download(url, output, quiet, proxy, speed, use_cookies, verify, id, fuzzy, resume, format, user_agent, log_messages)
    [266](https://file+.vscode-resource.vscode-cdn.net/opt/anaconda3/lib/python3.12/site-packages/gdown/download.py:266) try:
--> [267](https://file+.vscode-resource.vscode-cdn.net/opt/anaconda3/lib/python3.12/site-packages/gdown/download.py:267)     url = get_url_from_gdrive_confirmation(res.text)
    [268](https://file+.vscode-resource.vscode-cdn.net/opt/anaconda3/lib/python3.12/site-packages/gdown/download.py:268) except FileURLRetrievalError as e:

File /opt/anaconda3/lib/python3.12/site-packages/gdown/download.py:55, in get_url_from_gdrive_confirmation(contents)
     [54](https://file+.vscode-resource.vscode-cdn.net/opt/anaconda3/lib/python3.12/site-packages/gdown/download.py:54) if not url:
---> [55](https://file+.vscode-resource.vscode-cdn.net/opt/anaconda3/lib/python3.12/site-packages/gdown/download.py:55)     raise FileURLRetrievalError(
     [56](https://file+.vscode-resource.vscode-cdn.net/opt/anaconda3/lib/python3.12/site-packages/gdown/download.py:56)         "Cannot retrieve the public link of the file. "
     [57](https://file+.vscode-resource.vscode-cdn.net/opt/anaconda3/lib/python3.12/site-packages/gdown/download.py:57)         "You may need to change the permission to "
     [58](https://file+.vscode-resource.vscode-cdn.net/opt/anaconda3/lib/python3.12/site-packages/gdown/download.py:58)         "'Anyone with the link', or have had many accesses. "
     [59](https://file+.vscode-resource.vscode-cdn.net/opt/anaconda3/lib/python3.12/site-packages/gdown/download.py:59)         "Check FAQ in https://github.com/wkentaro/gdown?tab=readme-ov-file#faq.",
     [60](https://file+.vscode-resource.vscode-cdn.net/opt/anaconda3/lib/python3.12/site-packages/gdown/download.py:60)     )
     [61](https://file+.vscode-resource.vscode-cdn.net/opt/anaconda3/lib/python3.12/site-packages/gdown/download.py:61) return url

FileURLRetrievalError: Cannot retrieve the public link of the file. You may need to change the permission to 'Anyone with the link', or have had many accesses. Check FAQ in https://github.com/wkentaro/gdown?tab=readme-ov-file#faq.

During handling of the above exception, another exception occurred:

FileURLRetrievalError                     Traceback (most recent call last)
Cell In[11], [line 13](vscode-notebook-cell:?execution_count=11&line=13)
     [10](vscode-notebook-cell:?execution_count=11&line=10) tokenizer.load()
     [12](vscode-notebook-cell:?execution_count=11&line=12) tagger = rupostagger.RuPosTagger()
...
You may still be able to access the file from the browser:

	https://drive.google.com/uc?id=1xlL8ijnwE6tAPpsil7Q1yWkXY4mn2YCd

but Gdown can't. Please check connections and permissions.

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

4 participants