[mod_python] Breaking things after upgrading MySQLdb (to 1.2.2)

Graham Dumpleton graham.dumpleton at gmail.com
Wed Jun 6 19:31:40 EDT 2007


These sorts of issues on upgrades are usually cause by modules in PHP,
other Apache modules or Python MySQLdb client libraries having been
compiled against different versions of MySQLdb shared libraries.

You need to ensure you rebuild all such packages which use MySQLdb so
they all use the same version.

Graham

On 07/06/07, Dirk van Oosterbosch, IR labs <labs at ixopusada.com> wrote:
> Hi Guys,
>
> I'm not sure if this is the right list for this problem, but I guess I try.
>
> I just upgraded my MySQLdb python database module (from IIRC 1.2.0  to
> 1.2.2). But now things break down. I'm getting the following error:
> ImportError: Inappropriate file type for dynamic loading
>
> If I import MySQLdb from the interpreter there seem no problems.
> Python 2.4.1 (#2, Mar 31 2005, 00:05:10)
> [GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin
> >>> import MySQLdb
> >>> MySQLdb.version_info
> (1, 2, 2, 'final', 0)
>
> But when I try to run one of my web-apps the following error (pasted here
> below) gets printed in the log.
>
> Does anybody of you know what I'm doing wrong or what I miss to fix this?
>
> Thanks
> dirk
>
>
> [Wed Jun 06 15:46:13 2007] [notice] mod_python: Creating 8 session mutexes
> based on 6 max processes and 25 max threads.
> [Wed Jun 06 15:46:13 2007] [notice] mod_python: using mutex_directory /tmp
> [Wed Jun 06 15:46:13 2007] [notice] Apache/2.0.55 (Unix) mod_python/3.3.0b
> Python/2.4.1 configured -- resuming normal operations
> [Wed Jun 06 15:46:28 2007] [notice] mod_python (pid=5418,
> interpreter='sol740satelite.lan'): Importing module
> '/Users/dirk/Sites/www/python/translate.py'
> [Wed Jun 06 15:46:28 2007] [notice] mod_python (pid=5418,
> interpreter='sol740satelite.lan'): Importing module
> '/Users/dirk/Sites/www/python/LocalConf.py'
> [Wed Jun 06 15:46:28 2007] [error] [client ::1] mod_python (pid=5418,
> interpreter='sol740satelite.lan', phase='PythonTransHandler',
> handler='translate'): Application error
> [Wed Jun 06 15:46:28 2007] [error] [client ::1] ServerName:
> 'sol740satelite.lan'
> [Wed Jun 06 15:46:28 2007] [error] [client ::1] DocumentRoot:
> '/Users/dirk/Sites/www'
> [Wed Jun 06 15:46:28 2007] [error] [client ::1] URI: '/admin/'
> [Wed Jun 06 15:46:28 2007] [error] [client ::1] Location: None
> [Wed Jun 06 15:46:28 2007] [error] [client ::1] Directory: None
> [Wed Jun 06 15:46:28 2007] [error] [client ::1] Filename: None
> [Wed Jun 06 15:46:28 2007] [error] [client ::1] PathInfo: None
> [Wed Jun 06 15:46:28 2007] [error] [client ::1] Traceback (most recent call
> last):
> [Wed Jun 06 15:46:28 2007] [error] [client ::1]   File
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/mod_python/importer.py",
> line 1537, in HandlerDispatch\n    default=default_handler, arg=req,
> silent=hlist.silent)
> [Wed Jun 06 15:46:28 2007] [error] [client ::1]   File
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/mod_python/importer.py",
> line 1202, in _process_target\n    module = import_module(module_name,
> path=path)
> [Wed Jun 06 15:46:28 2007] [error] [client ::1]   File
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/mod_python/importer.py",
> line 296, in import_module\n    log, import_path)
> [Wed Jun 06 15:46:28 2007] [error] [client ::1]   File
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/mod_python/importer.py",
> line 680, in import_module\n    execfile(file, module.__dict__)
> [Wed Jun 06 15:46:28 2007] [error] [client ::1]   File
> "/Users/dirk/Sites/www/python/translate.py", line 30, in
> ?\n    import LocalConf
> [Wed Jun 06 15:46:28 2007] [error] [client ::1]   File
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/mod_python/importer.py",
> line 991, in load_module\n    return
> _global_modules_cache.import_module(self.__file)
> [Wed Jun 06 15:46:28 2007] [error] [client ::1]   File
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/mod_python/importer.py",
> line 680, in import_module\n    execfile(file, module.__dict__)
> [Wed Jun 06 15:46:28 2007] [error] [client ::1]   File
> "/Users/dirk/Sites/www/python/LocalConf.py", line 22, in
> ?\n    import MySQLdb
> [Wed Jun 06 15:46:28 2007] [error] [client ::1]   File
> "build/bdist.darwin-8.9.0-Power_Macintosh/egg/MySQLdb/__init__.py",
> line 19, in ?
> [Wed Jun 06 15:46:28 2007] [error] [client ::1]   File
> "build/bdist.darwin-8.9.0-Power_Macintosh/egg/_mysql.py",
> line 7, in ?
> [Wed Jun 06 15:46:28 2007] [error] [client ::1]   File
> "build/bdist.darwin-8.9.0-Power_Macintosh/egg/_mysql.py",
> line 6, in __bootstrap__
> [Wed Jun 06 15:46:28 2007] [error] [client ::1] ImportError: Inappropriate
> file type for dynamic loading
>
>
>
> -----------------------------
> Dirk van Oosterbosch
> de Wittenstraat 225
> 1052 AT Amsterdam
> the Netherlands
>
> http://labs.ixopusada.com
> -----------------------------
>
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
>
>


More information about the Mod_python mailing list