Created
February 24, 2020 01:45
-
-
Save gloc-mike/ddb4fb4ca0aa1ba81209623a8858d606 to your computer and use it in GitHub Desktop.
'sessionmaker' object has no attribute 'query'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/Users/michael/Developer/TalkPython/100-days-of-web/100-days-of-web-with-python/037-pyramid/billtracker/venv/bin/python "/Users/michael/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-P/ch-0/193.6494.30/PyCharm.app/Contents/plugins/python/helpers/pycharm/pycharm_load_entry_point.py" /Users/michael/Developer/TalkPython/100-days-of-web/100-days-of-web-with-python/037-pyramid/billtracker/development.ini | |
Connecting to DB at: sqlite:////Users/michael/Developer/TalkPython/100-days-of-web/100-days-of-web-with-python/037-pyramid/billtracker/billtracker/db/bill_tracker.sqlite | |
Loading starter data... | |
Traceback (most recent call last): | |
File "/Users/michael/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-P/ch-0/193.6494.30/PyCharm.app/Contents/plugins/python/helpers/pycharm/pycharm_load_entry_point.py", line 12, in <module> | |
sys.exit(f()) | |
File "/Users/michael/Developer/TalkPython/100-days-of-web/100-days-of-web-with-python/037-pyramid/billtracker/venv/lib/python3.7/site-packages/pyramid-1.10.4-py3.7.egg/pyramid/scripts/pserve.py", line 34, in main | |
return command.run() | |
File "/Users/michael/Developer/TalkPython/100-days-of-web/100-days-of-web-with-python/037-pyramid/billtracker/venv/lib/python3.7/site-packages/pyramid-1.10.4-py3.7.egg/pyramid/scripts/pserve.py", line 275, in run | |
app = loader.get_wsgi_app(app_name, config_vars) | |
File "/Users/michael/Developer/TalkPython/100-days-of-web/100-days-of-web-with-python/037-pyramid/billtracker/venv/lib/python3.7/site-packages/plaster_pastedeploy-0.7-py3.7.egg/plaster_pastedeploy/__init__.py", line 129, in get_wsgi_app | |
global_conf=defaults, | |
File "/Users/michael/Developer/TalkPython/100-days-of-web/100-days-of-web-with-python/037-pyramid/billtracker/venv/lib/python3.7/site-packages/PasteDeploy-2.1.0-py3.7.egg/paste/deploy/loadwsgi.py", line 253, in loadapp | |
return loadobj(APP, uri, name=name, **kw) | |
File "/Users/michael/Developer/TalkPython/100-days-of-web/100-days-of-web-with-python/037-pyramid/billtracker/venv/lib/python3.7/site-packages/PasteDeploy-2.1.0-py3.7.egg/paste/deploy/loadwsgi.py", line 278, in loadobj | |
return context.create() | |
File "/Users/michael/Developer/TalkPython/100-days-of-web/100-days-of-web-with-python/037-pyramid/billtracker/venv/lib/python3.7/site-packages/PasteDeploy-2.1.0-py3.7.egg/paste/deploy/loadwsgi.py", line 715, in create | |
return self.object_type.invoke(self) | |
File "/Users/michael/Developer/TalkPython/100-days-of-web/100-days-of-web-with-python/037-pyramid/billtracker/venv/lib/python3.7/site-packages/PasteDeploy-2.1.0-py3.7.egg/paste/deploy/loadwsgi.py", line 152, in invoke | |
return fix_call(context.object, context.global_conf, **context.local_conf) | |
File "/Users/michael/Developer/TalkPython/100-days-of-web/100-days-of-web-with-python/037-pyramid/billtracker/venv/lib/python3.7/site-packages/PasteDeploy-2.1.0-py3.7.egg/paste/deploy/util.py", line 55, in fix_call | |
val = callable(*args, **kw) | |
File "/Users/michael/Developer/TalkPython/100-days-of-web/100-days-of-web-with-python/037-pyramid/billtracker/billtracker/__init__.py", line 17, in main | |
init_db() | |
File "/Users/michael/Developer/TalkPython/100-days-of-web/100-days-of-web-with-python/037-pyramid/billtracker/billtracker/__init__.py", line 30, in init_db | |
load_base_data.load_starter_data() | |
File "/Users/michael/Developer/TalkPython/100-days-of-web/100-days-of-web-with-python/037-pyramid/billtracker/billtracker/bin/load_base_data.py", line 17, in load_starter_data | |
if session.query(Bill).count() > 0: | |
AttributeError: 'sessionmaker' object has no attribute 'query' | |
Process finished with exit code 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment