ytrstu / winpdb

Automatically exported from code.google.com/p/winpdb
0 stars 0 forks source link

import error output shorter + solution #23

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
thank you for you great program!

What steps will reproduce the problem?
1. import something with an error maybe over 3 modules
2. using pyshell or console
3.

What is the expected output? What do you see instead?

the import statement exception output is disturbingly counfusing long
>>>>>>>>>>>>>>>>>>>>  output before >>>>>>>>>>>>>>>>>>>>>

Traceback (most recent call last):
  File "C:\Users\wollknaeul\Desktop\distobj\test\runAll.py", line 36, in <module
>
    mod = __import__(modname)
  File "C:\Python27\lib\site-packages\rpdb2.py", line 13487, in rpdb2_import_wra
pper
    m = g_import(*args, **kwargs)
  File "C:\Users\wollknaeul\Desktop\distobj\test\test_Manager.py", line 3, in <m
odule>
    from stream.Manager import Manager
  File "C:\Python27\lib\site-packages\rpdb2.py", line 13487, in rpdb2_import_wra
pper
    m = g_import(*args, **kwargs)
  File "..\stream\Manager.py", line 3, in <module>
    from distobj.object.GlobalObject import *
  File "C:\Python27\lib\site-packages\rpdb2.py", line 13487, in rpdb2_import_wra
pper
    m = g_import(*args, **kwargs)
ImportError: No module named object.GlobalObject
Traceback (most recent call last):
  File "C:\Users\wollknaeul\Desktop\distobj\test\runAll.py", line 36, in <module
>
    mod = __import__(modname)
  File "C:\Python27\lib\site-packages\rpdb2.py", line 13487, in rpdb2_import_wra
pper
    m = g_import(*args, **kwargs)
  File "C:\Users\wollknaeul\Desktop\distobj\test\test_Manager.py", line 3, in <m
odule>
    from stream.Manager import Manager
  File "C:\Python27\lib\site-packages\rpdb2.py", line 13487, in rpdb2_import_wra
pper
    m = g_import(*args, **kwargs)
  File "..\stream\Manager.py", line 3, in <module>
    from distobj.object.GlobalObject import *
  File "C:\Python27\lib\site-packages\rpdb2.py", line 13487, in rpdb2_import_wra
pper
    m = g_import(*args, **kwargs)
ImportError: No module named object.GlobalObject

>>>>>>>>>>>>>>>>>>>>  output after >>>>>>>>>>>>>>>>>>>>>

Traceback (most recent call last):
  File "C:\Users\wollknaeul\Desktop\distobj\test\runAll.py", line 36, in <module
>
    mod = __import__(modname)
  File "C:\Users\wollknaeul\Desktop\distobj\test\test_Manager.py", line 3, in <m
odule>
    from stream.Manager import Manager
  File "..\stream\Manager.py", line 3, in <module>
    from distobj.object.GlobalObject import *
  File "C:\Python27\lib\site-packages\rpdb2.py", line 13488, in rpdb2_import_wra
pper
    m = g_import(*args, **kwargs)
ImportError: No module named object.GlobalObject
Traceback (most recent call last):
  File "C:\Users\wollknaeul\Desktop\distobj\test\runAll.py", line 36, in <module
>
    mod = __import__(modname)
  File "C:\Users\wollknaeul\Desktop\distobj\test\test_Manager.py", line 3, in <m
odule>
    from stream.Manager import Manager
  File "..\stream\Manager.py", line 3, in <module>
    from distobj.object.GlobalObject import *
  File "C:\Python27\lib\site-packages\rpdb2.py", line 13488, in rpdb2_import_wra
pper
    m = g_import(*args, **kwargs)
ImportError: No module named object.GlobalObject

<<<<<<<<<<<<<<<<<<<<  output end   <<<<<<<<<<<<<<<<<<<<<

What version of the product are you using? On what operating system?
Windows 7 64bit
rpdb2.py - version 2.4.8

Please provide any additional information below.
I shortened the ImportError traceback print this way:

>>>>>>>>>>>>>>>>>>>> line 13480ff before >>>>>>>>>>>>>>>>>>>

    #
    # rpdb2 avoids stepping through this 
    # function (rpdb2_import_wrapper) to
    # prevent confusion when stepping into
    # an import statement.
    #
    m = g_import(*args, **kwargs)

    if name != 'gtk':
        return m

>>>>>>>>>>>>>>>>>>>> line 13480ff after >>>>>>>>>>>>>>>>>>>

    #
    # rpdb2 avoids stepping through this 
    # function (rpdb2_import_wrapper) to
    # prevent confusion when stepping into
    # an import statement.
    #
    try:
        m = g_import(*args, **kwargs)
    except:
        ty, er, tb = sys.exc_info()
        if tb.tb_next:
            raise ty, er, tb.tb_next
        raise ty, er, tb

    if name != 'gtk':
        return m

>>>>>>>>>>>>>>>>>>>> line 13480ff end   >>>>>>>>>>>>>>>>>>>

if you would provide this to others the may be thankful

Original issue reported on code.google.com by niccokun...@googlemail.com on 12 Sep 2011 at 5:02