Comments (5)
My assumption is wrong i.e. that DbSession.factory()
needed to be refactored to DbSession.factory
. so I'm closing this issue.
My code works after reverting to DbSession.factory()
but it is still very odd that it did not run when I first copied the data modelling modules into my project. Is there maybe a first run issue?
I'm still at a loss as to why my version was not working. When I was debugging it I could clearly see that the DbSession.factory
attribute was set to None
which is why it was originally failing but why should it suddenly start working after I revert my change above?
Anyway, I am closing this issue.
from 100daysofweb-with-python-course.
Hi @gloc-mike It definitely needs to be returning a Session. But I think the problem was it's returning session_maker
not session_maker()
. One is the function that makes sessions, the other is a particular session created by that function for the Unit of Work.
Hope that helps!
Michael
from 100daysofweb-with-python-course.
Hi,
I created a new Pyramid project with which I want to build to track timesheet info and I am getting the original error (the error that occurred BEFORE the error I originally reported in this issue).
Please see the Gist I created for this error:
https://gist.github.com/gloc-mike/fd84826f0c505be1e61f7f7493925bd0
I created the timesheet project using PyCharm using the Pyramid project template (not the from the commandline using the cookiecutter template). The PyCharm template for Pyramid comes with a lot of jinja2
code (even though I specified chameleon
as the template language) so I removed the jinja2
code, then I added the bits and pieces from the course i.e. the bin
, data
and db
folders and code, and I modified the data model etc. to suite the this project.
After making all of the necessary changes needed, I ran it and it failed when the DbSession.factory()
call returned a 'None' value. This error also occurred when I built the bill_tracker
version of the project.
Here is the link to the timesheets project on GitHub:
https://github.com/gloc-mike/timesheets
Thanks for the help!
Michael
from 100daysofweb-with-python-course.
Hi, I responded to the issue in the gist.
from 100daysofweb-with-python-course.
Hi @gloc-mike There were quite a few issues with the repo. Here's a running version. Try doing a diff on the directories to see what changed. :)
https://send.firefox.com/download/406ddab5c4cabb0c/#iau8zBEX6mH9Bwbd5QOnxQ
from 100daysofweb-with-python-course.
Related Issues (20)
- Day 53 - 56: Django registration_form.html possibly missing action HOT 4
- Day 89 - 92 Deployment Suggestion: Add reference to the Let's Encrypt script in other Webinar? HOT 1
- Days 5-8: Recreate Google's homepage HOT 1
- Days 09-12 Building APIs with Api Star (0.5.x) HOT 1
- Day 69-72 Django Rest Framework Swagger error HOT 3
- Days 9-12 - update Api Star documentation links HOT 3
- Days 9-12 API Method: PUT Issue HOT 6
- Days 93-100: @api.route ↑↑ shifts HOT 1
- Question: double forward underscores HOT 1
- check / update default sendgrid config HOT 2
- Days 65-68 Heroku - Sendgrid changes HOT 5
- Day 22. Installing requirements incompatible chardet HOT 10
- Day 41 Example Tips Page changed HOT 1
- Day 24 - does not work with Flask 2.x HOT 3
- Days 33-36: broken link HOT 1
- Days 045-048 Build a simple Django app [v20/22] missing messages HOT 2
- This is my reference HOT 2
- Day 9 -12: API Star -- Werkzeug Version 3.00 + is not compatible with API Star 0.5.41 HOT 3
- Python
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 100daysofweb-with-python-course.