[sqlalchemy] Re: session clean-up problem?

2009-08-31 Thread Gloria
results returned after each query, and the log shows the SQLAlchemy session being closed. The log is below. It seems that different vs. the same HTTP sessions would be irrelevant, but the HTTP session id is logged as well. I think we hit a bug. Thanks again, Gloria

[sqlalchemy] Re: session clean-up problem?

2009-08-31 Thread Gloria
show me some good ways to probe the pool without modifying code in your egg files. Thank you for your time and help, Gloria --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send

[sqlalchemy] Re: session clean-up problem?

2009-08-31 Thread Gloria
After much digging, I finally found the calls: session.close_all() self.engine.dispose() I could not find this in the docs. Thanks again, Gloria --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group

[sqlalchemy] session clean-up problem?

2009-08-27 Thread Gloria W
explicitly close() the session just before leaving the scope of the method. It looks good, and works perfectly on queries which return a smaller result set. Hmm Thanks in advance! Gloria --~--~-~--~~~---~--~~ You received this message because you are subscribed

[sqlalchemy] Re: session clean-up problem?

2009-08-27 Thread Gloria
: session = self.Session() ... session.close() Thanks for your time, Gloria --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy

[sqlalchemy] Re: session clean-up problem?

2009-08-27 Thread Gloria
OK, so is the solution to run these in separate processes instead? Is this a GIL limitation? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to

[sqlalchemy] Re: session clean-up problem?

2009-08-27 Thread Gloria
OK, so is the solution to run these in separate processes instead? Is this a GIL limitation? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to

[sqlalchemy] Re: session clean-up problem?

2009-08-27 Thread Gloria
Wow, my browser is posting multiple times when I have something else refreshing another screen in FF. Weird! On Aug 27, 7:16 pm, Gloria strang...@comcast.net wrote: Fantastic! I'll do this and respknd again tomorrow. Thanks for your help

[sqlalchemy] Re: session clean-up problem?

2009-08-27 Thread Gloria
Fantastic! I'll do this and respknd again tomorrow. Thanks for your help, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To

[sqlalchemy] Re: session clean-up problem?

2009-08-27 Thread Gloria
Fantastic! I'll do this and respknd again tomorrow. Thanks for your help, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To

[sqlalchemy] Re: session clean-up problem?

2009-08-27 Thread Gloria
: session = self.Session() ... session.close() Thanks for your time, Gloria --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy

[sqlalchemy] Re: session clean-up problem?

2009-08-27 Thread Gloria
: session = self.Session() ... session.close() Thanks for your time, Gloria --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy

[sqlalchemy] Re: session clean-up problem?

2009-08-27 Thread Gloria
: session = self.Session() ... session.close() Thanks for your time, Gloria --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy

[sqlalchemy] Re: session clean-up problem?

2009-08-27 Thread Gloria
OK, so is the solution to run these in separate processes instead? Is this a GIL limitation? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to

[sqlalchemy] Re: session clean-up problem?

2009-08-27 Thread Gloria
Fantastic! I'll do this and respknd again tomorrow. Thanks for your help, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To

[sqlalchemy] Re: session clean-up problem?

2009-08-27 Thread Gloria
OK, so is the solution to run these in separate processes instead? Is this a GIL limitation? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to

[sqlalchemy] AttributeError upon postgres_returning

2009-03-13 Thread Gloria W
() AttributeError: 'Insert' object has no attribute 'fetchall' Did I mess this up in some way, or hit a bug? Can I use a declarative_base table ref this way? Thank you in advance, Gloria PS: I still owe you a working sample of a previous problem I reported involving session scope. I have not forgotten

[sqlalchemy] Re: AttributeError upon postgres_returning

2009-03-13 Thread Gloria W
Argh! I knew it had to be something simple. Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group,

[sqlalchemy] How to best represent a Postgresql table with (1) a composite key, and (2) no sequence

2009-03-13 Thread Gloria W
,logentryID,memberID): self.logentryID = logentryID self.memberID = memberID def __repr__(self): return Affiliation('%s','%s') \ % (self.logentryID, self.memberID) Thank you in advance! Gloria

[sqlalchemy] Re: How to best represent a Postgresql table with (1) a composite key, and (2) no sequence

2009-03-13 Thread Gloria W
Excellent, thank you. I won't get to try this until Monday. Gloria --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe

[sqlalchemy] Re: Missing FROM clause on a one-to-many declarative_base mapping

2009-02-09 Thread Gloria W
returned by getattr seems the same. Am I missing something? Thanks once again, Gloria --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com

[sqlalchemy] Re: Missing FROM clause on a one-to-many declarative_base mapping

2009-02-09 Thread Gloria W
returned by getattr seems the same. Am I missing something? Thanks once again, Gloria --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com

