Closed cjkrolak closed 10 months ago
debug flag is read in debug mode is never set.
SHT31 sensor Flask server
running on Python version 3.12
raspberry pi environment is detected
DEBUG: parent_keys = ['argv']
DEBUG: valid_sflags=['-d']
Flask debug mode=False
all of these command line arguments returned False for the debug flag:
-d=True
-d=true
-d 1
-d True
-dtrue
debug input parameter is being read in as None (regardless of the input value), which always translates to False.
-d 1 -> None -> False
-d=1 -> None -> False
--debug=1 -> None -> False
--debug=true -> None -> False
--debug=True -> None -> False
defect: util.log_msg(, mode=CONSOLE) does not print to Flask server, need to also output to ERROR
root cause was type checking not working for bool vs. lambda. Lambda is required in user inputs to correctly get bool input values to work. Exception added to protect against this. Issue #747 found during this investigation as well, hiding the coding issue.
can't get sht31_flask_server debug mode to start, tried 1, True, -d=True, etc.