Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

EG startup error = Error compiling script ?!

If you have a question or need help, this is the place to be.
Post Reply
skribb
Experienced User
Posts: 228
Joined: Thu Feb 12, 2015 7:22 pm
Location: Win7 64bit

EG startup error = Error compiling script ?!

Post by skribb »

EG has gone completely haywire. This error seem to have popped up just when daylight savings kicked in last night. Don't know if it's related to DST but yeah.

My EG seems to work normally apart from SchedulGhost which, if I enable any of my schedules, will loop indefinitely several times per second.

This error message comes up when i start EG:

01:18:44 ---> Welcome to EventGhost <---
01:18:44 Error compiling script.
01:18:44 Traceback (most recent call last) (1722):
01:18:44 File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionItem.py", line 121, in SetArguments
01:18:44 self.compiled = self.executable.Compile(*args)
01:18:44 File "C:\Program Files (x86)\EventGhost\plugins\EventGhost\PythonScript.py", line 71, in __init__
01:18:44 self.PrintTraceback()
01:18:44 File "C:\Program Files (x86)\EventGhost\plugins\EventGhost\PythonScript.py", line 97, in PrintTraceback
01:18:44 treeItem.PrintError("Traceback (most recent call last):")
01:18:44 AttributeError: 'NoneType' object has no attribute 'PrintError'
Automation is life.

Win7 64bit
EG: v0.5.0-rc4
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: EG startup error = Error compiling script ?!

Post by kgschlosser »

this is going to be a real pain for you to find. but you are going to have to go through all of your python script actions.. and copy and paste the contents of the script into something like notepad.. then delete the script.. and restart EG and see if the compilation error comes back . if it doesn't then that is the script that is generating the problem.. It is almost always caused by a syntax error in the script. If you have an IDE that has any kind of error reporting abilities.. something like PyCharm then copy and paste the code into the IDE and see if the IDE reports an error.


I have completely forgotten about how EG handles errors from python scripts being an issue.. I will do up a better way to handle the problem and get it into the next release of EG.
If you like the work I have been doing then feel free to Image
skribb
Experienced User
Posts: 228
Joined: Thu Feb 12, 2015 7:22 pm
Location: Win7 64bit

Re: EG startup error = Error compiling script ?!

Post by skribb »

kgschlosser wrote:this is going to be a real pain for you to find. but you are going to have to go through all of your python script actions.. and copy and paste the contents of the script into something like notepad.. then delete the script.. and restart EG and see if the compilation error comes back . if it doesn't then that is the script that is generating the problem.. It is almost always caused by a syntax error in the script. If you have an IDE that has any kind of error reporting abilities.. something like PyCharm then copy and paste the code into the IDE and see if the IDE reports an error.


I have completely forgotten about how EG handles errors from python scripts being an issue.. I will do up a better way to handle the problem and get it into the next release of EG.
Thanks!

yes I did suspect a syntax error but I haven't made any new scripts... I just rebooted EG and there it was. :shock: :shock: :shock:

EDIT: since the error msg appears as the first item in the log, could it mean that the error lies in any of my autostart actions?
Automation is life.

Win7 64bit
EG: v0.5.0-rc4
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: EG startup error = Error compiling script ?!

Post by kgschlosser »

it's not an autostart item. EG when it first starts when it loads the actions from you save file. if the action is a Python Script it will compile it. this is to help boost the speed of a running macro if it contains a python script.

you may not have had to add a new script.. you could have simply opened it up and accidentally pressed a key. and then closed it not realising you did.. then when and did somehting else that would have required you to save EG..

all I know is that is what the error is from. Usually it's from something like a missing " or : something really dumb but takes forever to locate.
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: EG startup error = Error compiling script ?!

Post by kgschlosser »

but seeing as how you are also having a problem with schedulghost as well. I would investigate any macros you might have that use it and have python scripts in them.. it could be where the issues lie.
If you like the work I have been doing then feel free to Image
skribb
Experienced User
Posts: 228
Joined: Thu Feb 12, 2015 7:22 pm
Location: Win7 64bit

Re: EG startup error = Error compiling script ?!

Post by skribb »

kgschlosser wrote:but seeing as how you are also having a problem with schedulghost as well. I would investigate any macros you might have that use it and have python scripts in them.. it could be where the issues lie.

Omg it was an indentation error in an if statement.


I did a tiny change to a script about 4 days ago, and I had no errors on saving the script. Usually if statements show indentation errors right away. :roll:


I have yet to re-enable SchedulGhost tho.
Automation is life.

Win7 64bit
EG: v0.5.0-rc4
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: EG startup error = Error compiling script ?!

Post by kgschlosser »

Well that is great you found it.. if you have a couple hundred Python scripts like I do it can be a real headache.

But what I have done is this.. there are 2 files I have modified that will fix the Traceback problem because you are not supposed to be getting an error from an error, LOL. so I have that fixed. but what I also did was if a Python script has an error upon compiling it will select that tree Item. so now you know which one has the problem.. instead of trying to find it... I am going to add the fix and the selection of the tree item into the next release of EG. this has always been a real nuisance. I just forgot about it until you brought it up again. I had fixed it once before but it wasn't a 2 line fix.. so time and experience pays off.

let me know if you want the 2 files and i will post them
If you like the work I have been doing then feel free to Image
User avatar
yokel22
Experienced User
Posts: 265
Joined: Thu Feb 05, 2015 5:56 pm
Location: U.S. - Kansas city

Re: EG startup error = Error compiling script ?!

Post by yokel22 »

kgschlosser, Thank you. This is an excellent addition to EG :!: . Having to sort through your tree to find these sorts of errors can be a serious headache.
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: EG startup error = Error compiling script ?!

Post by kgschlosser »

no worries m8, it has all be coded up and it should be in the next release of EG.
If you like the work I have been doing then feel free to Image
skribb
Experienced User
Posts: 228
Joined: Thu Feb 12, 2015 7:22 pm
Location: Win7 64bit

Re: EG startup error = Error compiling script ?!

Post by skribb »

kgschlosser wrote:no worries m8, it has all be coded up and it should be in the next release of EG.
Well my fire has been put out, so no worries as of now. However I would like to know when the next EG is ETA?
Automation is life.

Win7 64bit
EG: v0.5.0-rc4
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: EG startup error = Error compiling script ?!

Post by kgschlosser »

i Just started a conversation about capping 0.5 beta. and only doing bug fixes and no new additions. So we can get a fully stable release done.. I think more conversation will take place with it this weekend. I am thinking there might be one more beta then a full release. I am not sure tho. everything seems to be running very well so it may be a full release next time around. not sure tho. I will keep you informed of what's going on.

have you tried schedulghost?
If you like the work I have been doing then feel free to Image
Post Reply