Issue #1 new

Error importing sqlite3

Jerod Santo
created an issue

My app imports sqlite3, which works fine when run on my own machine, but when running the resulting plugin on a separate machine (both running Lion, btw) the app crashes because it can't load the sqlite3 dependency.

My app follows moneyGuru's example pretty closely, but moneyGuru seems to load sqlite3 just fine, so I wasn't sure if it was me or the pluginbuilder.

So I modified your guiskel project to use pluginbuilder instead of py2app and simply added the sqlite3 import to one of the core classes. This is the result when running guiskel.app on the separate machine:

{{{ 10/27/11 11:03:44.963 AM guiskel: pyplugin has encountered a fatal error, and will now terminate. 10/27/11 11:03:44.964 AM guiskel: An uncaught exception was raised during execution of the main script:

ImportError: dlopen(/Users/santo/Desktop/guiskel.app/Contents/Resources/pyplugin.plugin/Contents/Resources/lib/python3.2/lib-dynload/_sqlite3.so, 2): Library not loaded: @executable_path/../Frameworks/libsqlite3.0.8.6.dylib Referenced from: /Users/santo/Desktop/guiskel.app/Contents/Resources/pyplugin.plugin/Contents/Resources/lib/python3.2/lib-dynload/_sqlite3.so Reason: image not found

This may mean that an unexpected error has occurred, or that you do not have all of the dependencies for this bundle. }}}

The only differences I can find in moneyGuru's pyplugin and guiskel's pyplugin is that moneyGuru doesn't even have a libsqlite3.X.X.dylib file in its Frameworks directory, while guiskel (and my app) does.

Let me know if I'm doing something wrong or if there's any more info I can provide to help track down the problem.

Thanks!

Comments (2)

  1. Virgil Dupras repo owner

    I tried the same thing on my machine (adding a sqlite3 import) and the resulting guiskel app works fine on a non-dev machine.

    Past this point, I can only speculate, but is it possible that you have a custom version of sqlite installed on your dev machine (fink, macports whatever)? That could be something pluginbuilder has problems to cope with.

  2. Jerod Santo reporter

    Yes, I have python3 installed view homebrew, which installs its own version of sqlite3 as a dependency. I do not know what differs between this sqlite3 and the one that Apple ships (except for the location, obviously). This could definitely be the differing factor between our two environments.

    I'll dig further into this problem. Any guidance you may have would be much appreciated.

  3. Log in to comment