hey jon -
OK, I found an issue that is very likely to be what you are
experiencing; easy to fix as always but unless you can run on SVN
trunk r4106, you'll have to workaround it.
There may be a schema identifier somewhere in your app that contains
the identifier 'roleseq' as a unicode string, which is getting cached
as a u''.
So if you can't hunt that down (which you shouldn't have to), you can
force it to cache the non-unicode string for now if you do this to
your engine as early as possible (i.e. before the incorrect value gets
cached):
engine.dialect.identifier_preparer.format_sequence(Sequence('roleseq'))
hope thats the issue.
- mike
On Jan 30, 2008, at 3:14 PM, jon wrote:
>
> Hi Mike,
>
> Thanks for your patience...here is the entry I have for that table in
> model/__init__.py
>
> role_table = Table('role', metadata,
> Column('roleseq', Integer, Sequence('roleseq'),
> primary_key=True),
>
> I know that I specifically didn't set things up for Unicode in this
> app either...this file is the only one that contains the Sequence
> declaration.
>
> Thanks,
>
> Jon
>
> On Jan 30, 11:34 am, Michael Bayer <[EMAIL PROTECTED]> wrote:
>> On Jan 30, 2008, at 2:10 PM, jon wrote:
>>
>>
>>
>>
>>
>>> 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?
>>
>> jon -
>>
>> none of that has anything to do with the error message here. You
>> need
>> to grep thorugh your code for the specific string :
>> Sequence(u'roleseq'), or something equivalent. I know its there
>> because the Oracle dialect does not invent or reflect any sequence
>> names. You need to make that sequence name into a regular string
>> object; as above you'd take out the "u" inside the parenthesis.
>>
>> let me know when you find it as I'd like to confirm this is the
>> source
>> of the issue....thanks !
>>
>> - mike
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---