"Internal Server Error" on Programs page after update - Printable Version +- SIP (https://nosack.com/sipforum) +-- Forum: SIP (Sustainable Irrigation Platform) (https://nosack.com/sipforum/forumdisplay.php?fid=1) +--- Forum: Report a problem (https://nosack.com/sipforum/forumdisplay.php?fid=9) +--- Thread: "Internal Server Error" on Programs page after update (/showthread.php?tid=237) |
RE: "Internal Server Error" on Programs page after update - tvwebguy - 2020 Dec 05 Traceback (most recent call last): File "/home/pi/SIP/web/application.py", line 290, in process return self.handle() File "/home/pi/SIP/web/application.py", line 281, in handle return self._delegate(fn, self.fvars, args) File "/home/pi/SIP/web/application.py", line 531, in _delegate return handle_class(cls) File "/home/pi/SIP/web/application.py", line 509, in handle_class return tocall(*args) File "/home/pi/SIP/webpages.py", line 497, in GET return template_render.programs() File "/home/pi/SIP/web/template.py", line 1140, in template return self._base(t(*a, **kw)) File "/home/pi/SIP/web/template.py", line 987, in __call__ return BaseTemplate.__call__(self, *a, **kw) File "/home/pi/SIP/web/template.py", line 898, in __call__ return self.t(*a, **kw) File "templates/programs.html", line 138, in __template__ $for s in range(8): IndexError: list index out of range RE: "Internal Server Error" on Programs page after update - dan - 2020 Dec 05 (2020 Dec 05, 05:49 PM)tvwebguy Wrote: Traceback (most recent call last):OK, now we are getting somewhere. Let me look into this. RE: "Internal Server Error" on Programs page after update - dan - 2020 Dec 05 Try running SIP with: Code: python3 sip.py RE: "Internal Server Error" on Programs page after update - dan - 2020 Dec 05 So far I don't see a problem with the python code. Could you try renaming the SIP/data/programData.json file to a temporary name like programData.json-hold Then see if you can access the programs tab. If not, rename SIP/data/sd.json to a temporary name. and try accessing the programs tab. RE: "Internal Server Error" on Programs page after update - dan - 2020 Dec 05 You may be able to open the program editing page for the first program with: http://192.168.254.145:8081/mp?pid=0 Let me know of that works. RE: "Internal Server Error" on Programs page after update - tvwebguy - 2020 Dec 06 Messge from Signaling plugin!: Just an example! plugins loaded: mobile_app plugin_manager signaling_examples system_update Starting timing loop zones changed A new day has started. [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] http://:::8081/ Traceback (most recent call last): File "/home/pi/SIP/web/application.py", line 290, in process return self.handle() File "/home/pi/SIP/web/application.py", line 281, in handle return self._delegate(fn, self.fvars, args) File "/home/pi/SIP/web/application.py", line 531, in _delegate return handle_class(cls) File "/home/pi/SIP/web/application.py", line 509, in handle_class return tocall(*args) File "/home/pi/SIP/webpages.py", line 497, in GET return template_render.programs() File "/home/pi/SIP/web/template.py", line 1140, in template return self._base(t(*a, **kw)) File "/home/pi/SIP/web/template.py", line 987, in __call__ return BaseTemplate.__call__(self, *a, **kw) File "/home/pi/SIP/web/template.py", line 898, in __call__ return self.t(*a, **kw) File "templates/programs.html", line 138, in __template__ $for s in range(8): IndexError: list index out of range ::ffff:192.168.254.62:53258 - - [05/Dec/2020 21:36:45] "HTTP/1.1 GET /vp" - 500 Internal Server Error ::ffff:192.168.254.62:53258 - - [05/Dec/2020 21:36:45] "HTTP/1.1 GET /favicon.ico" - 303 See Other ::ffff:192.168.254.62:53258 - - [05/Dec/2020 21:36:46] "HTTP/1.1 GET /" - 200 OK Traceback (most recent call last): I ran it with python3 with no luck. I tried the http://192.168.254.145:8081/mp?pid=0 with no luck. Trying the renaming now. No joy with the latest suggestions. I'm really at a loss now. RE: "Internal Server Error" on Programs page after update - dan - 2020 Dec 06 This is indeed puzzling. However I am determined to get to the bottom of this and fix any problem that may be causing it. Just to be sure of what we know so far: 1. You are getting a "list index out of range" error when you try to open the Programs page. 2. SIP 4 is designed to run under both Python2 and Python3. In Python3 the "range" statement has changed but you are getting the same error under Python3 so that is not a factor. ("$for s in range(8):") 3. Trying to open "http://192.168.254.145:8081/mp?pid=0" also fails. This is trying to open a different page but with some similar code. Question: do you get the same error message when you try the above? Question: Can you open the "Stations" page and the "Run once" pages? They also have similar code to what is causing the error. If not, are you getting the same error? 4. Renaming the programData.json file and the "sd.json" files in the SIP data directory does not eliminate the problem. This means that there is not a setting that SIP is not handling properly. 5. you are running a fresh copy of SIP so there is not a problem from the update process. 6. You cleared the browser cache and tried a different browser so there is not a problem from some old code being used by the browser. Question: Do you have any plugins installed? I appreciate you patience and help in trying to diagnose the problem. RE: "Internal Server Error" on Programs page after update - tvwebguy - 2020 Dec 06 Hi Dan. Really appreciate your help. 1. Yes. 2. Yes 3. Yes I do get the same error message when trying both versions of the Programs page. I can open and use the Run Once and Stations pages. 4. Yes 5. Yes 6. Yes Looks like I have the mobile app enabled and signaling apps and system updates. Thanks again for your help! Ron RE: "Internal Server Error" on Programs page after update - dan - 2020 Dec 06 (2020 Dec 06, 04:52 PM)tvwebguy Wrote: Hi Dan. Really appreciate your help. I should ask what hardware you are running on. what version of the OS are you running? Code: lsb_release -a Code: cat /etc/*-release Have you upgraded the OS lately? Code: sudo apt update RE: "Internal Server Error" on Programs page after update - tvwebguy - 2020 Dec 06 I'm running Buster. I did update the system, but, I'll do it again just to be sure. |