Re: [sqlalchemy] Help needed troubleshooting error on session commit after deletion

2017-11-08 Thread Mike Bayer
On Wed, Nov 8, 2017 at 7:43 AM, Hugo Heyman wrote: > Hi again, > > I've been trying to isolate the problem and I think I have found what's > causing this for me. A while back I added this package > https://github.com/operator/sqlalchemy_bulk_lazy_loader > (it simplified things when using graphene-

Re: [sqlalchemy] Help needed troubleshooting error on session commit after deletion

2017-11-08 Thread Hugo Heyman
Hi again, I've been trying to isolate the problem and I think I have found what's causing this for me. A while back I added this package https://github.com/operator/sqlalchemy_bulk_lazy_loader (it simplified things when using graphene-sqlalchemy) The error seem to happen even without using the cu

Re: [sqlalchemy] Help needed troubleshooting error on session commit after deletion

2017-11-07 Thread Mike Bayer
Are you able to reproduce this error in other environments or only this one particular virtual environment? If it doesn't reproduce elsewheere can you try recreating your environment? Otherwise if you can reproduce it in other environments can you show me the complete steps I'd need to do to re

Re: [sqlalchemy] Help needed troubleshooting error on session commit after deletion

2017-11-07 Thread Hugo Heyman
Traceback (most recent call last): File "", line 1, in File "/Users/hugo/Dropbox/lahey/api/.venv/lib/python3.6/site-packages/sqlalchemy/orm/scoping.py", line 157, in do return getattr(self.registry(), name)(*args, **kwargs) File "/Users/hugo/Dropbox/lahey/api/.venv/lib/python3.6/site-pac

Re: [sqlalchemy] Help needed troubleshooting error on session commit after deletion

2017-11-07 Thread Mike Bayer
Can you show me the stack trace you get with 1.1.15? Thanks On Nov 7, 2017 8:30 AM, "Hugo Heyman" wrote: > Unfortunately it didn't help. I tried adding those imports both in the > models file and run them first in shell. > > On Tue, Nov 7, 2017 at 2:18 PM, Mike Bayer > wrote: > >> Ok, see if

Re: [sqlalchemy] Help needed troubleshooting error on session commit after deletion

2017-11-07 Thread Hugo Heyman
Unfortunately it didn't help. I tried adding those imports both in the models file and run them first in shell. On Tue, Nov 7, 2017 at 2:18 PM, Mike Bayer wrote: > Ok, see if for the moment some imports at the top help: > > > import sqlalchemy > import sqlalchemy.orm > > Make sure those run firs

Re: [sqlalchemy] Help needed troubleshooting error on session commit after deletion

2017-11-07 Thread Mike Bayer
Ok, see if for the moment some imports at the top help: import sqlalchemy import sqlalchemy.orm Make sure those run first. On Nov 7, 2017 8:12 AM, "Hugo Heyman" wrote: > 1.2.0b3 but I also tried 1.1.15 now with the same result. > > /Hugo > > On Tue, Nov 7, 2017 at 1:26 PM, Mike Bayer > wrote

Re: [sqlalchemy] Help needed troubleshooting error on session commit after deletion

2017-11-07 Thread Hugo Heyman
1.2.0b3 but I also tried 1.1.15 now with the same result. /Hugo On Tue, Nov 7, 2017 at 1:26 PM, Mike Bayer wrote: > That's probably our fault, what is the exact version of SQLAlchemy in use > ? Did you try upgrading to the latest release ? > > On Nov 7, 2017 4:32 AM, "Hugo Heyman" wrote: > >>

Re: [sqlalchemy] Help needed troubleshooting error on session commit after deletion

2017-11-07 Thread Mike Bayer
That's probably our fault, what is the exact version of SQLAlchemy in use ? Did you try upgrading to the latest release ? On Nov 7, 2017 4:32 AM, "Hugo Heyman" wrote: > Hello, > > > I get an error I don't really understand. When I do session commit after a > deletion like this: > > App: app.boo

[sqlalchemy] Help needed troubleshooting error on session commit after deletion

2017-11-07 Thread Hugo Heyman
Hello, I get an error I don't really understand. When I do session commit after a deletion like this: App: app.bootstrap_new [debug] Instance: /Users/hugo/Dropbox/lahey/api/instance >>> from app.extensions import db >>> from app.models.user import User >>> user = User.query.all()[0] >>> db.sess