Closed larsks closed 5 years ago
Running flocx-market-dbsync results in:
flocx-market-dbsync
2019-07-15 15:38:58.281 1928 CRITICAL flocx-market [-] Unhandled error: RuntimeError: No application found. Either work inside a view function or push an application context. See http://flask-sqlalchemy.pocoo.org/contexts/. 2019-07-15 15:38:58.281 1928 ERROR flocx-market Traceback (most recent call last): 2019-07-15 15:38:58.281 1928 ERROR flocx-market File "/home/lars/.local/share/virtualenvs/flocx-market-T-xD_ece/bin/flocx-market-dbsync", line 10, in <module> 2019-07-15 15:38:58.281 1928 ERROR flocx-market sys.exit(main()) 2019-07-15 15:38:58.281 1928 ERROR flocx-market File "/home/lars/projects/flocx/flocx-market/flocx_market/cmd/dbsync.py", line 7, in main 2019-07-15 15:38:58.281 1928 ERROR flocx-market orm.create_all() 2019-07-15 15:38:58.281 1928 ERROR flocx-market File "/home/lars/.local/share/virtualenvs/flocx-market-T-xD_ece/lib/python3.7/site-packages/flask_sqlalchemy/__init__.py", line 1033, in create_all 2019-07-15 15:38:58.281 1928 ERROR flocx-market self._execute_for_all_tables(app, bind, 'create_all') 2019-07-15 15:38:58.281 1928 ERROR flocx-market File "/home/lars/.local/share/virtualenvs/flocx-market-T-xD_ece/lib/python3.7/site-packages/flask_sqlalchemy/__init__.py", line 1010, in _execute_for_all_tables 2019-07-15 15:38:58.281 1928 ERROR flocx-market app = self.get_app(app) 2019-07-15 15:38:58.281 1928 ERROR flocx-market File "/home/lars/.local/share/virtualenvs/flocx-market-T-xD_ece/lib/python3.7/site-packages/flask_sqlalchemy/__init__.py", line 982, in get_app 2019-07-15 15:38:58.281 1928 ERROR flocx-market 'No application found. Either work inside a view function or push' 2019-07-15 15:38:58.281 1928 ERROR flocx-market RuntimeError: No application found. Either work inside a view function or push an application context. See http://flask-sqlalchemy.pocoo.org/contexts/. 2019-07-15 15:38:58.281 1928 ERROR flocx-market
I may have accidentally broken it, but https://github.com/CCI-MOC/flocx-market/pull/77 should fix it (at least dbsync worked when I tested it against that code).
Running
flocx-market-dbsync
results in: