Re: [sqlalchemy] Inserting Chinese characters in Oracle database

2018-01-12 Thread Stefan Schwarzer
Mike, many thanks for your feedback! On 2018-01-12 16:33, Mike Bayer wrote: > On Fri, Jan 12, 2018 at 7:14 AM, Stefan Schwarzer > wrote: >> I have trouble inserting Chinese characters into an Oracle database with >> SQLAlchemy (and to some extent with cx_Oracle). I don't specifically need >> Chin

Re: [sqlalchemy] Inserting Chinese characters in Oracle database

2018-01-12 Thread Mike Bayer
here's "data too large" for the size of 10: sqlalchemy.exc.DatabaseError: (cx_Oracle.DatabaseError) ORA-12899: value too large for column "SCOTT"."UTF8_TEST"."TEXT" (actual: 12, maximum: 10) [SQL: u'INSERT INTO utf8_test (text) VALUES (:text)'] [parameters: {'text': '\\u7535\\u8111'}] (Background

Re: [sqlalchemy] Inserting Chinese characters in Oracle database

2018-01-12 Thread Mike Bayer
On Fri, Jan 12, 2018 at 7:14 AM, Stefan Schwarzer wrote: > I have trouble inserting Chinese characters into an Oracle database with > SQLAlchemy (and to some extent with cx_Oracle). I don't specifically need > Chinese characters but I used them in a unit test to see if my code > (hopefully) can ha

Re: [sqlalchemy] [sqlalchemy/postgreSQL] way to handle server-end timeout

2018-01-12 Thread Mike Bayer
On Thu, Jan 11, 2018 at 9:14 PM, wrote: > Hello, > > Is below the way to reconnect to postgresql server automatically? > everytime I need to remake a session with > "Session = sessionmaker(bind=engine) > session = Session()" > , is this right? > > the codes below can work, but if I don't remake

[sqlalchemy] Inserting Chinese characters in Oracle database

2018-01-12 Thread Stefan Schwarzer
I have trouble inserting Chinese characters into an Oracle database with SQLAlchemy (and to some extent with cx_Oracle). I don't specifically need Chinese characters but I used them in a unit test to see if my code (hopefully) can handle "any" unicode characters. The setup: - SQLAlchemy 1.1.15

Re: [sqlalchemy] Re: Temporarily disable DB persistence for optimization routine

2018-01-12 Thread Simon King
If I understand your code correctly, scheduler.propagate() creates a large number of Passage instances, and you only want a small subset of them to be added to the database. Is that correct? I would guess that the passages are getting added to the session because you are setting their 'satellite'