Thanks a lot for digging into this one Christoph, I had no idea where that segfault was coming from. I'll test it and push it as soon as I can.

Cheers,
Carlos

El 04/03/13 16:06, [email protected] escribió:
Digging a little bit deeper, I find that the problem occurs, when OpenGL.Tk is being imported by walk_packages, because OpenGL.Tk requires Togl which is not present. But this problem does not result in an ImportError but instead in a TclError, which is not being caught by walk_packages by default. The following fixes the issue:

diff -r d936ae481141 spyderlib/utils/module_completion.py
--- a/spyderlib/utils/module_completion.py Sun Mar 03 15:20:34 2013 -0500 +++ b/spyderlib/utils/module_completion.py Mon Mar 04 22:04:22 2013 +0100
@@ -136,10 +136,12 @@

 def get_submodules(mod):
     """Get all submodules of a given module"""
+    def catch_all(module):
+        pass
     try:
         m = __import__(mod)
         submodules = [mod]
-        submods = pkgutil.walk_packages(m.__path__, m.__name__ + '.')
+ submods = pkgutil.walk_packages(m.__path__, m.__name__ + '.',catch_all)
         for sm in submods:
             sm_name = sm[1]
             submodules.append(sm_name)

cheers,
Christoph

Am Montag, 4. März 2013 09:08:09 UTC+1 schrieb [email protected]:

    Hi,
    I can reproduce the issue here. on the revision just before this
    one everything seems to be fine. OS X 10.8. Traceback follows.

    Cheers,
    Christoph

    Executing Spyder from source checkout
    Revision e75a44b270ba:2652, Branch: default
    01. Patched sys.path with
    /Users/christoph/Documents/Prog/Python/spyderlib-hg/spyderlib-rescue
    02. No PySide detected, using PyQt4 if available
    
/Library/Python/2.7/site-packages/Pygments-1.5-py2.7.egg/pygments/plugin.py:39:
    UserWarning: Module rope was already imported from
    
