Comments (10)
Thanks for reply~ I tried to read the code and found that it was possible that my flask app was not properly bound, but there is still no solution.Do you have any good solutions or alternatives to this?
from flask-monitoringdashboard.
Hi guys. I had this issue too, first of all, check this topic #435 and make sure you bind the MonitoringDashboard after registering your blueprints (or routes):
import flask_monitoringdashboard as dashboard
from flask import Flask
app = Flask("name")
@app.route("/test", methods = ['GET'])
def kk():
return {"ok": True}
dashboard.config.enable_logging=True
dashboard.bind(app)
app.run()
after that, the problem is still there but after 1 request it will be solved. actually, this problem is just for when there are no requests on the dashboard.
from flask-monitoringdashboard.
I guess in the future we could try to detect the two situations (bound too late, or no requests yet) programmatically and provide the user with a useful message instead of the crash! I'll makr this issue as helpwanted because I think it should not be too hard to implement for somebody that has a bit of time on their hands.
from flask-monitoringdashboard.
Can confirm that binding the dashboard after initializing all the routes fixes the issue, as per #435. It would probably be a good idea to mention this detail in the setup section of the README.
from flask-monitoringdashboard.
I also encountered the same problem. Have you solved it?
flask_monitoringdashboard-3.1.2
Windows 10
Python 3.9
When I visit http://127.0.0.1:5000/dashboard/overview, displays have been loaded and error, I have the correct configuration database (although no data in the database, but create a few tables)
[2023-11-24 23:04:07,210] ERROR in app: Exception on /dashboard/api/deploy_details [GET] Traceback (most recent call last): File "D:\anaconda\envs\qqbot\lib\site-packages\flask\app.py", line 2190, in wsgi_app response = self.full_dispatch_request() File "D:\anaconda\envs\qqbot\lib\site-packages\flask\app.py", line 1486, in full_dispatch_request rv = self.handle_user_exception(e) File "D:\anaconda\envs\qqbot\lib\site-packages\flask\app.py", line 1484, in full_dispatch_request rv = self.dispatch_request() File "D:\anaconda\envs\qqbot\lib\site-packages\flask\app.py", line 1469, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) File "D:\anaconda\envs\qqbot\lib\site-packages\flask_monitoringdashboard\core\auth.py", line 39, in wrapper return func(*args, **kwargs) File "D:\anaconda\envs\qqbot\lib\site-packages\flask_monitoringdashboard\views\deployment.py", line 21, in deploy_details datetime.datetime.fromtimestamp(details['first-request']) OSError: [Errno 22] Invalid argument
from flask-monitoringdashboard.
Hi, @cyx200902. Unofrtunately, I have not solved the issue yet.
from flask-monitoringdashboard.
from flask-monitoringdashboard.
Thanks for answering the question @amirhnir !
from flask-monitoringdashboard.
Thanks a lot for confirming @Cornul11 . Do you want to add the note to the Readme.md and send a PR with it? I'll be happy to merge it in!
from flask-monitoringdashboard.
Can confirm that binding the dashboard after initializing all the routes fixes the issue, as per #435. It would probably be a good idea to mention this detail in the setup section of the README.
Its a good idea but technically It doesn't solve the problem because even after this, the issue persists until the first request is received
from flask-monitoringdashboard.
Related Issues (20)
- Flask-MonitoringDashboard not working at all HOT 2
- IP Address Incorrect when behind Load Balancer
- Jinja2 version mismatch with flask2.0 HOT 10
- Is sorting by column broken again?
- Status code incorrectly logged HOT 3
- Installing this dashboard breaks app with Flask-ScoketIO HOT 1
- VersionConflict between jinja2-3.0.1 and jinja2-2.11.1 HOT 2
- Flask Monitoring Dashboard in Kubernetes recreates DB on persistent volume for each pod HOT 2
- CSRF on Falsk monitoring dashboard not working HOT 8
- Cannot login to dashboard HOT 6
- Scipy Dependency errors on Mac M1 HOT 3
- Support for Python 3.9, 3.10, ...? HOT 8
- Track Dropped requests
- Extension breaks with Sessions HOT 1
- AttributeError: 'Blueprint' object has no attribute 'before_app_first_request'. Did you mean: 'before_app_request'? HOT 7
- Flask Dashboard not working, just screen loading and loading HOT 7
- ModuleNotFoundError: No module named 'requests' HOT 3
- User table - insufficient column length for password_hash HOT 1
- Type not specified as int for endpoint_id get parameter in routes
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 flask-monitoringdashboard.