Skip to content

Trying to restart through the UI can fail if state manager is completely borked #64

@markspolakovs

Description

@markspolakovs
2024-12-04 22:12:11,896  | [1113] [ERROR] Exception occurred while handling uri: 'http://studio1.ury.york.ac.uk:13500/restart'
Traceback (most recent call last):
  File "handle_request", line 100, in handle_request
  File "web_server.py", line 518, in restart
TypeError: 'NoneType' object is not subscriptable

BAPSicle/web_server.py

Lines 515 to 520 in 85f54d9

if request.args.get("confirm", '') != "true":
for i in range(server_state.get()["num_channels"]):
state = status(i)
if state["playing"]:
return render_template("restart-confirm.html", data=None)
server_state.update("running_state", "restarting")

Probably need some defensive checks there

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions