sholsapp / flask-rrd Goto Github PK
View Code? Open in Web Editor NEWA thin HTTP API wrapper over rrdtool.
A thin HTTP API wrapper over rrdtool.
Whenever I try to start the webserver with manage.py runsever
, I get this error
/home/proxima/Desktop/flask-rrd/venv/lib/python2.7/site-packages/Flask-0.11.1-py2.7.egg/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.script is deprecated, use flask_script instead.
.format(x=modname), ExtDeprecationWarning
/home/proxima/Desktop/flask-rrd/venv/lib/python2.7/site-packages/Flask-0.11.1-py2.7.egg/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.bootstrap is deprecated, use flask_bootstrap instead.
.format(x=modname), ExtDeprecationWarning
/home/proxima/Desktop/flask-rrd/venv/lib/python2.7/site-packages/Flask-0.11.1-py2.7.egg/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.restless is deprecated, use flask_restless instead.
.format(x=modname), ExtDeprecationWarning
/home/proxima/Desktop/flask-rrd/venv/lib/python2.7/site-packages/Flask-0.11.1-py2.7.egg/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.sqlalchemy is deprecated, use flask_sqlalchemy instead.
.format(x=modname), ExtDeprecationWarning
Traceback (most recent call last):
File "./manage.py", line 13, in <module>
from flaskrrd import app, init_webapp
File "/home/proxima/Desktop/flask-rrd/flaskrrd/__init__.py", line 21, in <module>
manager.create_api(RRD, methods=['GET', 'POST'])
File "/home/proxima/Desktop/flask-rrd/venv/lib/python2.7/site-packages/Flask_Restless-0.17.0-py2.7.egg/flask_restless/manager.py", line 698, in create_api
blueprint = self.create_api_blueprint(app=app, *args, **kw)
File "/home/proxima/Desktop/flask-rrd/venv/lib/python2.7/site-packages/Flask_Restless-0.17.0-py2.7.egg/flask_restless/manager.py", line 566, in create_api_blueprint
pk_name = primary_key or primary_key_name(model)
File "/home/proxima/Desktop/flask-rrd/venv/lib/python2.7/site-packages/Flask_Restless-0.17.0-py2.7.egg/flask_restless/helpers.py", line 232, in primary_key_name
pk_names = primary_key_names(model)
File "/home/proxima/Desktop/flask-rrd/venv/lib/python2.7/site-packages/Flask_Restless-0.17.0-py2.7.egg/flask_restless/helpers.py", line 214, in primary_key_names
return [key for key, field in inspect.getmembers(model)
File "/usr/lib64/python2.7/inspect.py", line 253, in getmembers
value = getattr(object, key)
File "/home/proxima/Desktop/flask-rrd/venv/lib/python2.7/site-packages/Flask_SQLAlchemy-2.1-py2.7.egg/flask_sqlalchemy/__init__.py", line 500, in __get__
return type.query_class(mapper, session=self.sa.session())
File "build/bdist.linux-x86_64/egg/sqlalchemy/orm/scoping.py", line 78, in __call__
File "build/bdist.linux-x86_64/egg/sqlalchemy/util/_collections.py", line 990, in __call__
File "/home/proxima/Desktop/flask-rrd/venv/lib/python2.7/site-packages/Flask_SQLAlchemy-2.1-py2.7.egg/flask_sqlalchemy/__init__.py", line 771, in create_session
return SignallingSession(self, **options)
File "/home/proxima/Desktop/flask-rrd/venv/lib/python2.7/site-packages/Flask_SQLAlchemy-2.1-py2.7.egg/flask_sqlalchemy/__init__.py", line 153, in __init__
self.app = app = db.get_app()
File "/home/proxima/Desktop/flask-rrd/venv/lib/python2.7/site-packages/Flask_SQLAlchemy-2.1-py2.7.egg/flask_sqlalchemy/__init__.py", line 922, in get_app
raise RuntimeError('application not registered on db '
RuntimeError: application not registered on db instance and no application bound to current context
Any ideas on how to fix?
OS: Arch Linux 4.6
While server is running and I try to run manage.py update_rrd
, the server outputs this
ERROR:flaskrrd:Exception on /update/test [POST]
Traceback (most recent call last):
File "/home/proxima/Desktop/Code/PYTHON/flask-rrd/venv/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/home/proxima/Desktop/Code/PYTHON/flask-rrd/venv/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/proxima/Desktop/Code/PYTHON/flask-rrd/venv/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/proxima/Desktop/Code/PYTHON/flask-rrd/venv/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/home/proxima/Desktop/Code/PYTHON/flask-rrd/venv/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/proxima/Desktop/Code/PYTHON/flask-rrd/flaskrrd/__init__.py", line 155, in update
if create_rrd(rrd, desc):
File "/home/proxima/Desktop/Code/PYTHON/flask-rrd/flaskrrd/__init__.py", line 114, in create_rrd
for ds_type in description['metrics']:
KeyError: 'metrics'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.