Description
In this section of the course, I copied the bin
, data
and db
code from the 100 Days GitHub repo into my version of the code.
I found that in data/db_session.py
, the return value needs to be the attribute factory
i.e. DbSession.factory
, rather than the method i.e. DbSession.factory()
.
However, after fixing that issue, I am now confronted with another. In bin/load_base_data.py
, the session returned does not have the 'query' attribute!
I created this Gist which shows the error:
https://gist.github.com/gloc-mike/ddb4fb4ca0aa1ba81209623a8858d606.
When I review the session
object in the debug console in PyCharm, I can see that 'query' appears in the public_methods
tuple (see attached screenshot) but the my watch expression again, shows the attribute error.
Any ideas to help me resolve this issue would be appreciated.