Skip to main content

Hi,

Each time I try to use the Emailer transformer in a workbench, I get this error message :

2018-02-12 15:28:28| 0.5| 0.1|WARN |Python Exception <UnicodeDecodeError>: 'ascii' codec can't decode byte 0xe9 in position 43: ordinal not in range(128)

2018-02-12 15:28:28| 0.5| 0.0|WARN |Traceback (most recent call last):

File "Emailer.py", line 126, in input

UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 43: ordinal not in range(128)

2018-02-12 15:28:28| 0.5| 0.0|ERROR |Error encountered while calling method `input'

2018-02-12 15:28:28| 0.5| 0.0|FATAL |f_6(PythonFactory): PythonFactory failed to process feature

2018-02-12 15:28:28| 0.5| 0.0|ERROR |A fatal error has occurred. Check the logfile above for details

 

I tried with the generic SMTP and a Gmail account and always get the same error.

Any ideas ?

Thanks

Hi @philsc,

What version are you using of FME Desktop?

Thanks,

Danilo


Sounds like there are some non-ascii characters somewhere. Can you please post a screenshot of your Email configuration?


danilo_fme,

We are working on FME 64 bits 2017.1.1.0 build 17650

david_r,

here is a screenshot of the transformer, I don't think there is an ascii character except maybe the @

Thanks for your help.


danilo_fme,

We are working on FME 64 bits 2017.1.1.0 build 17650

david_r,

here is a screenshot of the transformer, I don't think there is an ascii character except maybe the @

Thanks for your help.

There is not space in any words?

 

 


There is not space in any words?

 

 

No, there is no space in any parameters

 0xe9 is a é if htat helps,

I don't know if FME 2017 is different to 2016 but I tent to do address like 

"Philippe Cote"<phillipecote@gmail.com>


 0xe9 is a é if htat helps,

I don't know if FME 2017 is different to 2016 but I tent to do address like 

"Philippe Cote"<phillipecote@gmail.com>

I tried your way with few different adresses and without any ascii character or space with no success yet. 

 

Thanks

 

 


Do you have the rights to send an email?


 0xe9 is a é if htat helps,

I don't know if FME 2017 is different to 2016 but I tent to do address like 

"Philippe Cote"<phillipecote@gmail.com>

 

There's a p missing in the example below.

Do you have the rights to send an email?

It seems that the ports 25 and 587 are blocked on our machines. Which may prevent us to send emails. I'm trying to get those ports open to test. However, the error message doesn't point in that direction...

 

There's a p missing in the example below.
I just erased few character from my real email just not to leave it out there for the whole web.

 

But I tried with different email adresses from different domain and it all failed.

 

 


Hi everybody.

I've the same problem have you find the source of this problem ?


Hi everybody.

I've the same problem have you find the source of this problem ?

Ask your IT if the ports 25 or 587 are open on your firewall.

 

They prevent from sending email when close. Here they are close and they don't want to open them even for a simple test so I can't confirm that this is the real cause of the problem.

 

 

Thanks

 


Hi @philsc, @lalandexavier -- I took a peak into the source code (because your error log reported a line 😵 and I have an interesting observation.

First, I'll ask the team to "harden" the offending line of code so we can better see what is really going on.

But..

The error is being thrown at the very moment that we are creating an error message to return. I suspect that we're getting some unicode characters back from the email server complaining, and when we are trying to report whatever the email server told us, we throw this exception.

I'm sorry that this isn't more helpful, and we'll see if we can improve the error reporting at least for FME 2018. But all I can advise is that somehow there is a failure being reported back from the email server.

The source code in question is pasted below:

def input(self, feature):

# Get the attributes from the feature

self._fme_name = feature.getAttribute(kEmailerXformerName)

connectionParams, emailContents = self._popMailArgsFromFeature(feature)

# Do the real work. If any problem happens, catch it and assign appropriate attributes

rejectionMessage = None

try:

self.sendMail(connectionParams, emailContents)

except FMEException as exc:

rejectionMessage = exc.message

except:

exceptionType = sys.exc_info()[0]

exceptionValue = sys.exc_info()[1]

exceptionTypeAsString = str(exceptionType)

exceptionValueAsString = str(exceptionValue)

rejectionMessage = exceptionTypeAsString + ': ' + exceptionValueAsString

Line 126 is the last line here.

Dale


Hello @philsc,

Thank you for your patience while we worked through this issue. In the latest FME 2019.0 beta, this error has been addressed. You can download the latest FME 2019.0 beta here: https://www.safe.com/support/support-resources/fme-downloads/beta

 


Hello @philsc,

Thank you for your patience while we worked through this issue. In the latest FME 2019.0 beta, this error has been addressed. You can download the latest FME 2019.0 beta here: https://www.safe.com/support/support-resources/fme-downloads/beta

 

Hi Trent,

 

I downloaded the latest beta, tested it and get the same results.

 

I now know that my computer is blocked from sending emails so I don't expect the transformer to work, but the error message is the same for me in FME 2019.

 

 

Here is the log :

 

2018-09-24 14:05:35| 0.7| 0.4|WARN |Python Exception <UnicodeDecodeError>: 'ascii' codec can't decode byte 0xe9 in position 43: ordinal not in range(128)

 


2018-09-24 14:05:35| 0.7| 0.0|WARN |Traceback (most recent call last):

 


File "Emailer\\Emailer.py", line 128, in input

 


UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 43: ordinal not in range(128)

 


2018-09-24 14:05:35| 0.7| 0.0|ERROR |Error encountered while calling method `input'

 


2018-09-24 14:05:35| 0.7| 0.0|FATAL |Emailer_CALLER(PythonFactory): PythonFactory failed to process feature

 


2018-09-24 14:05:35| 0.7| 0.0|ERROR |A fatal error has occurred. Check the logfile above for details

 

 

Thanks

 

Phil

 

 


Reply