Non ascii character in ODM Install Path


I have open the following bug :

The fact is we have some systems which use chinese or cyrillic characters and ODM can not run on those currently.

I am not an expert in python but trying to understand I found the following:

  • It comes from an encoding issue
  • The faulty line is this one:
    with open(fpath) as f: line 7 in venv\Lib\site-packages\cv2\
  • I found two ways or fixing the issue:
    • Change the previous line to force utf8 encoding which should be default behaviour in python, I guess (PEP 540 – Add a new UTF-8 Mode | : with open(fpath,encoding='utf8') as f: but this is uggly and I do not know who is responsible for this file in venv. I absolutely do not understand package and virtual environments in python sorry. Not sure if we can contact them or have sufficient weight to leverage this.
    • Force globally python to use utf8 in ODM, adding in winrun.bat the -X utf8 flag. Hence becoming python -X utf8 "%ODMBASE%\" %* instead of python "%ODMBASE%\" %*

What do you think ? Is there any other fix or solution I am missing that we can act uppon ?

1 Like

Thanks for surfacing this, bernarde, and for providing an example in your GitHub issue…

I thought modern Python runtimes should use OS file handling routines that can manage non-ASCII characters, but I was apparently wrong.

I don’t know which approach is right, unfortunately, but it definitely is an important thing to address.

After further testing it appears that non ascci charaters in projet path are causing other errors later.

Good news is that the second fix I suggest allow to patch this also. I have open a PR for this. Up to the community to give its appreciation of the situation :


Wonderful! Thanks so much for you assistance and hard work helping us fix this!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.