Why does the flask script start twice? #28

Closed
opened 2018-10-10 11:57:46 +02:00 by mishi · 3 comments
mishi commented 2018-10-10 11:57:46 +02:00 (Migrated from git.mattzz.de)
pi@weremonkey:~/halloween $ ./pumpkin.py
INFO: Good day. This is weremonkey coming online.
INFO: DB: getting name: db_schema_version, value: 6
INFO: Current db schema is 6
INFO: DB: setting name: is_roaring, value: 0
INFO: DB: setting name: is_laughing, value: 0
INFO: DB: setting name: 1, value: 1
INFO: DB: setting name: 2, value: 1
INFO: DB: setting name: 3, value: 1
INFO: DB: setting name: 4, value: 1
 * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
 * Restarting with stat
INFO: Good day. This is weremonkey coming online.
INFO: DB: getting name: db_schema_version, value: 6
INFO: Current db schema is 6
INFO: DB: setting name: is_roaring, value: 0
INFO: DB: setting name: is_laughing, value: 0
INFO: DB: setting name: 1, value: 1
INFO: DB: setting name: 2, value: 1
INFO: DB: setting name: 3, value: 1
INFO: DB: setting name: 4, value: 1
 * Debugger is active!
 * Debugger pin code: 119-254-400
``` pi@weremonkey:~/halloween $ ./pumpkin.py INFO: Good day. This is weremonkey coming online. INFO: DB: getting name: db_schema_version, value: 6 INFO: Current db schema is 6 INFO: DB: setting name: is_roaring, value: 0 INFO: DB: setting name: is_laughing, value: 0 INFO: DB: setting name: 1, value: 1 INFO: DB: setting name: 2, value: 1 INFO: DB: setting name: 3, value: 1 INFO: DB: setting name: 4, value: 1 * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit) * Restarting with stat INFO: Good day. This is weremonkey coming online. INFO: DB: getting name: db_schema_version, value: 6 INFO: Current db schema is 6 INFO: DB: setting name: is_roaring, value: 0 INFO: DB: setting name: is_laughing, value: 0 INFO: DB: setting name: 1, value: 1 INFO: DB: setting name: 2, value: 1 INFO: DB: setting name: 3, value: 1 INFO: DB: setting name: 4, value: 1 * Debugger is active! * Debugger pin code: 119-254-400 ```
mattzz commented 2018-10-10 15:42:31 +02:00 (Migrated from git.mattzz.de)

I also stumbled across this issue. I found a couple of posts but nothing conclusive yet.

One of the best answers was to disable the automatic reloader [1].

The simplest thing to do here would be to add use_reloader=False to your call to app.run - that is: 

app.run(debug=True, use_reloader=False)

[1] https://stackoverflow.com/questions/9449101/how-to-stop-flask-from-initialising-twice-in-debug-mode

I also stumbled across this issue. I found a couple of posts but nothing conclusive yet. One of the best answers was to disable the automatic reloader [1]. ``` The simplest thing to do here would be to add use_reloader=False to your call to app.run - that is: app.run(debug=True, use_reloader=False) ``` [1] https://stackoverflow.com/questions/9449101/how-to-stop-flask-from-initialising-twice-in-debug-mode
mishi commented 2018-10-10 19:43:07 +02:00 (Migrated from git.mattzz.de)

Ok, no biggie.

Ok, no biggie.
mishi commented 2018-10-30 00:37:39 +01:00 (Migrated from git.mattzz.de)

Let's not worry about this anymore

Let's not worry about this anymore
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mattzz/halloween#28
No description provided.