Script error from what Trigger or Schedule?: Mention in Log

Posted on
Tue Aug 10, 2021 8:16 am
McJohn offline
User avatar
Posts: 631
Joined: Dec 18, 2012
Location: The Netherlands

Script error from what Trigger or Schedule?: Mention in Log

We got this error after the update from 7.5 tot 2021.1.1:

Script Error BatteryLevelDevice.py: [Errno 2] No such file or directory: '/Library/Application Support/Perceptive Automation/Indigo 2021.1/IndigoWebServer/images/controls/static/bat.png'

Is it possible to mention into the log which Trigger or Schedule causes this error?
(that saves a lot of searching in hundreds of scripts)

Thanks,

John

Posted on
Tue Aug 10, 2021 8:43 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Script error from what Trigger or Schedule?: Mention in

It does say the name of the script, so it must be an external you're calling by name.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Tue Aug 10, 2021 8:45 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Script error from what Trigger or Schedule?: Mention in

And I'm pretty sure that Matt & Jay have addressed this before, but as I recall it's not currently possible to do that, because the "execute script" operation is queued up by the trigger or schedule, and the error doesn't happen until later, at which point there's no record of what put the script operation in the queue. So adding that info would require changing the way the queue works. Possible, but not simple.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed Aug 11, 2021 1:04 am
McJohn offline
User avatar
Posts: 631
Joined: Dec 18, 2012
Location: The Netherlands

Re: Script error from what Trigger or Schedule?: Mention in

Thanks for the quick response. It's indeed an external script ((good eyes Joe!),
But also when it’s embedded in a Schedule or Trigger (and we have hundreds), the name isn’t mentioned into the log.

Script Error embedded script: [Errno 2] No such file or directory:

But if it can't, then it can't. :)

PS: we got this error because the name of the “IndigoWebServer” directory was suddenly changed into “Web Assets”.

All the best,

John

Posted on
Wed Aug 11, 2021 6:35 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Script error from what Trigger or Schedule?: Mention in

I know this is somewhat of a lame/hack answer (improving the logging is definitely on my ToDo list), but sometimes it is helpful to open the database XML file in an editor and search to try to find what element is using another one. In this case searching on BatteryLevelDevice.py might (not positive!) show you the Triggers / Schedules / etc. that are using it. You'll have to look for a nearby <Name> tag to find it.

Image

Posted on
Thu Aug 12, 2021 12:15 am
McJohn offline
User avatar
Posts: 631
Joined: Dec 18, 2012
Location: The Netherlands

Re: Script error from what Trigger or Schedule?: Mention in

Thanks for your time and the hint!

Posted on
Thu Aug 12, 2021 8:18 am
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Script error from what Trigger or Schedule?: Mention in

matt (support) wrote:
I know this is somewhat of a lame/hack answer (improving the logging is definitely on my ToDo list), but sometimes it is helpful to open the database XML file in an editor and search to try to find what element is using another one. In this case searching on BatteryLevelDevice.py might (not positive!) show you the Triggers / Schedules / etc. that are using it. You'll have to look for a nearby <Name> tag to find it.

Except... unless I am really missing something, linked scripts are hashed or encrypted...
Code: Select all
<ScriptLink2 type="string">Ym9va7ADAAAAAAQQMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0A
IAAA.... ....AAAACA8AAA0AEAAAAAAAA=</ScriptLink2>
<ScriptUseLink type="bool">true</ScriptUseLink>
Embedded scripts fare somewhat better. But, since they don'e have names, you have to look for something unique in the actual code. But, since the error message may not give that hint. it will require some creativity.

Also, I would offer an amendment to Matt's post. I would say make a copy of the db and look at that in an editor. Or else, use a read-only program like "less."

Posted on
Thu Aug 12, 2021 3:29 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Script error from what Trigger or Schedule?: Mention in

berkinet wrote:
Except... unless I am really missing something, linked scripts are hashed or encrypted...

Unfortunately, it looks like you are correct. There is a <ScriptLinkUIName> that is generated and would be useful, but it looks like we only pass that to the Indigo client and don't save it to the database file itself.

berkinet wrote:
Also, I would offer an amendment to Matt's post. I would say make a copy of the db and look at that in an editor. Or else, use a read-only program like "less."

Agreed!

Image

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 4 guests