This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: AttributeError: 'module' object has no attribute 'exc_traceback'
Type: crash Stage:
Components: None Versions: Python 2.5
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, polavenki
Priority: normal Keywords:

Created on 2010-11-10 06:29 by polavenki, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
findcaller_modi.py polavenki, 2010-11-10 06:29 Attached is the file contains find caller and caller frame funcitons which were modified to our businees requirement
Messages (2)
msg120913 - (view) Author: Peda Venkateswarlu Pola (polavenki) Date: 2010-11-10 06:29
As we have some new requirements in standard logging, We have written wrapper logger. This includes find caller which gives information about filename , line number , class name and method name. As i found that python logger doesn't give class name so we get the code from python logger and modified to our requirement. 

We end up with the following error intermittently from the function "currentframe()" .

"AttributeError: 'module' object has no attribute 'exc_traceback'"


def currentframe():
    """Return the frame object for the caller's stack frame."""
    try:
        raise Exception
    except:
        return sys.exc_traceback.tb_frame.f_back

Please help me out ASAP.

Great thanks in advance.
msg120915 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-11-10 07:24
sys.exc_traceback is deprecated, please use sys.exc_info().  Also note that this tracker is not a place to get help; the python-list mailing list (a.k.a. comp.lang.python newsgroup) is the right place for that.
History
Date User Action Args
2022-04-11 14:57:08adminsetgithub: 54589
2010-11-10 07:24:19georg.brandlsetstatus: open -> closed

nosy: + georg.brandl
messages: + msg120915

resolution: not a bug
2010-11-10 06:29:23polavenkicreate