Comments (3)
The reason for 403 error can be found here https://stackoverflow.com/questions/72795799/how-to-solve-403-error-with-flask-in-python
Mac OSX Monterey (12.x) currently uses ports 5000 and 7000 for its Control centre hence the issue.
Try running your app from port other than 5000 and 7000
So I tried several unused ports like 8000:
if __name__ == "__main__":
URL = "http://127.0.0.1:8000/"
webbrowser.open(URL)
print("app: socketio.run(app, port=8000, debug=True)")
socketio.run(app, port=8000, debug=True)
print("app: End __main__")
For each port I tried, a browser tab opened with This site canβt be reached; 127.0.0.1 refused to connect.
, then a few seconds later another browser tab opened with Not Found
.
And the server output showed that the server started two times:
$ python app.py
app: socketio.run(app, port=8000, debug=True)
* Restarting with stat
app: socketio.run(app, port=8000, debug=True)
* Debugger is active!
* Debugger PIN: 726-010-831
(57021) wsgi starting up on http://127.0.0.1:8000
(57021) accepted ('127.0.0.1', 61924)
(57021) accepted ('127.0.0.1', 61925)
127.0.0.1 - - [29/Jul/2023 20:10:05] "GET / HTTP/1.1" 404 355 0.001925
from lifefinances.
I will temporarily give up on MacOS, and try Windows 10 instead. Please see follow-up issue #143.
from lifefinances.
To free up flask's default port 5000 I disabled System Preferences > Sharing > AirPLay Receiver
on MacOS 12.6.7
These 2 cases continued to fail:
- with
__main__
section commented-out:
--app.py
terminated with no output - with comments removed from
__main__
, and default port 5000 specified:
-- 1st browser tab opened with ERR 403
-- 2nd browser tab opened with ERR 404
from lifefinances.
Related Issues (20)
- Use seeded random generation for testing
- Swap to np.arrays where appropriate
- Consider other optimization algorithms
- Stop simulation early if net worth hits 0 HOT 3
- Optimize children array creation
- Could you use a try/catch to quit the optimizer?
- Track start dates in the income profiles
- Switch allocation method to use Strategy Design Pattern
- Leaving old data in the database after transactions
- Improve aesthetics for the front end
- Enable CSRF
- Add data validation
- Rename income.Calculator
- Equity Target form option reset HOT 1
- Modularize simulation main loop
- Refactor income objects
- OO model econ_data_generator
- name 'webbrowser' is not defined HOT 2
- TypeError: cannot set 'is_timeout' attribute of immutable type 'TimeoutError' HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lifefinances.