Solved

Problem PythonCaller when workspace run from folder with accent

  • 18 February 2016
  • 7 replies
  • 0 views

Badge

Since I upgrade to FME 2016, I have the following error when trying to use a PythonCaller in a workspace that is in a folder with accent such : /Testé/

Error adding `H:\\FME\\Decoupage_Secteur\\Testé\\' to the python path

Python failed to initialize

If I remove the accent in the folder name, the workspace run without error.

FME should try to write the path like this:

H:/FME/Decoupage_Secteur/Testé/ to avoid error

Is it normal or a bug? In previous version of FME there was no such error.

icon

Best answer by takashi 18 February 2016, 23:52

View original

7 replies

Userlevel 2
Badge +17

Hi @burton449, it's a known bug in 2016.0. The same error occurs for Japanese characters, and I heard that it will be fixed in 2016.1 from Safe.

# I hope that the fix will be backported into 2016.0.1.x.

Userlevel 4
Badge +25

Hi @burton449, it's a known bug in 2016.0. The same error occurs for Japanese characters, and I heard that it will be fixed in 2016.1 from Safe.

# I hope that the fix will be backported into 2016.0.1.x.

I've asked the development team if they can fit this into a 2016.0 fix/service pack (if there is one). I'll let you know what the say.

Userlevel 4
Badge +13

I've asked the development team if they can fit this into a 2016.0 fix/service pack (if there is one). I'll let you know what the say.

Just checked and this fix is going into the 2016.0.1.1 micro-update due out in the next 10 days.

Userlevel 2
Badge +17

Hi @burton449, it's a known bug in 2016.0. The same error occurs for Japanese characters, and I heard that it will be fixed in 2016.1 from Safe.

# I hope that the fix will be backported into 2016.0.1.x.

Hi @daleatsafe, @Mark2AtSafe, good to hear. Thanks for your every effort on i18n of FME.

Badge +5

Hi,Bonjour,

In your Python Caller, you can add this line # -*- coding: utf-8 -*-

The Workbench runs successfully.

# -*- coding: utf-8 -*-
import fmeobjects
# Template Function interface:
# When using this function, make sure its name is set as the value of
# the 'Class or Function to Process Features' transformer parameter
def processFeature(feature):
    pass


# Template Class Interface:
# When using this class, make sure its name is set as the value of
# the 'Class or Function to Process Features' transformer parameter
class FeatureProcessor(object):
    def __init__(self):
        pass
    def input(self,feature):
        folder = FME_MacroValues['folder']
        print folder
        self.pyoutput(feature)
    def close(self):
        pass

Bonne programmation !

Userlevel 2
Badge +17

Hi,Bonjour,

In your Python Caller, you can add this line # -*- coding: utf-8 -*-

The Workbench runs successfully.

# -*- coding: utf-8 -*-
import fmeobjects
# Template Function interface:
# When using this function, make sure its name is set as the value of
# the 'Class or Function to Process Features' transformer parameter
def processFeature(feature):
    pass


# Template Class Interface:
# When using this class, make sure its name is set as the value of
# the 'Class or Function to Process Features' transformer parameter
class FeatureProcessor(object):
    def __init__(self):
        pass
    def input(self,feature):
        folder = FME_MacroValues['folder']
        print folder
        self.pyoutput(feature)
    def close(self):
        pass

Bonne programmation !

Unfortunately the encoding declaration did not resolve the issue in Japanese locale. The solution is effective in European locales?

Badge +5

Hi,Bonjour,

In your Python Caller, you can add this line # -*- coding: utf-8 -*-

The Workbench runs successfully.

# -*- coding: utf-8 -*-
import fmeobjects
# Template Function interface:
# When using this function, make sure its name is set as the value of
# the 'Class or Function to Process Features' transformer parameter
def processFeature(feature):
    pass


# Template Class Interface:
# When using this class, make sure its name is set as the value of
# the 'Class or Function to Process Features' transformer parameter
class FeatureProcessor(object):
    def __init__(self):
        pass
    def input(self,feature):
        folder = FME_MacroValues['folder']
        print folder
        self.pyoutput(feature)
    def close(self):
        pass

Bonne programmation !

Yes it's for European countries @French

Reply