orator
orator copied to clipboard
'NoneType' object has no attribute 'autocommit'
Error when create entity with mysql (PyMySQL) 'NoneType' object has no attribute 'autocommit'
I have met this error too. For now I don't have got a solution to fix it. How can you fix this error? I found that get this error when using the same api to create a record continually with different data.
I have this error constantly on one of my services where I create a model and then save the object
I have seen the contributions and here in the company we want to contribute to this project as we have big faith on it. this issue is really a deal breaker. We are even planning on having a junior pass most solvable issues to stack overflow for extended use. @sdispater how can we contribute?
@nekh @yvonneFtMore the solution is in one of the PRs it is caused because the connection is closed and so it has no autocommit attribute. It is solved in PyMySql through this patch:
https://github.com/sdispater/orator/pull/298
Experiencing same bug here....
@alexpdr i recommend you getting the PR but this repo is not being mantained
@zardilior @alexpdr would either of you be willing to contribute to Masonite's Orator port? It's in a pretty solid beta right now, good architecture foundation and at this point just needs features.
@josephmancuso sure thing, seems like this repo is inactive so need a replacement for my orm anyway 😄 Anywhere you can direct me for starters?
Same here. Masonite needs an orator heavily supported and I wanted to lay a better architectural foundation for the new ORM so it can be easily add new databases.
So far so MySQL, Postgres and SQLite but I want mssql before we leave beta.
You can reference the Masonite documentation for how it works. It’s pretty much a drop in replacement of orator. I’ve been working on it for a few months now. I think 5 months.
You can reference a white page I wrote about it here: https://docs.masoniteproject.com/masonite-orm/white-page
This discusses the basic architecture of the project and some good to know background stuff.
The APIs between the 2 projects are pretty much identical which is where the drop in replacement comes from. On masonitecasts.com I have some hour long coding sessions for the orm where I walk through my thought process when building it I can share with you
Let me know if you have questions :). There’s also a slack channel for Masonite we can chat in
@josephmancuso if that gives us a fully working and mantained Orator I am in. I really like this project but I wouldn't be able to mantain it on my own. The base is good, the concept is great and python requires a good and strong ORM.
@josephmancuso sorry to bother you, but could you or other collaborator make release from last merge mentioned above and upload it to pip? (https://github.com/sdispater/orator/pull/298) The last version of this was 0.9.9 on 16 july 2019. Unfortunately the PR for this issue just merged on 27 july, but no release since then. Our legacy project is experiencing the issue and would take a lot of work if we want to switch library.
If it is not possible to make new release at the moment, could anyone suggest me how to properly use latest version from this repo into my project? by proper use I mean I don't have to manually copy one file to the local library file after installing it via pip.
@yahya09 I literally had to do a manual patch to a downloaded version of the library for a legacy project
I can try releasing but I'm pretty sure I will not have the correct permission to fully complete it.
I released but it didn't upload to pypi. Possibly because something about black failed in the travis pipes
I released but it didn't upload to pypi. Possibly because something about black failed in the travis pipes
Thank you very much for your effort. For now I will follow @zardilior to manually patch it, guess I need to tweak the pipeline of the project.
@yahya09 @zardilior @alexpdr I am still working on it but it might be worth it to follow https://github.com/masoniteframework/orm
This is basically an Orator rewrite and will replace the Orator role for the Masonite framework. it's nearing completion of alpha stage and moving to beta phase. It's already pretty feature rich. I wouldn't put it into a project yet until it leaves beta but its a project you should monitor if you like Orator and don't want to keep using a legacy project that is no longer maintained