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

"Program terminated with an unrecoverable error." #15

Closed
YuriBalashov opened this issue Apr 25, 2021 · 6 comments
Closed

"Program terminated with an unrecoverable error." #15

YuriBalashov opened this issue Apr 25, 2021 · 6 comments

Comments

@YuriBalashov
Copy link

Hello Tommi,

Thank you for putting it all together for us code-illiterate translators!

I wonder if you could throw any light on what goes wrong below, when I try to run a test translation using OPUS-CAT successfully installed. I have a vague feeling that the files named 'decoder.yml' and 'source.spm' get written into a wrong directory on my PC. In fact, there's no directory on my PC with the path 'C:\Users\Yuri'. My real user directory is @ 'C:\Users\Yuri Balashov'.

2021-04-25 17:03:30.007 -04:00 [INF] Setting Tls12 as security protocol (required for accessing online model storage
2021-04-25 17:03:30.030 -04:00 [INF] Opening OPUS-CAT MT Engine window
2021-04-25 17:03:30.033 -04:00 [INF] Starting OPUS-CAT MT Engine
2021-04-25 17:03:30.035 -04:00 [INF] Fetching a list of online models from https://object.pouta.csc.fi/OPUS-MT-models/
2021-04-25 17:03:30.488 -04:00 [INF] Starting OPUS-CAT MT Engine's net.tcp and HTTP APIs
2021-04-25 17:03:30.496 -04:00 [INF] Creating service host with following URIs: net.tcp:https://localhost:8477/,http:https://localhost:8500/
2021-04-25 17:03:30.519 -04:00 [INF] Opening the service host
2021-04-25 17:03:30.581 -04:00 [INF] HTTP API could not be started, starting Net.tcp API. If HTTP API is required, add the relevant URL to the urlacl list with netsh.
2021-04-25 17:03:30.581 -04:00 [INF] Creating service host with following URIs: net.tcp:https://localhost:8477/
2021-04-25 17:03:30.589 -04:00 [INF] Opening the service host
2021-04-25 17:10:59.352 -04:00 [INF] Starting MT pipe for model en-ru_opus-2020-02-11.
2021-04-25 17:10:59.415 -04:00 [INF] spm_encode_main.cc(52) [_status.ok()] Not found: "C:\Users\Yuri\source.spm": No such file or directory Error #2
2021-04-25 17:10:59.415 -04:00 [INF] Program terminated with an unrecoverable error.
2021-04-25 17:10:59.468 -04:00 [INF] [2021-04-25 17:10:59] Error: File 'C:\Users\Yuri\decoder.yml' does not exist
2021-04-25 17:10:59.468 -04:00 [INF] [2021-04-25 17:10:59] Error: Aborted from marian::io::InputFileStream::InputFileStream in C:\Users\niemi\Documents\Code\marian\src\common\file_stream.cpp:22
2021-04-25 17:10:59.499 -04:00 [INF]
2021-04-25 17:10:59.499 -04:00 [INF] [CALL STACK]
2021-04-25 17:10:59.499 -04:00 [INF] > 00007FF60B5D0209 (SymFromAddr() error)
2021-04-25 17:10:59.499 -04:00 [INF] - 00007FF60B5CF51A (SymFromAddr() error)
2021-04-25 17:10:59.499 -04:00 [INF] - 00007FF60B3F7FFC (SymFromAddr() error)
2021-04-25 17:10:59.499 -04:00 [INF] - 00007FF60B1C3583 (SymFromAddr() error)
2021-04-25 17:10:59.499 -04:00 [INF] - 00007FF60B1C674B (SymFromAddr() error)
2021-04-25 17:10:59.499 -04:00 [INF] - 00007FF60B6D09F4 (SymFromAddr() error)
2021-04-25 17:10:59.499 -04:00 [INF] - BaseThreadInitThunk
2021-04-25 17:10:59.499 -04:00 [INF] - RtlUserThreadStart
2021-04-25 17:10:59.499 -04:00 [INF]
2021-04-25 17:10:59.499 -04:00 [INF]

opuscat_log20210425 - Copy.txt

What could be causing this issue? And is there anything to be done? Would be great to know because everything is working properly on my other PC (laptop).

Thanks so much!
Yuri

@TommiNieminen
Copy link
Collaborator

Hi, this is a bug, thanks for letting me know. It seems user names that contain spaces cause the MT pipeline to fail. I will fix this in the next version, but in the meantime there is a work-around, but it requires some text file editing:

  1. Open the file StartSentencePieceMtPipe.bat in the directory you have extracted the MT engine into.
  2. Change the first line from @ set modeldir=%1 to @ set modeldir="%1 %2".
  3. Do the same edit in the StartMosesBpeMtPipe.bat file in the same directory.

The above should solve the problem in your case, where there is a single space. If there are several spaces in the user name, a different edit is required:

  • Two spaces in username: @ set modeldir="%1 %2 %3"
  • Three spaces in username: @ set modeldir="%1 %2 %3 %4"
  • and so on...

@YuriBalashov
Copy link
Author

Excellent. It works! Thanks so much for your help, Tommi.

@YuriBalashov
Copy link
Author

Tommi,

Could you help a bit more with tuning? Same problem, apparently:

2021-04-26 14:25:53.911 -04:00 [INF] Setting Tls12 as security protocol (required for accessing online model storage
2021-04-26 14:25:53.932 -04:00 [INF] Opening OPUS-CAT MT Engine window
2021-04-26 14:25:53.934 -04:00 [INF] Starting OPUS-CAT MT Engine
2021-04-26 14:25:53.941 -04:00 [INF] Fetching a list of online models from https://object.pouta.csc.fi/OPUS-MT-models/
2021-04-26 14:25:54.590 -04:00 [INF] Starting OPUS-CAT MT Engine's net.tcp and HTTP APIs
2021-04-26 14:25:54.621 -04:00 [INF] Creating service host with following URIs: net.tcp:https://localhost:8477/,http:https://localhost:8500/
2021-04-26 14:25:54.633 -04:00 [INF] Opening the service host
2021-04-26 14:25:54.658 -04:00 [INF] HTTP API could not be started, starting Net.tcp API. If HTTP API is required, add the relevant URL to the urlacl list with netsh.
2021-04-26 14:25:54.658 -04:00 [INF] Creating service host with following URIs: net.tcp:https://localhost:8477/
2021-04-26 14:25:54.659 -04:00 [INF] Opening the service host
2021-04-26 14:26:05.027 -04:00 [INF] Starting MT pipe for model en-ru_opus-2020-02-11.
2021-04-26 14:41:40.702 -04:00 [INF] Setting Tls12 as security protocol (required for accessing online model storage
2021-04-26 14:41:40.724 -04:00 [INF] Opening OPUS-CAT MT Engine window
2021-04-26 14:41:40.727 -04:00 [INF] Starting OPUS-CAT MT Engine
2021-04-26 14:41:40.732 -04:00 [INF] Fetching a list of online models from https://object.pouta.csc.fi/OPUS-MT-models/
2021-04-26 14:41:41.373 -04:00 [INF] Starting OPUS-CAT MT Engine's net.tcp and HTTP APIs
2021-04-26 14:41:41.379 -04:00 [INF] Creating service host with following URIs: net.tcp:https://localhost:8477/,http:https://localhost:8500/
2021-04-26 14:41:41.388 -04:00 [INF] Opening the service host
2021-04-26 14:41:41.408 -04:00 [INF] HTTP API could not be started, starting Net.tcp API. If HTTP API is required, add the relevant URL to the urlacl list with netsh.
2021-04-26 14:41:41.408 -04:00 [INF] Creating service host with following URIs: net.tcp:https://localhost:8477/
2021-04-26 14:41:41.409 -04:00 [INF] Opening the service host
2021-04-26 14:42:24.030 -04:00 [INF] Fine-tuning a new model with model tag OPUS_ClinicalTrials from base model opus-2020-02-11.
2021-04-26 14:42:34.230 -04:00 [INF] Starting batch translator for model en-ru_opus-2020-02-11.
2021-04-26 14:42:34.304 -04:00 [INF] [2021-04-26 14:42:34] Error: File 'C:\Users\Yuri\batch.yml' does not exist
2021-04-26 14:42:34.304 -04:00 [INF] [2021-04-26 14:42:34] Error: Aborted from marian::io::InputFileStream::InputFileStream in C:\Users\niemi\Documents\Code\marian\src\common\file_stream.cpp:22
2021-04-26 14:42:34.336 -04:00 [INF]
2021-04-26 14:42:34.336 -04:00 [INF] [CALL STACK]
2021-04-26 14:42:34.336 -04:00 [INF] > 00007FF7C6830209 (SymFromAddr() error)
2021-04-26 14:42:34.336 -04:00 [INF] - 00007FF7C682F51A (SymFromAddr() error)
2021-04-26 14:42:34.336 -04:00 [INF] - 00007FF7C6657FFC (SymFromAddr() error)
2021-04-26 14:42:34.336 -04:00 [INF] - 00007FF7C6423583 (SymFromAddr() error)
2021-04-26 14:42:34.336 -04:00 [INF] - 00007FF7C642674B (SymFromAddr() error)
2021-04-26 14:42:34.336 -04:00 [INF] - 00007FF7C69309F4 (SymFromAddr() error)
2021-04-26 14:42:34.336 -04:00 [INF] - BaseThreadInitThunk
2021-04-26 14:42:34.336 -04:00 [INF] - RtlUserThreadStart
2021-04-26 14:42:34.336 -04:00 [INF]
2021-04-26 14:42:34.336 -04:00 [INF]
2021-04-26 14:42:36.986 -04:00 [INF] Batch translation process for model en-ru_opus-2020-02-11 exited. Processing output.
2021-04-26 14:42:37.057 -04:00 [INF] FINDSTR: Cannot open 100
2021-04-26 14:42:37.090 -04:00 [INF] FINDSTR: Cannot open C:\Users\Yuri
2021-04-26 14:42:38.153 -04:00 [INF] Missing operator.

Thanks!!
Yuri
2-opuscat_log20210426.txt

@TommiNieminen
Copy link
Collaborator

Yes, that's the same problem, unfortunately in this case the path is actually in the code, so it can't be changed by modifying the bat files. I'll see if I can get a hotfix done for this issue this week, seems very likely other people are going to run into it.

However, I also just remembered there's a pre-release version of the MT engine which can be used to work around this issue. You can download it from here. In this version, the Settings tab has an option called Store OPUS-CAT MT Engine data in local application data folder (instead of installation folder):

kuva

This setting is enabled by default (and it is the implicit default setting in all the previous versions). If you extract the MT engine into a directory with no spaces in the path (such as the root of an external hard drive or C:) and disable this setting, the path to the models will not contain spaces and the MT engine will work as expected (with the models and other data saved in the MT engine directory).

@YuriBalashov
Copy link
Author

Great. This is super-helpful. Thank you again, Tommi, for your quick responses to these issues!

@TommiNieminen
Copy link
Collaborator

The problem with spaces in usernames is resolved in the latest release of OPUS-CAT, so I'm closing the issue.

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

2 participants