Open the-contact-departure-corporation opened 4 years ago
Hi @nick-halden-wc !
Can you try to put the DATABASE configuration in the [database] section? The configuration parser expects this.
E.g.
[database]
DATABASE=sqlite:////<path to your project>/dashboard.db
Yes, that works. Now, when I go to the default dashboard URL, it says that the dashboard is not found. My configuration file is now the following:
[dashboard]
[database]
DATABASE=sqlite:////var/www/flaskapp/flaskapp/flask_monitoringdashboard.db
strange. what if you remove the orphan [dashboard] from the config file?
On 3 Apr 2020, at 22:35, nick-halden-wc notifications@github.com wrote:
Yes, that works. Now, when I go to the default dashboard URL, it says that the dashboard is not found. My configuration file is now the following:
[dashboard]
[database] DATABASE=sqlite:////
/dashboard.db — You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/flask-dashboard/Flask-MonitoringDashboard/issues/316#issuecomment-608646162, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADRNB3TRIN5EMCXFUYXGO3RKZCCVANCNFSM4LZRSEUQ.
Sorry it took so long to get back.
If I remove the orphan [dashboard] inside the config file I still get a 404.
I am trying via the default URL: xxx.xxx.xxx.xxx:5000/dashboard/login
So in general flask monitoring dashboard is supposed to work with connexion?
I get the error message "AttributeError: 'FlaskApp' object has no attribute 'register_blueprint'" when I try to start my connexion based app.
@nick-halden-wc : is there any way in which you can help me replicate your setup. i don't feel that i have sufficient information to provide you with help? maybe a dockerfile that recreates the problem?
@SebastianGergen : what is connextion?
@mircealungu A python-OpenAPI-Flask framework that I use https://connexion.readthedocs.io/en/latest/ and that @nick-halden-wc uses in the opening post. This is how I found this thread :)
I have installed Flask-MonitoringDashboard via pip. Upon binding, it states that it is unable to open the database file. I have researched several solutions, all to no avail.
I have the following setup:
My flaskapp.wsgi is located here:
/var/www/flaskapp
My configuration file for Flask-MonitoringDashboard is located in
/var/www/flaskapp
(really it is in/var/www/flaskapp/flaskapp
however it is a symlink)Where I initialize the flask application, I have initialized the main application through connexion, and then I bind flask_monitoringdashboard.
I have set an environment variable, which points to the configuration file outlined in the required style as defined in the project documentation:
os.environ["FLASK_MONITORING_DASHBOARD_CONFIG"] = '/var/www/flaskapp/flaskapp/config.cfg’
The contents of my config.cfg file are below:
[dashboard] DATABASE=sqlite:////var/www/flaskapp/flaskapp/flask_monitoringdashboard.db
I have tried setting this with relative and absolute paths, and it looks like flask_monitoringdashboard.db has relevant information related to Flask-MonitoringDashboard in it (for troubleshooting this the file has been assigned 777 permissions).
Any help solving this would be greatly appreciated. Thank you in advance for your time!