[EMAIL PROTECTED] wrote:
I'm using some legacy code that has a user-defined exception in it.

The top level program includes this line

from TestRunError import *

It also imports several other modules.  These other modules do not
explicitly import TestRunError.  TestRunError is raised in various
places throughout the modules.

There are a few cases where something goes wrong with the program and
I get this error:

FATAL ERROR: global name 'TestRunError' is not defined

I realize this is kind of a silly question to ask in the general sense
without showing more of the code, but does anyone have any suggestions
as to the most likely causes of this error coming up?  Could it be
something like an error happening where it is not explicitly in a try
block, or an error happening while I'm already in an except block, or
something like that?

Thanks,
  --JMike

Please post the entire traceback and we might actually be able to help.

The traceback will show a line number where it failed, you can look to see
what is going on at the time.

It is more likely a scoping issue where TestRunError isn't defined in the scope where the exception is being raised.

-Larry
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to