-
Notifications
You must be signed in to change notification settings - Fork 118
Executable (after subtitle grabbing) not working #355
Comments
I'm sorry, finally got it working with python with: c:\Python27\python.exe c:\bin\notif.py %(subtitle_filename)s Thank you again! |
For the others who encounter this: What was the content of your bat and py files? It may have been a permissions or more likely, a PATH issue that caused this. |
Here's the content of mine: |
Great, that may help some users. Any reason why you used urllib/httplib and not requests? |
No special reason at all. I got the template searching on web and since it worked well I didn't look for any improved version. |
Hi! I'm getting the same problem. Even when adding c:\Python27\python.exe to the line... Any help appriciated! |
@zucram I'll need DEBUG logs in order to help you there. |
Here is what the LOGS say, let me know if you need the entire log @pannal ...
|
Can you post the contents of mytest.py? |
Here it is @pannal. I've obviously removed some of the more sensitive stuff from the code with ****. It works if i open a command prompt and run python mytest.py. I'm on a windows machine.
|
@zucram you don't handle any parameters in there, is that intended? |
@pannal i just wanted the email to work firstly and then handle the input parameters so that the body contains the movie and the subtitle found and such. |
@zucram interesting. I've pushed an updated version to the develop-2.5 branch, which tries to log the error and output streams of the called executable to further investigate this. Could you install the develop-2.5 branch? (Restart PMS afterwards) |
Hmm no. You're not running the latest develop-2.5 branch. |
@pannal Hmm.. seem to have a problem then. I tried to follow the instructions but the path to sub-zero was wrong (seemed to be an osx path and i'm on windows) but i thought i unpacked develop-2.5 but the output is the same... Info.plist says that i'm on develop branch. |
@pannal Managed to get it working. Only thing i can find in the logs now is
|
@pannal any update on this? |
@zucram please update to the latest develop branch again, I've improved the executable detection logic. |
Hey @pannal not sure i got it to work correctly but here are the latest logs...
|
@zucram that's unrelated to the original issue. Can we sort the executable thing out first? Also please attach the full log. |
@pannal Here is the full log
|
@zucram this is still a different issue. Can you try refreshing the item that caused the notification executable error in the first place and see whether the issue still exists? For Edit: Also, to post your log zip, please follow this. |
@pannal Sorry, i've fixed the network error now. Problem now is that when i force-find a subtitle it doesn't trigger the mytest.py error in the logs anymore. Not sure how to fix this. |
Here you go, the logs seem better now! @pannal |
@zucram yep I had a typo. Please update to the current develop version and do that again, and post the log zip. |
Here's the new ones @pannal |
OK, now we've got a proper error:
I've updated the branch again and am setting a "proper" working directory now (the folder of the executable). If that doesn't fix it, there's something else wrong, probably with your python setup? |
Still not working. Here are the latest logs.. @pannal |
@zucram do you by any chance have Python 3 installed as well? Does the script run on its own from the command line? Edit: Can you add this at the top of your script:
|
@pannal The script runs in python 2.7 from both cmd line and double clicking it... |
OK and when the script is executed by SZ? (Leave the os environ print in there please) |
Not sure how i check that, here are the logs when os.environ is still there and i do a force-find on an episode... @pannal |
@zucram create a dummy python file with just the os.environ stuff inside and use that as notification executable. Then I might get some insight. |
@pannal Here is the logs for that.. |
OK, I guess this is the issue: I've pushed an update that unsets the Please report back if this fixes the issue. It might, but it also might not. |
@pannal That seems to have fixed it! Thanks a lot. |
|
Hello there, first of all thank you for this must have addon for Plex. I'm trying to get a notification whenever a subtitle is downloaded via Pushover. I already did all steps to use pushover from three different methods and all of them are working standalone but not being invoked by Sub-Zero:
1 - Via a batch file, called notifier.bat.
2 - Python script, called notif.py
3 - Shell script that I can invoke right from cmd or powershell using bash from WLS "bash -c "sh ~/notif.sh"
I'm getting different errors using any method and I'm not sure what exactly I'm doing wrong.
For the first one I inserted on the "Call this executable...." box the full path:
c:\bin\notifier.bat
and got the following error:
2017-10-03 21:53:22,035 (26b8) : ERROR (logkit:22) - Calling C:\bin\notifier.bat failed: Traceback (most recent call last):
File "C:\Users\sputnik\AppData\Local\Plex Media Server\Plug-ins\Sub-Zero.bundle\Contents\Code\support\helpers.py", line 308, in notify_executable
stderr=subprocess.STDOUT, shell=True, env=env)
File "C:\Program Files (x86)\Plex\Plex Media Server\python27.zip\subprocess.py", line 574, in check_output
raise CalledProcessError(retcode, cmd, output=output)
CalledProcessError: Command 'C:\bin\notifier.bat' returned non-zero exit status 1
For the third method I got:
2017-10-04 13:33:09,219 (d8) : ERROR (logkit:22) - Notify executable not existing or not executable: c:\Windows\System32\bash.exe
And for the notif.py it not even showed on logs, it's possible that I didn't waited to long before switching to bash.
Could you please detail what it isn't right on this setup. Executing any of this methods by myself it works as expected.
Thank you.
The text was updated successfully, but these errors were encountered: