From: SourceForge.net <no...@so...> - 2003-01-15 03:12:12
|
Patches item #642612, was opened at 2002-11-22 16:38 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=304866&aid=642612&group_id=4866 Category: MiscUtils Group: None Status: Open Resolution: None Priority: 5 Submitted By: Stuart Donaldson (stuartd) >Assigned to: Stuart Donaldson (stuartd) Summary: FancyTraceback fails if source missing Initial Comment: The Fancy Traceback display can fail to work if the source files of all files in the traceback do not exist. This can be the case if the .py files have since been removed, or if the .py files are not in the same path as the .pyc are imported. In my scenario, python is installed from an rpm, the rpm pre-compiles the .py files in the library into .pyc files, however it does all of this in a temporary directory which no longer exists in my installed system. The .pyc files claim their source file is actually in that temporary directory. So if I look at the module ihooks, I see its source file does not exist, even though it is in the same directory as ihooks.pyc. The problem appears to be that MiscUtils/inspect.py getsourcefile() tries to find the file on the sys.path. However if the filename does not exist on that path, it does not return anything, which results in cgitb.py failing when it tries to interpret None as a string. This patch simply adds a 'return filename' at the end of inspect.py:getsourcefile() so it will not return None. ---------------------------------------------------------------------- Comment By: Stuart Donaldson (stuartd) Date: 2003-01-14 19:14 Message: Logged In: YES user_id=326269 This patch is being worked on by the developer listed in the Assigned field. A resolution should be forthcoming. If you have any questions or comments on this item, please contact the developer. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=304866&aid=642612&group_id=4866 |