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

run_server.py cannot find entries #38

Open
icebarf opened this issue Dec 24, 2024 · 2 comments
Open

run_server.py cannot find entries #38

icebarf opened this issue Dec 24, 2024 · 2 comments

Comments

@icebarf
Copy link

icebarf commented Dec 24, 2024

After setting up LocalAudioYomichan to work without Anki, everything was working as expected.
However, today I noticed that suddenly the offline audio sources were not working.

After starting the server, I get the following log

the log
Initializing database. This make take a while...
(init_db) Adding entries from nhk16...
(make_nhk16_table) Cannot find entries file: /home/ice/.local/share/local-audio-yomichan/nhk16_files/entries.json
(init_db) Adding entries from shinmeikai8...
(AJTJapaneseSource) Cannot find entries file: /home/ice/.local/share/local-audio-yomichan/shinmeikai8_files/index.json
(init_db) Adding entries from forvo...
(init_db) Adding entries from jpod...
(init_db) Adding entries from jpod_alternate...
(init_db) Filling out JMdict forms...
Finished initializing database!
Running local audio server in debug mode...

The path for the nhk16_files and shinmeikai8_files is wrong, it should be looking for those in:
/home/ice/.local/share/local-audio-yomichan/plugin/user_files/

I do not know what could trigger this suddenly where the pathing is broken.

Whenever I stop the server and run it from inside Anki by toggling the add-on, it works just fine without any issues.

Here's how my addons folder looks by the way:

folder structure
drwxr-x--- 1 ice ice 286 Dec  6 18:38 .
drwxr-x--- 1 ice ice  76 Dec 24 19:54 ..
drwxr-x--- 1 ice ice 206 Sep 26 22:50 1156270186
...
drwxr-xr-x 1 ice ice 194 Nov  4 16:31 874215009
lrwxrwxrwx 1 ice ice  50 Dec  6 18:38 LocalAudioDev -> /home/ice/.local/share/local-audio-yomichan/plugin

Please let me know if you need further information from my end. Do note that everything was and it suddenly stopped working. I do not know what could have changed.

@icebarf
Copy link
Author

icebarf commented Dec 24, 2024

image

A screenshot of the statistics section of the LocalAudioDev anki add-on

@icebarf
Copy link
Author

icebarf commented Dec 26, 2024

After messing around for a couple days I realized what was going on:

  • Perform a system upgrade
  • Something related to, or python itself gets updated
  • The dependencies for the virtual environment likely break due to some version mismatch
  • Successfully reproduce the above issue

How i fixed it:

  • Update the virtual env itself by python3 -m venv --upgrade <LOCATION_TO_VENV>
  • Reinstall dependencies by cd local-audio-yomitan, activate your venv, pip install -r requirements.txt
  • run the server

Business as usual.

I'll leave the issue open for sometime in case someone is looking for it or may want to add-on to this.

Cheers!

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

1 participant