7 messages in com.googlegroups.sqlalchemy[sqlalchemy] Re: DPAPI Error| From | Sent On | Attachments |
|---|---|---|
| jon | 29 Jan 2008 18:14 | |
| Michael Bayer | 29 Jan 2008 19:08 | |
| jon | 30 Jan 2008 11:09 | |
| Michael Bayer | 30 Jan 2008 11:33 | |
| jon | 30 Jan 2008 12:14 | |
| Michael Bayer | 30 Jan 2008 13:09 | |
| jon | 21 Feb 2008 14:35 |
| Subject: | [sqlalchemy] Re: DPAPI Error![]() |
|---|---|
| From: | jon (jon....@lucasfilm.com) |
| Date: | 02/21/2008 02:35:30 PM |
| List: | com.googlegroups.sqlalchemy |
Mike,
Sorry to get back to you on this so late. I installed 0.4.3 and things seem to be humming along nicely. Should that be the case or should I expect some madness from my app soon?
Thanks a million!
Jon
On Jan 30, 1:09 pm, Michael Bayer <mike...@zzzcomputing.com> wrote:
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 <mike...@zzzcomputing.com> 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 sqla...@googlegroups.com
To unsubscribe from this group, send email to
sqla...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---




