Skip to main content
Solved

Problem PythonCaller when workspace run from folder with accent

  • February 18, 2016
  • 7 replies
  • 31 views

Forum|alt.badge.img

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.

Best answer by takashi

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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

7 replies

takashi
Celebrity
  • Best Answer
  • February 18, 2016

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.


mark2atsafe
Safer
Forum|alt.badge.img+59
  • Safer
  • February 19, 2016

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.


fmelizard
Safer
Forum|alt.badge.img+21
  • Safer
  • February 21, 2016

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.


takashi
Celebrity
  • February 21, 2016

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.


Forum|alt.badge.img+5
  • February 22, 2016

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 !


takashi
Celebrity
  • February 22, 2016

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?


Forum|alt.badge.img+5
  • February 23, 2016

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