Re: Fail import with SWIG generated imp.load_module ?

Discussion in 'Python' started by MRAB, Dec 14, 2010.

  1. MRAB

    MRAB Guest

    On 14/12/2010 08:43, Hvidberg, Martin wrote:
    > I'm trying to load a module GDAL into a Python script.
    >
    > The loader/binderthat is then called, seems to be generated by SWIG, a
    > project with which I'm unfortunately not familiar.
    >
    > The part of the SWIG generated code that fails on me is as follow:
    >

    [snip]
    It _might_ be that imp.load_module(...) is raising an exception, so it
    doesn't assign to '_mod', and then it tries to run the 'finally' block
    and return _mod. This raises the exception you see and hides the
    original cause.
    MRAB, Dec 14, 2010
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David Hirschfield

    Help: Trouble with imp.load_module

    David Hirschfield, Dec 11, 2007, in forum: Python
    Replies:
    0
    Views:
    270
    David Hirschfield
    Dec 11, 2007
  2. Gabriel Genellina

    Re: Help: Trouble with imp.load_module

    Gabriel Genellina, Dec 17, 2007, in forum: Python
    Replies:
    0
    Views:
    373
    Gabriel Genellina
    Dec 17, 2007
  3. Paul Sijben
    Replies:
    1
    Views:
    375
    Christian Heimes
    Feb 1, 2008
  4. Replies:
    2
    Views:
    1,037
  5. Iuri
    Replies:
    0
    Views:
    160
Loading...

Share This Page