Skip to main content
Question

Python locale issue

  • June 11, 2024
  • 1 reply
  • 221 views

knutos
Contributor
Forum|alt.badge.img+6


Hi there!

I get tons of these messages from some workspaces created with FME 2020 (in Norway) and now  migrated to FME 2024: 

The Startup Python Script changed the current FME process locale from 'Norwegian Bokmål_Norway.utf8' to 'C' and FME has restored it back to 'Norwegian Bokmål_Norway.utf8'. It is undefined behavior to change locale and doing so may cause unexpected errors. For more information, visit http://fme.ly/PythonLocaleError

I have read the post http://fme.ly/PythonLocaleError carefully, but it does not give me anything. I have nothing such as import arcpy or locale.setlocale() in my Python-code. The example message above is particulary strange, I don’t even have a Python Startup Script. So something is absolutely confusing here.

No Startup Script

Another example:

PythonFactory script changed the current FME process locale from 'Norwegian Bokmål_Norway.utf8' to 'C' and FME has restored it back to 'Norwegian Bokmål_Norway.utf8'. It is undefined behavior to change locale and doing so may cause unexpected errors. For more information, visit http://fme.ly/PythonLocaleError

“With FME 2022.0 and newer, FME will process all workspaces using UTF-8 as the encoding for most string data when running on Windows 10+ or Windows Server 2019+, this allows for FME to execute workspaces that are created in different locales and will help minimize locale issues. “

This is well known by me. My guess for the reason of these messages is that the workspace was developed prior to FME 2022.0, and therefore originally not in UTF-8 encoding. But how can I get rid of these messages after that the workspace has been migrated to FME 2024?

Anyone?

crystalatsafe
Safer
Forum|alt.badge.img+18

Hi @knutos 

 

I believe this issue has been fixed for 2024.1 which should be released soon. 

For now, if you set the display language to English this seems to work as a temporary workaround. 

 

Please let me know if this works for you. 

Crystal 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings