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

Ontology: crash on adding words #832

Closed
ajdapretnar opened this issue Apr 25, 2022 · 0 comments · Fixed by #882
Closed

Ontology: crash on adding words #832

ajdapretnar opened this issue Apr 25, 2022 · 0 comments · Fixed by #882
Assignees

Comments

@ajdapretnar
Copy link
Collaborator

Describe the bug
Ontology fails when entering the keyword manually, then not pressing Enter yet (not confirming the word) and pressing "Add new word" again.

Error:

--------------------------- RuntimeError Exception ----------------------------
Traceback (most recent call last):
  File "/Users/ajda/orange/orange3-text/orangecontrib/text/widgets/owontology.py", line 706, in __on_ontology_data_changed
    self.__update_score()
  File "/Users/ajda/orange/orange3-text/orangecontrib/text/widgets/owontology.py", line 769, in __update_score
    score = round(self.__onto_handler.score(tree), 2) \
  File "/Users/ajda/orange/orange3-text/orangecontrib/text/ontology.py", line 342, in score
    self._get_embeddings(tree.labels, wrap_callback(callback, end=0.7)),
  File "/Users/ajda/orange/orange3-text/orangecontrib/text/ontology.py", line 366, in _get_embeddings
    embs = self.embedder(missing, callback=wrap_callback(callback, start=0.6, end=0.9))
  File "/Users/ajda/orange/orange3-text/orangecontrib/text/vectorization/sbert.py", line 66, in __call__
    result_ = self._server_communicator.embedd_data(chunks, callback=callback)
  File "/Users/ajda/orange/orange3/Orange/misc/server_embedder.py", line 126, in embedd_data
    return asyncio.run(
  File "/Users/ajda/.pyenv-x86/versions/3.9.10/lib/python3.9/asyncio/runners.py", line 33, in run
    raise RuntimeError(
RuntimeError: asyncio.run() cannot be called from a running event loop
-------------------------------------------------------------------------------

To Reproduce
Steps to reproduce the behavior:

  1. Open Ontology
  2. Add new keyword to Ontology
  3. Don't confirm the word, but press "Add new" once again

Expected behavior
No error.

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

Successfully merging a pull request may close this issue.

2 participants