[sqlalchemy] Error: Packet sequence number wrong for read replica

2023-06-21 Thread Ali Hopyar
0 We have an environment with the following libraries and versions; Python 3.8 Flask 1.0.2 Flask-SQLAlchemy 2.3.0 SQLAlchemy 1.2.10 PyMySQL 1.0.2 Normally, we run on a single RDS Mysql but because of the high load we needed to add a read re

[sqlalchemy] Re: Multiple Foreign Keys to the same table, problems with second object.

2007-02-21 Thread Ali
Excellent, that (expire, refresh) works. Thank-you very much. Is there a reason why it sometimes works? On Feb 20, 11:47 pm, Michael Bayer <[EMAIL PROTECTED]> wrote: > On Feb 20, 2007, at 12:01 PM, Ali wrote: > > > > >>>> u = User(name='Ali') >

[sqlalchemy] Re: Multiple Foreign Keys to the same table, problems with second object.

2007-02-20 Thread Ali
lways correct I will just have to stick to using the hack on the Receipt object to get the cancelled_user until I am more familiar with SA to work out what is going on. Ali Missing Tables: suppliers_table = Table('supplier', meta, Column('id', Integer, autoincreme

[sqlalchemy] Re: Multiple Foreign Keys to the same table, problems with second object.

2007-02-20 Thread Ali
operties=dict( user=relation(User, backref='receipts', primaryjoin=stockreceipt_table.c.user_id == users_table.c.id), cancelled_user=relation(User, backref='cancelled_receipts', lazy=False, primaryjoin=stockreceipt_table.c.cancelled_

[sqlalchemy] Re: Multiple Foreign Keys to the same table, problems with second object.

2007-02-20 Thread Ali
By "both", I mean user and receipt tables On 20 Feb, 17:12, "Ali" <[EMAIL PROTECTED]> wrote: > I left out the fields for brevity of example. They both have an id > column defined as primary keys. > > On 20 Feb, 17:11, "Michael Bayer" <[EMAIL

[sqlalchemy] Re: Multiple Foreign Keys to the same table, problems with second object.

2007-02-20 Thread Ali
I left out the fields for brevity of example. They both have an id column defined as primary keys. On 20 Feb, 17:11, "Michael Bayer" <[EMAIL PROTECTED]> wrote: > On Feb 20, 12:01 pm, "Ali" <[EMAIL PROTECTED]> wrote: > > > > &

[sqlalchemy] Multiple Foreign Keys to the same table, problems with second object.

2007-02-20 Thread Ali
id == users_table.c.id), cancelled_user=relation(User, backref='cancelled_receipts', lazy=False, primaryjoin=stockreceipt_table.c.cancelled_user_id == users_table.c.id), ) ) There is also a table "user" with an id column, which is reverenced here. So in

[sqlalchemy] Re: py2exe sqlalchemy

2007-02-17 Thread Ali
se py2.5 has better support for absolute module imports (or > maybe py2exe does). > > On Feb 17, 2007, at 11:58 AM, Ali wrote: > > > > > Hi, > > > I might be going insane, but I am successfully using Sqlalchemy > > (0.3.4, Python2.5, py2exe 0.6.6) with py2exe

[sqlalchemy] Re: py2exe sqlalchemy

2007-02-17 Thread Ali
options dict for py2exe. e.g. options = { 'py2exe' : { 'packages': 'encodings, sqlalchemy', etc. I am waiting for it to explode... Ali On Feb 9, 4:12 pm, "Michael Bayer" <[EMAIL PROTECTED]> wrote: > add an entry to