Run a Python script after APLR Licence plate detection, just won't work as a service, OK in console.

bignose3

Young grasshopper
Joined
Jul 15, 2021
Messages
36
Reaction score
10
Location
UK
I cannot get my python script to run in Windows 10. tried for 2 days & driving me made as think must be something obvious.

AI LPR works fine, recognized & on the ALPR dashboard
Same trigger emails a picture

These 2 both Work in windows 10 console using TEST : pyw being the run time/no window option & just runs, service may not understand this so use py.exe with the same file but just py.
eGate.pyw
\\homecamspc\Users\Oem\Documents\eGate.pyw

works in cmd prompt
C:\windows\py.exe "c:\Users\Oem\Documents\eGate.py"
BUT error's in the TEST -
I think this might be the reason behind the problem, not finished the question & going to try a few things but posted in case someone knows straght off.


tried all variation above with the UNC instead
\\homecamspc\Users\Oem\Documents\eGate.pyw

1627220754539.png
1627222390738.png

1627220880147.png

1627220997254.png

Sorry incomplete but don't think can save as draft.
 

biggen

Known around here
Joined
May 6, 2018
Messages
2,572
Reaction score
2,855
I don't have any direct knowledge running python from BI but C:\windows\py.exe "c:\Users\Oem\Documents\eGate.py" looks funky. That runs like that in cmd, huh?
 
Last edited:

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,133
Reaction score
1,242
Location
SF Bay Area
This configuration of the Run action is working for me for a python script… ‘py.exe’ also works in the ‘File’ field.

1627228002849.jpeg

I posted earlier about a recent change to the ‘File’ field - it now accepts direct editing.

Here’s a screenshot of running the script in cmd.exe…

1627228673699.jpeg
 
Last edited:

bignose3

Young grasshopper
Joined
Jul 15, 2021
Messages
36
Reaction score
10
Location
UK
Many, Many, thanks

this works so simply & in service mode, have no idea why my single command line stuff did not, especially as it did under cmd but not going to think about that anymore.


1627234183269.png
 
Top