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

Serbo-Croatian bugs #132

Open
efflang opened this issue Jan 22, 2024 · 4 comments
Open

Serbo-Croatian bugs #132

efflang opened this issue Jan 22, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@efflang
Copy link

efflang commented Jan 22, 2024

As I submitted in October:

#93

Serbian and Croatian words produced audio but no definitions in 0.10.2.

In 0.11.0, the problem is flipped: they now produce definitions but no audio. It doesn't matter which language, script, or audio format is used; even words that have multiple pronunciations in Forvo will not populate audio in the app.

However, Serbian/Bosnian/Croatian seem to produce further bugs within the app itself:

  • If the configured language in 0.10.2 is Serbian, Croatian, or Bosnian when it's uninstalled and replaced with 0.11.0, the app does not open at all
  • Reverting to 0.10.2 allows the app to be opened and if the configured language is set to another language (or the settings are reset), then 0.11.0 can be installed and opened normally
  • But if 0.11.0 is closed with Serbian/Croatian/Bosnian as the configured language, it won't re-open and I have to revert back to 0.10.2 to fix it

VocabSieve

@efflang efflang added the bug Something isn't working label Jan 22, 2024
@1over137
Copy link
Contributor

Interesting bug. @RasmusRendal can you take a look at this? Initially I got an exception from SentenceSplitter which is understandable, but even after handling it in a5bba88 it starts to crash with a different error which appears to be related to the web server.

Traceback (most recent call last):
  File "/home/z/code/vocabsieve/vocabsieve/reader/server.py", line 144, in start_api
    http_server.serve_forever()
  File "/home/z/code/vocabsieve/env/lib/python3.10/site-packages/gevent/baseserver.py", line 398, in serve_forever
    self.start()
  File "/home/z/code/vocabsieve/env/lib/python3.10/site-packages/gevent/baseserver.py", line 336, in start
    self.init_socket()
  File "/home/z/code/vocabsieve/env/lib/python3.10/site-packages/gevent/pywsgi.py", line 1669, in init_socket
    self.update_environ()
  File "/home/z/code/vocabsieve/env/lib/python3.10/site-packages/gevent/pywsgi.py", line 1681, in update_environ
    name = socket.getfqdn(address[0])
  File "/home/z/code/vocabsieve/env/lib/python3.10/site-packages/gevent/_socketcommon.py", line 286, in getfqdn
    hostname, aliases, _ = gethostbyaddr(name)
  File "/home/z/code/vocabsieve/env/lib/python3.10/site-packages/gevent/_socketcommon.py", line 252, in gethostbyaddr
    return get_hub().resolver.gethostbyaddr(ip_address)
  File "/home/z/code/vocabsieve/env/lib/python3.10/site-packages/gevent/hub.py", line 841, in _get_resolver
    self._resolver = self.resolver_class(hub=self) # pylint:disable=not-callable
  File "/home/z/code/vocabsieve/env/lib/python3.10/site-packages/gevent/resolver/thread.py", line 39, in __init__
    self.pool = hub.threadpool
  File "/home/z/code/vocabsieve/env/lib/python3.10/site-packages/gevent/hub.py", line 865, in _get_threadpool
    self._threadpool = self.threadpool_class(
  File "/home/z/code/vocabsieve/env/lib/python3.10/site-packages/gevent/hub.py", line 860, in threadpool_class
    return GEVENT_CONFIG.threadpool
  File "/home/z/code/vocabsieve/env/lib/python3.10/site-packages/gevent/_config.py", line 55, in getter
    return self.settings[setting_name].get()
  File "/home/z/code/vocabsieve/env/lib/python3.10/site-packages/gevent/_config.py", line 151, in get
    self.value = self.validate(self._default())
  File "/home/z/code/vocabsieve/env/lib/python3.10/site-packages/gevent/_config.py", line 259, in validate
    return self._import_one_of([self.shortname_map.get(x, x) for x in value])
  File "/home/z/code/vocabsieve/env/lib/python3.10/site-packages/gevent/_config.py", line 234, in _import_one_of
    return self._import_one(candidates[-1])
  File "/home/z/code/vocabsieve/env/lib/python3.10/site-packages/gevent/_config.py", line 248, in _import_one
    module = importlib.import_module(module)
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/z/code/vocabsieve/env/lib/python3.10/site-packages/gevent/threadpool.py", line 768, in <module>
    class ThreadPoolExecutor(concurrent.futures.ThreadPoolExecutor):
  File "/usr/lib/python3.10/concurrent/futures/__init__.py", line 49, in __getattr__
    from .thread import ThreadPoolExecutor as te
  File "/usr/lib/python3.10/concurrent/futures/thread.py", line 37, in <module>
    threading._register_atexit(_python_exit)
  File "/usr/lib/python3.10/threading.py", line 1504, in _register_atexit
    raise RuntimeError("can't register atexit after shutdown")
RuntimeError: can't register atexit after shutdown
QEventLoop: Cannot be used without QApplication

@1over137
Copy link
Contributor

Never mind, it looks like I'm dumb, and tried to initialize the splitter both in MainWindowBase and in InitSources, causing an exception there which triggered a thread issue.

@1over137
Copy link
Contributor

After fixing the bug, it appears that it fetches definition and audio just fine. In Forvo apparently these are treated as different languages. Is this appropriate?

@efflang
Copy link
Author

efflang commented Jan 23, 2024

Awesome, thanks for the fix! It's working on my end in the nightly build.

Regarding Forvo, if it's possible, I think it'd be ideal if the app just pulled the pronunciations for all 3 at the same time. Even better if they could show the sr, hr, bs code from the Forvo mp3s.

The pronunciations are actually less different than between different Spanish accents, and there just aren't a lot of clips for these languages to begin with.

Often there are words that only have audio in either Croatian or Serbian -- or the audio for one is just much better quality. It also seems like a lot of Bosnians upload clips under Croatian/Serbian, even though there's a separate listing for Bosnian.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants