2021-01-01, 05:54 AM
Any help on this would be appreciated. It appears NextPVR is failing to run scripts that are set to be run by python 3.
I have epg set to update every hour at 15 minutes past the hour, like so "00:15 01:15 02:15" etc.
It has been working great since installing Nextpvr, but recently it stopped working. I've been modifying my epg grabbing scripts, although they run fine if I manually run the .bat file.
This is my UpdateEPG.bat in "C:\Users\Public\NPVR-data\scripts"
The script it calls is here:
I'm unable to attach my logs "Your allocated attachment usage quote in NaN MB", but did find this in the nrecord.log. First interesting thing is, it appears to run at 45 after the hour instead of 15 after. Second thing is it says it can't find python 3 although of course I have python 3 installed (and as I mentioned I can run the script outside of nextpvr by just double clicking either of the UpdateEPG.bat files).
I have epg set to update every hour at 15 minutes past the hour, like so "00:15 01:15 02:15" etc.
It has been working great since installing Nextpvr, but recently it stopped working. I've been modifying my epg grabbing scripts, although they run fine if I manually run the .bat file.
This is my UpdateEPG.bat in "C:\Users\Public\NPVR-data\scripts"
Code:
@Echo off
GoTo :BEGIN
=================================================================================================
UpdateEPG.bat
Run when the EPG update begins at the time specified in Settings. Commonly used to update an
XMLTV file used as the EPG source. No arguments.
-------------------------------------------------------------------------------------------------
Arguments:
NONE
-------------------------------------------------------------------------------------------------
Modification History
Date By Description
------ ---------- -------------------------------------------------------------------------------
103015 JavaWiz Initial Template
=================================================================================================
:BEGIN
SETLOCAL
Set SCRIPTNAME=%0
Set BASEDIR=c:\Users\Public\NPVR-data
Set LOGFILE=%BASEDIR%\Logs\BatchProcessing.log
:: Roll logs once per day when the EPG update is triggered
Call :ROLL_LOGS
Call :LOGMSG EPG Update triggered.
::Place your system specific commands here...
:: Ex. code below rotates the log file when this script is run
call "E:\Scripts\UpdateEPG.bat"
GoTo :EXITJOB
--------------------------------------------------------------
:ROLL_LOGS
Call :LOGMSG Logs rolled.
If EXIST %LOGFILE%.4 COPY %LOGFILE%.4 %LOGFILE%.5 > nul
If EXIST %LOGFILE%.3 COPY %LOGFILE%.3 %LOGFILE%.4 > nul
If EXIST %LOGFILE%.2 COPY %LOGFILE%.2 %LOGFILE%.3 > nul
If EXIST %LOGFILE%.1 COPY %LOGFILE%.1 %LOGFILE%.2 > nul
If EXIST %LOGFILE% MOVE %LOGFILE% %LOGFILE%.1 > nul
GoTo :EOF
--------------------------------------------------------------
:LOGMSG
echo %*
echo %date:~4% %time% [%SCRIPTNAME%] %* >> %LOGFILE%
Goto :EOF
--------------------------------------------------------------
:EXITJOB
Exit /b
The script it calls is here:
Code:
@Echo off
GoTo :BEGIN
=================================================================================================
UpdateEPG.bat
Run when called by another script, or execute directly.
-------------------------------------------------------------------------------------------------
Arguments:
1.
-------------------------------------------------------------------------------------------------
Modification History
Date By Description
------ ---------- -------------------------------------------------------------------------------
063020 Archer Initial Version
121520 Archer Split into multiple bat files
=================================================================================================
:BEGIN
:arguments
:get_bat_directory
set directory=%~dp0
set directory=%directory:~0,-1%
cd /d %directory%
:m3u
:dizqueTVm3u
py -3 ".\ReenigneArcher\web2tv\m3u_modder.py" --inFile "http://localhost:8000/api/channels.m3u" --outFile "E:\AppData\web2tv\dizqueTV.m3u" --protocol "httpstream://"
CLS
:nextpvr
py -3 ".\ReenigneArcher\web2tv\nextpvr.py" --file "E:\AppData\web2tv\nextpvr.m3u" --startNumber 0 --keepNumber --pin 1234 --streamlink
CLS
:plutotv
REM xml and m3u
py -3 ".\ReenigneArcher\web2tv\plutotv.py" --epgHours 12 --offset -0000 --timezone -0500 --xmlFile "E:\AppData\web2tv\plutotv.xml" --xml --m3uFile "E:\AppData\web2tv\plutotv.m3u" --m3u --prefix "pluto.tv: " --startNumber 2000 --keepNumber --streamlink
CLS
:plex
REM xml and m3u
py -3 ".\ReenigneArcher\web2tv\plex.py" --token 1234 --offset -0500 --days 21 --pastdays 1 --xmlFile "E:\AppData\web2tv\plextv.xml" --xml --m3uFile "E:\AppData\web2tv\plextv.m3u" --m3u --prefix "plex.tv: " --startNumber 3000 --keepNumber --streamlink
CLS
:zap2it
call "UpdateEPG_zap2it.bat" 1234@gmail.com 1234
CLS
:xteve
call "E:\Scripts\UpdateEPG_xteve.bat" admin 1234
CLS
:plexDVR
py -3 ".\ReenigneArcher\web2tv\update_plexDVR.py" --token 1234
CLS
--------------------------------------------------------------
:eof
CLS
exit /b 0
I'm unable to attach my logs "Your allocated attachment usage quote in NaN MB", but did find this in the nrecord.log. First interesting thing is, it appears to run at 45 after the hour instead of 15 after. Second thing is it says it can't find python 3 although of course I have python 3 installed (and as I mentioned I can run the script outside of nextpvr by just double clicking either of the UpdateEPG.bat files).
Code:
2020-12-31 17:46:43.643 [DEBUG][10] Update EPG...
2020-12-31 17:46:43.644 [INFO][49] About to update EPG
2020-12-31 17:46:43.644 [DEBUG][49] About to run C:\Users\Public\NPVR-data\scripts\UpdateEPG.bat
2020-12-31 17:46:43.645 [DEBUG][49] Starting: C:\Users\Public\NPVR-data\scripts\UpdateEPG.bat
2020-12-31 17:46:43.702 [DEBUG][46] > Logs rolled.
2020-12-31 17:46:43.747 [DEBUG][46] > EPG Update triggered.
2020-12-31 17:46:43.781 [DEBUG][32] > Installed Pythons found by py Launcher for Windows *
2020-12-31 17:46:43.781 [DEBUG][32] >
2020-12-31 17:46:43.781 [DEBUG][46] > Python 3 not found!
2020-12-31 17:46:43.781 [DEBUG][32] > Requested Python version (3) not installed, use -0 for available pythons
2020-12-31 17:46:43.781 [DEBUG][46] >
2020-12-31 17:46:43.803 [DEBUG][50] > Installed Pythons found by py Launcher for Windows *
2020-12-31 17:46:43.804 [DEBUG][13] > -2.7-64Python 3 not found!
2020-12-31 17:46:43.804 [DEBUG][50] >
2020-12-31 17:46:43.804 [DEBUG][13] >
2020-12-31 17:46:43.804 [DEBUG][50] > Requested Python version (3) not installed, use -0 for available pythons
2020-12-31 17:46:43.826 [DEBUG][50] > Installed Pythons found by py Launcher for Windows *
2020-12-31 17:46:43.826 [DEBUG][50] >
2020-12-31 17:46:43.826 [DEBUG][51] > -2.7-64Python 3 not found!
2020-12-31 17:46:43.826 [DEBUG][50] > Requested Python version (3) not installed, use -0 for available pythons
2020-12-31 17:46:43.826 [DEBUG][51] >
2020-12-31 17:46:43.850 [DEBUG][50] > Installed Pythons found by py Launcher for Windows *
2020-12-31 17:46:43.850 [DEBUG][50] >
2020-12-31 17:46:43.850 [DEBUG][13] > -2.7-64Python 3 not found!
2020-12-31 17:46:43.850 [DEBUG][50] > Requested Python version (3) not installed, use -0 for available pythons
Code:
C:\>py -3 -V
Python 3.8.5