Crivella/ocr_extension

Unable to aquire translation modules

Closed this issue · 5 comments

I'm trying out this extension, but I am having problems. I selected all the plugins as instructed.
I can set source and destination languages in the first box.
In the second box I am able to set box model and an OCR model.
However, the dropdown menu for the translation model remains empty.

I need help troubleshooting this.

Which plugins have you installed? Without the logs of the server i can only guess.
What do you see in the terminal window when you launch the server, possibly changing set DJANGO_LOG_LEVEL=INFO to set DJANGO_LOG_LEVEL=DEBUG in the run-user.bat file?

  • There is no plugin installed that provides translation models (huggingface/ollama/googletranslate)
  • One of the plugin had some problem during the install. If this is the case you can try 2 things
    • Uninstall that plugin only (deselect it in the extension popup and click submit)
    • Close the server and nuke the plugins installation by deleting the plugins folder and plugins.json file inside your .ocr_translate folder (by default under C:\Users\YOUR_USERNAME (or %userprofile%) and install them again after restarting the server.

One thing I should add in a future patch is add lock to stop people from using the server while plugins are installing (when running on windows it is possible to do so and it could end up messing up with a plugin install)

Thank you. Knowing where the plugin data is stored helps the troubleshooting process.

Although this does bring up another matter. I use Linux, so I cannot use the provided .bat files.
If you have the relevant Linux experience, I do request you write a .sh equivalent for the server. I do not know how many things the bat files does that I bypass by running the python code directly.

I am attempting too reinstall the google plugin, we'll see how that goes.

There is also a .sh variant already and for linux the files are stored by default under $HOME/.ocr_translate
(check the files at the top level of the server repo https://github.com/Crivella/ocr_translate)
The plugins file are just python packages split by scope to allow the same server to run and switch between CPU/GPU.
In case you want to try there is also a docker version https://crivella.github.io/ocr_translate/install_run/from_docker.html

The run-user.sh script is just setting up some environment variables and initializing and activating a virtualenv with the minimum required packages to start the server

Let me know if reinstalling does the trick

I see. The .sh files were not included in the release zip for the latest release.
Reinstalling the plugins seems to have done the trick.
I am still experiencing some errors, but I am getting some translations now.
I will let you know if I need further assistance.

Cheers.

Yeah the release file are/were mostly meant for windows users as in general most linux user would already be familiar with using a terminal.
Before it was a much bulkier EXE with all the deps packaged inside, it might be worth include also the SH scripts for the next release.

Closing the issue for now, you can reopen it or open a new more specific one if needed.