NextPVR Forums
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR v5 Support v
« Previous 1 2 3 4 5 … 19 Next »
EPG update not running

 
  • 0 Vote(s) - 0 Average
EPG update not running
ReenigneArcher
Offline

Junior Member

US
Posts: 4
Threads: 1
Joined: Jan 2021
#1
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"

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-64 Python 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-64 Python 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-64 Python 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
sub
Online

Administrator

NextPVR HQ, New Zealand
Posts: 96,682
Threads: 674
Joined: Nov 2003
#2
2021-01-01, 06:03 AM
NextPVR's recording service runs in the background, as the 'localsystem' user. I'm not that familiar with Python installs on Windows, but it sounds like maybe it's installed in your account, and not available from other accounts like local system.

So...either look into how to install Python for all users, or maybe change the NextPVR Service to run as your user account instead of local system
ReenigneArcher
Offline

Junior Member

US
Posts: 4
Threads: 1
Joined: Jan 2021
#3
2021-01-01, 06:36 AM
Thank you, that solved it!

A little tricky, but for anyone else who may see the same problem here is what I did.

Uninstall python 3.
Renamed %appdata%/Python/Python(version) to Python.old (contains installed modules)

Re-installed python 3 paying careful attention to all options (enable for all users in 3 places).
Run command prompt as admin... Re-installed required modules. (important to run as admin, otherwise modules get installed only for currently logged in user)
https://github.com/ReenigneArcher
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  EPG update fails in multi-tuner setup when only 1 tuner in use janoonk 6 68 2021-01-23, 08:28 PM
Last Post: janoonk
  suggestion: show status of "update EPG" janoonk 2 128 2020-12-26, 10:28 AM
Last Post: janoonk
  Comskip not running with NVPR alexfooty 17 397 2020-12-09, 09:58 PM
Last Post: alexfooty
  Recording service not running at recording time E.W. 2 154 2020-11-21, 07:37 PM
Last Post: baj1
  Update EPG for a channel group spe109 4 198 2020-10-26, 10:11 AM
Last Post: spe109
  Update the image metadata groenator 2 166 2020-10-03, 03:51 AM
Last Post: sub
  EPG update frequency SteveM 4 354 2020-09-25, 04:48 PM
Last Post: sub
  Advanced recordings not being automatically executed after 823 update - user error daneo 2 226 2020-09-10, 02:12 PM
Last Post: daneo
  Running stopping executable for each device. boukmandutty 2 273 2020-08-15, 01:38 AM
Last Post: mvallevand
  Stopcode blue screen when NextPVR Service is running SamM 8 732 2020-08-04, 01:56 AM
Last Post: sub

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode