Maximo Open Forum

 View Only

 Using special characters in automation script

  • Maximo Application Suite
Rana Ahmed's profile image
Rana Ahmed posted 07-19-2024 16:59

Using a special character in an automation script throws an error

e.g. consider this script
a = "Jean-François"
print(a)

In automation script app when I click on Execute Script it gives the following. 

SyntaxError: Non-ASCII character in file '<iostream>', but no encoding declared; see http://www.python.org/peps/pep-0263.html for details

I believe it is happening because of this ç in the source code.

Is there any way to fix this issue?

Martin Fabra's profile image
Martin Fabra

Hi @Rana Ahmed

Try this: 

# -*- coding: utf-8 -*-
a = "Jean-François"
print(a)

Regards!

Rana Ahmed's profile image
Rana Ahmed

Hi Martin Fabra,
This threw an error in compiling in automation script app.

Martin Fabra's profile image
Martin Fabra

Hi! 

If you can, send me more information:
Is it an object script? of attribute? any condition? If you give me more information, I can reproduce it to help you find the solution you are looking for.

Regards!