/Users/christoph/Documents/Prog/Python/spyderlib-hg/spyderlib-rescue/rope/__init__.pyc,
    but /usr/local/lib/python2.7/site-packages is being added to sys.path
      import pkg_resources
    03. Imported Spyder 2.2.0beta2
        [Python 2.7.3 64bits, Qt 4.8.2, PyQt4 (API v2) 4.9.4 on Darwin]
    0x. Enforcing parent console (Windows only)
    04. Executing spyder.main()
    2013-03-04 09:01:26.811 Python[15272:7303] -[QNSApplication
    _setup:]: unrecognized selector sent to instance 0x7fb326004da0
    2013-03-04 09:01:26.811 Python[15272:7303] An uncaught exception
    was raised
    2013-03-04 09:01:26.812 Python[15272:7303] -[QNSApplication
    _setup:]: unrecognized selector sent to instance 0x7fb326004da0
    2013-03-04 09:01:26.812 Python[15272:7303] (
        0   CoreFoundation 0x00007fff8bc800a6 __exceptionPreprocess + 198
        1   libobjc.A.dylib 0x00007fff870dd3f0 objc_exception_throw + 43
        2   CoreFoundation 0x00007fff8bd166ea -[NSObject(NSObject)
    doesNotRecognizeSelector:] + 186
        3   CoreFoundation 0x00007fff8bc6e5ce ___forwarding___ + 414
        4   CoreFoundation 0x00007fff8bc6e3b8 _CF_forwarding_prep_0 + 232
        5   Tk 0x00000001152155c0 TkpInit + 453
        6   Tk 0x0000000115191a66 Tk_Init + 1816
        7   _tkinter.so 0x000000011506204b Tcl_AppInit + 82
        8   _tkinter.so 0x000000011505e045 Tkinter_Create + 967
        9   Python 0x000000010446adde PyEval_EvalFrameEx + 7967
        10  Python 0x0000000104468e84 PyEval_EvalCodeEx + 1857
        11  Python 0x00000001044118d4 function_call + 333
        12  Python 0x00000001043f44b9 PyObject_Call + 97
        13  Python 0x00000001043fed5d instancemethod_call + 494
        14  Python 0x00000001043f44b9 PyObject_Call + 97
        15  Python 0x000000010446e85c PyEval_CallObjectWithKeywords + 168
        16  Python 0x00000001043fcfab PyInstance_New + 267
        17  Python 0x00000001043f44b9 PyObject_Call + 97
        18  Python 0x000000010446afca PyEval_EvalFrameEx + 8459
        19  Python 0x0000000104468e84 PyEval_EvalCodeEx + 1857
        20  Python 0x000000010446873d PyEval_EvalCode + 54
        21  Python 0x000000010447c50e PyImport_ExecCodeModuleEx + 241
        22  Python 0x000000010447f09d load_source_module + 1169
        23  Python 0x000000010447f326 load_package + 371
        24  Python 0x000000010447fa82 import_submodule + 327
        25  Python 0x000000010447f649 load_next + 260
        26  Python 0x000000010447d97e PyImport_ImportModuleLevel + 1212
        27  Python 0x00000001044644d8 builtin___import__ + 136
        28  Python 0x000000010446adde PyEval_EvalFrameEx + 7967
        29  Python 0x00000001044091b4 gen_send_ex + 240
        30  Python 0x0000000104469433 PyEval_EvalFrameEx + 1396
        31  Python 0x000000010446f071 fast_function + 173
        32  Python 0x000000010446ae6d PyEval_EvalFrameEx + 8110
        33  Python 0x000000010446f071 fast_function + 173
        34  Python 0x000000010446ae6d PyEval_EvalFrameEx + 8110
        35  Python 0x0000000104468e84 PyEval_EvalCodeEx + 1857
        36  Python 0x00000001044118d4 function_call + 333
        37  Python 0x00000001043f44b9 PyObject_Call + 97
        38  Python 0x00000001043fed5d instancemethod_call + 494
        39  Python 0x00000001043f44b9 PyObject_Call + 97
        40  Python 0x000000010446e85c PyEval_CallObjectWithKeywords + 168
        41  sip.so 0x0000000104e939e2 sip_api_call_method + 200
        42  QtCore.so 0x0000000104eaf024
    _Z15sipVH_QtCore_1116PyGILState_STATEP7_object + 43
        43  QtCore.so 0x0000000104edea0d _ZN10sipQThread3runEv + 109
        44  QtCore 0x00000001051867df _ZN14QThreadPrivate5startEPv + 373
        45  libsystem_c.dylib 0x00007fff8a9ae742 _pthread_start + 327
        46  libsystem_c.dylib 0x00007fff8a99b181 thread_start + 13
    )


    Am Dienstag, 26. Februar 2013 21:46:30 UTC+1 schrieb Carlos Córdoba:

        It's working fine for me on both Snow Leopard and Lion.

        El 25/02/13 13:46, Carlos Córdoba escribió:
        I'll take a look at it, thanks for reporting.

        Cheers,
        Carlos

        El 25/02/13 13:44, Trémouilles David escribió:
        Hello,

        I've just detected that revision 2580 introduces a segfault on
        my Mac (see traceback below). This revision comment is:
        " Generate the list of extension modules for Rope in a Qthread"

        Using: Python 2.7.3 64bits, Qt 4.8.4, PyQt4 (API v1) 4.9.6
        on Darwin


        David

        ~ $ spyder
        2013-02-25 19:24:32.539 Python[894:5f0b] -[QNSApplication
        _setup:]: unrecognized selector sent to instance 0x7fee95b8e4c0
        2013-02-25 19:24:32.540 Python[894:5f0b] An uncaught
        exception was raised
        2013-02-25 19:24:32.540 Python[894:5f0b] -[QNSApplication
        _setup:]: unrecognized selector sent to instance 0x7fee95b8e4c0
        2013-02-25 19:24:32.542 Python[894:5f0b] (
            0   CoreFoundation 0x00007fff8ecf0f56
        __exceptionPreprocess + 198
            1   libobjc.A.dylib 0x00007fff8e412d5e
        objc_exception_throw + 43
            2   CoreFoundation 0x00007fff8ed7d1be -[NSObject
        doesNotRecognizeSelector:] + 190
            3   CoreFoundation 0x00007fff8ecdde23 ___forwarding___ + 371
            4   CoreFoundation 0x00007fff8ecddc38
        _CF_forwarding_prep_0 + 232
            5   libtk8.6.dylib 0x00000001222305c8 TkpInit + 408
            6   libtk8.6.dylib 0x0000000122199ce8 Initialize + 1928
            7   _tkinter.so 0x0000000121f18122 Tcl_AppInit + 82
            8   _tkinter.so 0x0000000121f13b87 Tkinter_Create + 967
            9   Python 0x000000010f77c0ab PyEval_EvalFrameEx + 8379
            10  Python 0x000000010f779f94 PyEval_EvalCodeEx + 2180
            11  Python 0x000000010f70a1f8 function_call + 344
            12  Python 0x000000010f6e550f PyObject_Call + 95
            13  Python 0x000000010f6f1647 instancemethod_call + 487
            14  Python 0x000000010f6e550f PyObject_Call + 95
            15  Python 0x000000010f781ba9
        PyEval_CallObjectWithKeywords + 185
            16  Python 0x000000010f6ef5da PyInstance_New + 282
            17  Python 0x000000010f6e550f PyObject_Call + 95
            18  Python 0x000000010f77c371 PyEval_EvalFrameEx + 9089
            19  Python 0x000000010f779f94 PyEval_EvalCodeEx + 2180
            20  Python 0x000000010f779706 PyEval_EvalCode + 54
            21  Python 0x000000010f795403 PyImport_ExecCodeModuleEx
        + 243
            22  Python 0x000000010f7986ed load_source_module + 1293
            23  Python 0x000000010f798940 load_package + 368
            24  Python 0x000000010f7991fc import_submodule + 348
            25  Python 0x000000010f798d10 load_next + 256
            26  Python 0x000000010f796ab2 PyImport_ImportModuleLevel
        + 1330
            27  Python 0x000000010f774b78 builtin___import__ + 136
            28  Python 0x000000010f77c0ab PyEval_EvalFrameEx + 8379
            29  Python 0x000000010f6ff4ab gen_send_ex + 235
            30  Python 0x000000010f77a80d PyEval_EvalFrameEx + 2077
            31  Python 0x000000010f782413 fast_function + 195
            32  Python 0x000000010f77c15c PyEval_EvalFrameEx + 8556
            33  Python 0x000000010f782413 fast_function + 195
            34  Python 0x000000010f77c15c PyEval_EvalFrameEx + 8556
            35  Python 0x000000010f779f94 PyEval_EvalCodeEx + 2180
            36  Python 0x000000010f70a1f8 function_call + 344
            37  Python 0x000000010f6e550f PyObject_Call + 95
            38  Python 0x000000010f6f1647 instancemethod_call + 487
            39  Python 0x000000010f6e550f PyObject_Call + 95
            40  Python 0x000000010f781ba9
        PyEval_CallObjectWithKeywords + 185
            41  sip.so 0x0000000111bdf316 sip_api_call_method + 200
            42  QtCore.so 0x000000011150eaff
        
_Z15sipVH_QtCore_1116PyGILState_STATEPFvP17_sipSimpleWrapperES1_P7_object
        + 47
            43  QtCore.so 0x00000001115444cb _ZN10sipQThread3runEv + 107
            44  QtCore 0x0000000111804bc8
        _ZN14QThreadPrivate5startEPv + 504
            45  libsystem_c.dylib 0x00007fff9a6938bf _pthread_start
        + 335
            46  libsystem_c.dylib 0x00007fff9a696b75 thread_start + 13
        )
        2013-02-25 19:24:32.543 Python[894:5f0b] *** Terminating app
        due to uncaught exception 'NSInvalidArgumentException',
        reason: '-[QNSApplication _setup:]: unrecognized selector
        sent to instance 0x7fee95b8e4c0'
        *** First throw call stack:
        (
            0   CoreFoundation 0x00007fff8ecf0f56
        __exceptionPreprocess + 198
            1   libobjc.A.dylib 0x00007fff8e412d5e
        objc_exception_throw + 43
            2   CoreFoundation 0x00007fff8ed7d1be -[NSObject
        doesNotRecognizeSelector:] + 190
            3   CoreFoundation 0x00007fff8ecdde23 ___forwarding___ + 371
            4   CoreFoundation 0x00007fff8ecddc38
        _CF_forwarding_prep_0 + 232
            5   libtk8.6.dylib 0x00000001222305c8 TkpInit + 408
            6   libtk8.6.dylib 0x0000000122199ce8 Initialize + 1928
            7   _tkinter.so 0x0000000121f18122 Tcl_AppInit + 82
            8   _tkinter.so 0x0000000121f13b87 Tkinter_Create + 967
            9   Python 0x000000010f77c0ab PyEval_EvalFrameEx + 8379
            10  Python 0x000000010f779f94 PyEval_EvalCodeEx + 2180
            11  Python 0x000000010f70a1f8 function_call + 344
            12  Python 0x000000010f6e550f PyObject_Call + 95
            13  Python 0x000000010f6f1647 instancemethod_call + 487
            14  Python 0x000000010f6e550f PyObject_Call + 95
            15  Python 0x000000010f781ba9
        PyEval_CallObjectWithKeywords + 185
            16  Python 0x000000010f6ef5da PyInstance_New + 282
            17  Python 0x000000010f6e550f PyObject_Call + 95
            18  Python 0x000000010f77c371 PyEval_EvalFrameEx + 9089
            19  Python 0x000000010f779f94 PyEval_EvalCodeEx + 2180
            20  Python 0x000000010f779706 PyEval_EvalCode + 54
            21  Python 0x000000010f795403 PyImport_ExecCodeModuleEx
        + 243
            22  Python 0x000000010f7986ed load_source_module + 1293
            23  Python 0x000000010f798940 load_package + 368
            24  Python 0x000000010f7991fc import_submodule + 348
            25  Python 0x000000010f798d10 load_next + 256
            26  Python 0x000000010f796ab2 PyImport_ImportModuleLevel
        + 1330
            27  Python 0x000000010f774b78 builtin___import__ + 136
            28  Python 0x000000010f77c0ab PyEval_EvalFrameEx + 8379
            29  Python 0x000000010f6ff4ab gen_send_ex + 235
            30  Python 0x000000010f77a80d PyEval_EvalFrameEx + 2077
            31  Python 0x000000010f782413 fast_function + 195
            32  Python 0x000000010f77c15c PyEval_EvalFrameEx + 8556
            33  Python 0x000000010f782413 fast_function + 195
            34  Python 0x000000010f77c15c PyEval_EvalFrameEx + 8556
            35  Python 0x000000010f779f94 PyEval_EvalCodeEx + 2180
            36  Python 0x000000010f70a1f8 function_call + 344
            37  Python 0x000000010f6e550f PyObject_Call + 95
            38  Python 0x000000010f6f1647 instancemethod_call + 487
            39  Python 0x000000010f6e550f PyObject_Call + 95
            40  Python 0x000000010f781ba9
        PyEval_CallObjectWithKeywords + 185
            41  sip.so 0x0000000111bdf316 sip_api_call_method + 200
            42  QtCore.so 0x000000011150eaff
        
_Z15sipVH_QtCore_1116PyGILState_STATEPFvP17_sipSimpleWrapperES1_P7_object
        + 47
            43  QtCore.so 0x00000001115444cb _ZN10sipQThread3runEv + 107
            44  QtCore 0x0000000111804bc8
        _ZN14QThreadPrivate5startEPv + 504
            45  libsystem_c.dylib 0x00007fff9a6938bf _pthread_start
        + 335
            46  libsystem_c.dylib 0x00007fff9a696b75 thread_start + 13
        )
        terminate called throwing an exceptionAbort trap: 6
-- You received this message because you are subscribed to the
        Google Groups "spyder" group.
        To unsubscribe from this group and stop receiving emails
        from it, send an email to [email protected].
        To post to this group, send email to [email protected].
        Visit this group at
        http://groups.google.com/group/spyderlib?hl=en
        <http://groups.google.com/group/spyderlib?hl=en>.
        For more options, visit
        https://groups.google.com/groups/opt_out
        <https://groups.google.com/groups/opt_out>.




--
You received this message because you are subscribed to the Google Groups "spyder" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/spyderlib?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups 
"spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/spyderlib?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to