[sqlalchemy] Re: Missing FROM clause on a one-to-many declarative_base mapping

2009-02-09 Thread Gloria W
Ahh, true. I switch the order of these operations, and always the second one fails, no matter what. How should I debug this problem? Thank you, Gloria --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group

[sqlalchemy] Re: Missing FROM clause on a one-to-many declarative_base mapping

2009-02-09 Thread Gloria W
Just a quick update: A forced flush between queries does no good. Creating a new instance for each query seems to be the only immediate cure. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post

[sqlalchemy] Re: Missing FROM clause on a one-to-many declarative_base mapping

2009-02-09 Thread Gloria W
Understood. In my constructor, I was using a shared global declarative_base, and a single session instance: metdata = Base.metadata engine = create_engine(config.db_conn) engine.echo = False Session = sessionmaker(bind=engine) self.session = Session() Only the self.session

[sqlalchemy] Re: Missing FROM clause on a one-to-many declarative_base mapping

2009-02-09 Thread Gloria W
I will put one together with a small database comprised of three tables. Give me a couple of days, and I will have it to you. Thank you, Gloria --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group

[sqlalchemy] Missing FROM clause on a one-to-many declarative_base mapping

2009-02-05 Thread Gloria W
Hi All, I have three classes, all using the same declarative_base() instance, as follows: In a config file: global Base Base = None def initBase(): global Base if not Base: Base = declarative_base() return Base

[sqlalchemy] Missing FROM clause on a one-to-many declarative_base mapping

2009-02-05 Thread Gloria W
Hi All, I have three classes, all using the same declarative_base() instance, as follows: In a config file: global Base Base = None def initBase(): global Base if not Base: Base = declarative_base() return Base

[sqlalchemy] Re: Missing FROM clause on a one-to-many declarative_base mapping

2009-02-05 Thread Gloria W
Wow, awesome, it works, thank you! ~G~ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to

[sqlalchemy] Re: Missing FROM clause on a one-to-many declarative_base mapping

2009-02-05 Thread Gloria W
'MemberProfile at 0x-488616d4' which seems to happen on any filter() option I use. Things work fine without the filter() option. Thanks again! Gloria --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group

[sqlalchemy] Re: Need SqlAlchemy Model Advice for a table with many foreign keys.

2009-02-04 Thread Gloria W
don't want to do this, since I have to also join Gender, and 40 something other tables to this class. What am I missing to make this work like the example shown? Thank you immensely, Gloria --~--~-~--~~~---~--~~ You received this message because you are subscribed

[sqlalchemy] Re: Need SqlAlchemy Model Advice for a table with many foreign keys.

2009-02-04 Thread Gloria W
AS member_gender_1 ON member_gender_1.genderID = anon_1.member_profiles_genderID ORDER BY member_profiles.genderID' {'memberID_1': 81017} debian-etch:/var/www/ReST/models# I get the same behavior whether or not I refer to the relation() class names as strings or actual classes. Thanks again Gloria

[sqlalchemy] Re: Need SqlAlchemy Model Advice for a table with many foreign keys.

2009-02-04 Thread Gloria W
Just to make it easier to read, I'm missing a FROM clause: sqlalchemy.exc.ProgrammingError: (ProgrammingError) missing FROM- clause entry for table member_profiles at character 5151 I read from the archive that this was a bug in 0.4. Thanks again, Gloria

[sqlalchemy] Re: cascade=all, delete, delete-orphan causes insert to fail

2009-02-03 Thread Gloria W
') I'm not sure why a merge into the current session was necessary, since I did the get() in the same session. Does each query flush the session, and create a new session key behind the scenes? So happy this is working, thank you! Gloria --~--~-~--~~~---~--~~ You

[sqlalchemy] Need SqlAlchemy Model Advice for a table with many foreign keys.

2009-02-03 Thread Gloria W
of foreign key resolution in some 'master' object, containing all of the fields I want? Many many thanks in advance, Gloria --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send

[sqlalchemy] Re: cascade=all, delete, delete-orphan causes insert to fail

