Skip to main content

Hi
While converting an existing chain of workspaces from 2022.1 to 2024.0 version i ran into this issue:

The current FME process locale has been changed 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 call 'setlocale()' in plugin code and doing so may cause unexpected errors
..
Python version 3.12 loaded successfully
Python: There is a known Windows bug that may cause instability when using Python in the current locale. Please update to Windows 10 version 2004 and greater, or to Windows Server 2022. See http://fme.ly/nw5 for more details

C:\Users\%username%\AppData\Roaming\Safe Software\FME\Packages\24187-win64\python\safe.azurestorage\azure\storage\blob\_deserialization.py:657: SyntaxWarning: "is" with 'int' literal. Did you mean "=="?
  elif num_empty_lines is 2:

Message Type: fme::internal::_v0::py::Exception
Python Exception <Error>: unsupported locale setting
PythonFactory failed to load python symbol `fmepy_azurestorage.connector.AzureBlobStorageConnector'. An outdated FME packaged transformer may be in use. Please check Tools > FME Options > FME Packages to confirm that all FME Packages are up to date

PythonFactory script changed the current FME process locale from 'Norwegian Bokmål_Norway.utf8' to 'Norwegian Bokmål_Norway.1252' 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

 

Edited the refered file for my user and chenged it to:

C:\Users\%username%\AppData\Roaming\Safe Software\FME\Packages\24187-win64\python\safe.azurestorage\azure\storage\blob\_deserialization.py

 

#XXX Added Code set locale

import locale

locale.setlocale(locale.LC_ALL, "Norwegian_Norway.1252")

 

#XXX Changed Code

            elif num_empty_lines == 2:

            #from this;  elif num_empty_lines is 2:

                batch_http_sub_response.body += line

 

The locale setting part corrupted the run

The elif num_empty_lines is 2: gave error but didn’t corrupt the run.
I haven’t put a debug on it to test if the code hist the specific if.

Suggested solution gave no errors.
Q: Are these known bugs, and what is the difference on the transformer from 2022 to 2024.

Best regards

Roger Bakkestuen

 

Be the first to reply!

Reply