Skip to main content
Solved

Problem PythonCaller when workspace run from folder with accent


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.

View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, 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
Influencer
  • 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+44
  • Safer
  • February 19, 2016
takashi wrote:

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+18
  • Safer
  • February 21, 2016
mark2atsafe wrote:

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
Influencer
  • February 21, 2016
takashi wrote:

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
Influencer
  • February 22, 2016
julien wrote:

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
julien wrote:

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


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