2009-02-02 Thread Gloria W
, Gloria ` [{genderID: null, incomeID: null, DOB: null, applicationstatusID: 1, middleinitial: null, phonehome: xx, referemail: null, occupationother: null, lockoutflag: false, affiliationID: null, occupation: null, city: anywhere

[sqlalchemy] Lazy load issue when using declarative_base methodology?

2009-01-28 Thread Gloria W
SqlAlchemy. But my data set is empty. My colleague thinks it's a lazy loading issue. My model code for my tables appears below. Thank you in advance, Gloria import sys import pprint from sqlalchemy import * from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import

[sqlalchemy] Re: Lazy load issue when using declarative_base methodology?

2009-01-28 Thread Gloria W
on? does the testfile use same engine/.. setup as below? On Wednesday 28 January 2009 19:21:54 Gloria W wrote: This is a strange problem. I'd appreciate any assistance. I have a class set up using the declarative_bass model, set up in this way:   member_profile_table = MemberProfile.__table__

[sqlalchemy] Odd inheritance issue

2009-01-25 Thread Gloria W
about this. What am I missing? Thank you in advance, Gloria --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from

[sqlalchemy] Re: Odd inheritance issue

2009-01-25 Thread Gloria W
This should be called Odd Aggregation Issue. I am almost certain it's not related to inheritance, which is nested further up in the MemberProfile and Gender objects (which also work file). --~--~-~--~~~---~--~~ You received this message because you are subscribed

[sqlalchemy] Re: MySQL 5.0 DateTime initialization during Table creation is failing.

2008-07-01 Thread Gloria W
Got it, thanks for your help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL

[sqlalchemy] Re: MySQL 5.0 DateTime initialization during Table creation is failing.

2008-06-30 Thread Gloria W
I thought this was a scope problem, but it seems to be even bigger. This is the error I get: OperationalError: (OperationalError) (1067, Invalid default value for 'date_created') u'\nCREATE TABLE fu_op_requests (\n \tfu_op_requests_id INTEGER NOT NULL AUTO_INCREMENT, \n\tname VARCHAR(50),

[sqlalchemy] Re: MySQL 5.0 DateTime initialization during Table creation is failing.

2008-06-29 Thread Gloria W
This gives me an error: sqlalchemy.Column('date_created', mysql.MSTimeStamp, sqlalchemy.PassiveDefault(text(CURRENT_TIMESTAMP)), nullable=False)) NameError: global name 'text' is not defined --~--~-~--~~~---~--~~ You received this message because you are

[sqlalchemy] MySQL 5.0 DateTime initialization during Table creation is failing.

2008-06-28 Thread Gloria W
()), nullable=False) But the MySQL equivalent fails: sqlalchemy.Column('date_created', sqlalchemy.DateTime, sqlalchemy.PassiveDefault(text(CURRENT_TIMESTAMP)), nullable=False) What is the valid syntax? Is it failing for other reasons? Thank you in advance, Gloria

[sqlalchemy] Temporary table example?

2008-04-16 Thread Gloria W
, but I'm trying to find an SqlAlchemy way to do it. Thank you in advance, Gloria --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com

[sqlalchemy] Session binding to existing table: what am I missing?

2008-04-16 Thread Gloria W
the quick hint. Thank you in advance, Gloria --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send

[sqlalchemy] Setting passive default on an existing Postgresql table

2007-06-22 Thread Gloria
Hi all, I have a Postgresql 8.2.4 table where more than one field auto- increments. It looks like I need Passive defaults. Can someone show me how to add passive defaults to an existing db schema, where autoload=True. The doc glosses over this, and I can't pin down the syntax. Thank you, Gloria

[sqlalchemy] Re: Setting passive default on an existing Postgresql table

2007-06-22 Thread Gloria
. What am I missing? Thank you in advance, Gloria On Jun 22, 11:47 am, Michael Bayer [EMAIL PROTECTED] wrote: On Jun 22, 2007, at 8:42 AM, Gloria wrote: Hi all, I have a Postgresql 8.2.4 table where more than one field auto- increments. It looks like I need Passive defaults. Can someone

[sqlalchemy] Re: Setting passive default on an existing Postgresql table

2007-06-22 Thread Gloria
This worked, thank you for the quick response. The support here is outstanding, which is why I switched from SQLObject. Gloria On Jun 22, 4:27 pm, Michael Bayer [EMAIL PROTECTED] wrote: On Jun 22, 3:34 pm, Gloria [EMAIL PROTECTED] wrote: user_change_db_obj.update

[sqlalchemy] Examples of joins between three or more tables?

2007-03-15 Thread Gloria
Hi All, Good examples of rudimentary joins of 3 or more tables are hard to find. Please point me to some decent examples. Thank you, ~G~ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to

[sqlalchemy] Re: Print of returned object fails

2007-03-08 Thread Gloria
tzinfo structures better. This ticket at initd.org remains un-worked-on, so I'd like to hear from anyone else who has dealt with this problem and commented to initd.org. Thank you! Gloria On Feb 27, 5:53 pm, Michael Bayer [EMAIL PROTECTED] wrote: psycopg1 isnt really supported. On Feb 27, 2007

[sqlalchemy] Print of returned object fails

2007-02-27 Thread Gloria
I am not able to print the object returned by sqlAlchemy in this instance: clients=Table('clients',metadata, autoload=True) s = clients.select(clients.c.client_id==client_id) #print str(s) result = s.execute() client = result.fetchone() print