[Zope] - re: ZSolidDA name error? additional info
Jim Fulton
jim.fulton@digicool.com
Fri, 08 Jan 1999 12:30:49 -0500
BScherer@mobile.bam.com wrote:
>
> As usual, I spoke too soon. I clicked on the Browse tab of the DA details page and got a 'Sorry, an error occured'. The source of this reveals:
>
> ----------------------------------------------------------
> Traceback (innermost last):
> File /usr/local/src/Zope-1.9.0-src/lib/python/ZPublisher/Publish.py, line 870, in publish_module
> File /usr/local/src/Zope-1.9.0-src/lib/python/ZPublisher/Publish.py, line 583, in publish
> (Info: /zopeland/Solid_database_connection/manage_browse)
> File /usr/local/src/Zope-1.9.0-src/lib/python/Globals.py, line 234, in __call__
> (Object: manage_browse)
> File /usr/local/src/Zope-1.9.0-src/lib/python/DocumentTemplate/DT_String.py, line 514, in __call__
> (Object: manage_browse)
> File /usr/local/src/Zope-1.9.0-src/lib/python/TreeDisplay/TreeTag.py, line 166, in render
> (Object: a tree tag)
> File /usr/local/src/Zope-1.9.0-src/lib/python/TreeDisplay/TreeTag.py, line 256, in tpRender
> (Object: RoleManager)
> File /usr/local/src/Zope-1.9.0-src/lib/python/TreeDisplay/TreeTag.py, line 493, in tpRenderTABLE
> (Object: RoleManager)
> (Info: ([85, []], {'childless_decoration': '', 'id': 'tpId', 'branches': 'tpValues', 'header': 'info', 'url': 'tpURL'}, ([85, []],), ([85, []],)))
> File /usr/local/src/Zope-1.9.0-src/lib/python/TreeDisplay/TreeTag.py, line 310, in tpRenderTABLE
> (Object: ACTIVITY_CODES)
> File lib/python/Products/ZSolidDA/DABase.py, line 183, in tpValues
> (Object: ACTIVITY_CODES)
> File lib/python/Products/ZSolidDA/db.py, line 293, in columns
> NameError: error
>
> ---------------------------------------------------------
>
> The relevant code is:
> ---------------------------------------------------------
> def columns(self, table_name):
> stmt=self.stmt
> try: self._apply(SQLExecDirect,
> (stmt, 'select * from %s where 1=2' % table_name))
> 293 --> except error, v:
> state, native, mess = v
> raise error, "%s (%s)" % (mess, state)
> ---------------------------------------------------------
>
> So, error is not defined at this point.
Add:
error='Solid Database Error'
at the top of the file. This'll be fixed in the next release.
(There's a similar bug in the ZODBCDA, which I will also
fix. :(
)
> Removing it and leaving v shows that v is not defined here either.
v is defined by the except statement.
Jim
--
Jim Fulton mailto:jim@digicool.com
Technical Director (888) 344-4332 Python Powered!
Digital Creations http://www.digicool.com http://www.python.org
Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission. Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.