Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"Internal Server Error" on Programs page after update
#11
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
Reply
#12
(2020 Dec 05, 05:49 PM)tvwebguy Wrote: 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
OK, now we are getting somewhere.
Let me look into this.
<p><br></p>
Reply
#13
Try running SIP with:
Code:
python3 sip.py
<p><br></p>
Reply
#14
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.
<p><br></p>
Reply
#15
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.
<p><br></p>
Reply
#16
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.
Reply
#17
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.
<p><br></p>
Reply
#18
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
Reply
#19
(2020 Dec 06, 04:52 PM)tvwebguy Wrote: 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

I should ask what hardware you are running on.

what version of the OS are you running?
Code:
lsb_release -a
or
Code:
cat /etc/*-release


Have you upgraded the OS lately?

Code:
sudo apt update
sudo apt full-upgrade
<p><br></p>
Reply
#20
I'm running Buster. I did update the system, but, I'll do it again just to be sure.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)