[Solved] Flask Error: RuntimeError: The session is unavailable because no secret key was set.

RuntimeError: The session is unavailable because no secret key was set. Set the secret_ key on the application to something unique and secret.

When we run the flash project on the Linux system, we encounter this error:

Solution:

Basically, on the Internet, you can set secret under the flash object app_ Key:
if it is added to the startup file of my project, I can successfully run the project under windows10. If it cannot succeed on the Linux system, it still reports an error

if it is added to the startup file of my project, it can run successfully on Linux

Read More: