Page MenuHome

Can't translate manual to hmtl
Closed, ResolvedPublic

Description

Hi,,
I have a problem. Advise me how to build a translated html page. I need it to check the translation. Ever since .po files merged into one I can't build html pages for the manual. So far, I have used this command:

"sphinx-build -b html -D language=sk ./manual ./build/html"
It ends after loading 59% of resources with the following error message:

"Recursion error"
I tried inserting these lines into the conf.py file,

import sys
sys.setrecursionlimit (1500)
but it didn't help.

Jozef Matta

Event Timeline

Jozef Matta (pegas923) changed the task status from Needs Triage to Needs Information from Developers.Mar 16 2021, 9:32 AM
Jozef Matta (pegas923) created this task.

I have seen this error before, I'll look into what might be causing it.

Aaron Carlisle (Blendify) changed the task status from Needs Information from Developers to Needs Information from User.Mar 16 2021, 6:38 PM

I could not reproduce, what OS, Python version, and sphinx version are you using?

You can try this from the command line to make sure you are using the most up to date sphinx version:

pip install -r requirements.txt --upgrade --upgrade-strategy eager

Instalated programs:
windows 10 home
python 3.9.0
sphinx 3.5.1

The specified command did not help either.

jozef

I managed to reproduce the error but haven't found the cause yet. It seems this issue only happens on single-threaded builds (multiprocessing is not supported on windows).

Does it work if you add sys.setrecursionlimit (2000) to conf.py?

I've tried that before, but to no avail.

I don't know if this will help, but the blender_manual.mo file is translated.
As well files in the .svn/pristine/ folder

aaron,

I added a command sys.setrecursionlimit (2000) into file /manual/conf.py and so far it looks like it works.
It just takes a long time.

jozef

Unfortunately, sphinx only allows parallel builds on Linux, which is the platform I use so it is much faster.
The recursion limit is per CPU thread so when sphinx is only using one thread it is unable to spread the job over multiple threads and thus reaches the recursion limit faster.

Sphinx has plans to get this to work on Windows see, https://github.com/sphinx-doc/sphinx/issues/6881 but there isn't any recent development.
If you are particular tech-savvy you could use windows subsystem for Linux: https://docs.microsoft.com/en-us/windows/wsl/install-win10
With WSL you can install python and sphinx and it should be faster.

I will commit the fix to the conf.py but on Windows, we will just have to deal with the slow speed until sphinx makes a fix.
I tried looking into fixing it myself but my time is currently stretched across many projects.

Aaron Carlisle (Blendify) closed this task as Resolved.Mar 18 2021, 8:58 PM