Python Command error

Do you have questions about writing plugins or scripts in Python? Meet the coders here.
Post Reply
Don
Posts: 1
Joined: Wed Jan 13, 2016 11:20 am

Python Command error

Post by Don » Wed Jan 13, 2016 11:27 am

Hi Everyone

I use the following Python command

eg.TriggerEvent(eg.event.payload[0][8:25­], prefix = eg.event.suffix)

When I test it, I get the following error:

Error in Action: "eg.TriggerEvent(eg.event.payload[0][8:25­], prefix = eg.event.suffix)"
Traceback (most recent call last) (1710):
File "<string>", line 1
eg.TriggerEvent(eg.event.payload[0][8:25­], prefix = eg.event.suffix)
^
SyntaxError: invalid syntax

Any help to solve this will be much appreciated

Kind regards
Don

User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Python Command error

Post by Pako » Wed Jan 13, 2016 12:21 pm

Don wrote:eg.TriggerEvent(eg.event.payload[0][8:25­], prefix = eg.event.suffix)
This expression is correct.
However, there is a hidden character that causes problems:
Don wrote:Traceback (most recent call last) (1710):
File "<string>", line 1
eg.TriggerEvent(eg.event.payload[0][8:25­], prefix = eg.event.suffix)
^
SyntaxError: invalid syntax
Pako
You know flattr ? You can Image

Post Reply