Thanks for getting back to me and apologies for the stacktrace
barf ;-)

One thing...I have the following line in my environment.py:

config['pylons.g'].sa_engine = engine_from_config(config,
'sqlalchemy.', convert_unicode=True, pool_size=1, max_overflow=3)

I can turn on/off the convert_unicode option and I still get the same
error. I spoke with one of our DBAs and he said the results of
roleseq.nextval is a number. SA is looking for a String here or None,
according to the exception error:

exceptions.TypeError: expecting None or a string

Sooo...is this still an SA thing and if so what do you suggest as a
workaround?

Thanks,

Jon

On Jan 29, 7:08 pm, Michael Bayer <[EMAIL PROTECTED]> wrote:
> On Jan 29, 2008, at 9:15 PM, jon wrote:
>
>
>
>
>
> > Hi,
>
> > I've written a small Pylons application to manage some data for a
> > client. It's real basic CRUD stuff here, nothing fancy. I notice
> > though that from time to time the client will try to add new data and
> > she gets this error message:
>
> > DBAPIError: (TypeError) expecting None or a string u'SELECT
> > roleseq.nextval FROM DUAL' {}
>
> > I go over the data and there are no issues...in fact I can input the
> > same data and it saves just fine. Sometimes I do get the error though.
>
> > The rest of the error message is below for reference. Any ideas/
> > pointers/hints as to what's going on here would be great. Hazings
> > welcome too.
>
> that is one hard to read stacktrace :) .   The error looks like a
> unicode string is getting generated when its attempting to execute the
> "roleseq" sequence and cx_oracle is raising a TypeError on that.  So
> my only guess there is perhaps you've defined a Sequence using
> Sequence(u'roleseq').   You should be able to do that in theory but it
> appears like SA is failing to properly encode that string before it
> goes in.   So its an SA bug, but the workaround would be to not use a
> u'' string when defining the Sequence (if thats in fact what's going
> on).
--~--~---------~--~----~------------~-------~--~----~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to