[Zope] Using Zope and MySQL

Gitte Wange gitte@mmmanager.org
27 Mar 2001 18:16:12 +0200


On 27 Mar 2001 17:01:24 -0800, sam gendler wrote:
> We will never be able to help you unless you provide the content of the
> exception that gets thrown when you attempt to import MySQL.  We can't just
> guess at the problem.


Sorry

Here the error:
------
2001-03-27T15:51:28 ERROR(200) Zope Couldn't import Products.ZMySQLDA
Traceback (innermost last):
  File /usr/local/Zope-2.3.0-linux2-x86/lib/python/OFS/Application.py,
line 530, in import_products
    (Object: string)
  File
/usr/local/Zope-2.3.0-linux2-x86/lib/python/Products/ZMySQLDA/__init__.py, line 91, in ?
  File
/usr/local/Zope-2.3.0-linux2-x86/lib/python/Products/ZMySQLDA/DA.py,
line 91, in ?
  File
/usr/local/Zope-2.3.0-linux2-x86/lib/python/Products/ZMySQLDA/db.py,
line 89, in ?
ImportError: No module named _mysql

Well I haven't - as mentioned earlyer - build the .py files because the
readme file doesn't say anything about building.

Gitte

> 
> --sam
> 
> Gitte Wange wrote:
> 
> > On 27 Mar 2001 13:30:47 +0100, Phil Harris wrote:
> > > Ooh, an faq.
> > >
> > > Search the list for how to fix this, but here goes anyway.
> > >
> > > Basically edit the MySQLModule.c file and change the lines in questions
> > > (384, 1125,1147) and remove the & from after the '=' sign.
> > >
> > > This fixes it everytime in my books.
> > >
> > > YMMV
> > >
> > > Phil
> >
> > Thanks it helped !
> > :-)
> >
> > But know there is another problem:
> > I start python and tries to import MySQL.
> >
> > But guess what - it can't.
> >
> > Now the readme file said something about change -lm to -lgcc and I did
> > but it didn't helt.
> > Any good ideas ?
> >
> > Gitte
> >
> > >
> > > ----- Original Message -----
> > > From: "Gitte Wange" <gitte@mmmanager.org>
> > > To: "Phil Harris" <phil.harris@zope.co.uk>
> > > Cc: <zope@zope.org>
> > > Sent: Tuesday, March 27, 2001 12:16 PM
> > > Subject: Re: [Zope] Using Zope and MySQL
> > >
> > >
> > > > On 27 Mar 2001 13:04:36 +0100, Phil Harris wrote:
> > > > > What error are you getting when compiling?
> > > >
> > > >
> > > > In the ZMySQLDA/src directory I enter (as the readme file says):
> > > > make -f Makefile.pre.in boot
> > > >
> > > > This goes well
> > > >
> > > > Then I enter make and the error output is a follows:
> > > > gcc -fPIC  -I/usr/local/mysql/include -I/usr/include/mysql -g -O2
> > > > -I/usr/include/python1.5 -I/usr/include/python1.5 -DHAVE_CONFIG_H -c
> > > > ./MySQLmodule.c
> > > > ./MySQLmodule.c: In function `pythonify_row':
> > > > ./MySQLmodule.c:238: warning: assignment from incompatible pointer type
> > > > ./MySQLmodule.c: In function `pythonify_res_fields':
> > > > ./MySQLmodule.c:384: invalid lvalue in unary `&'
> > > > ./MySQLmodule.c: In function `STH_fetchdict':
> > > > ./MySQLmodule.c:1125: invalid lvalue in unary `&'
> > > > ./MySQLmodule.c:1147: invalid lvalue in unary `&'
> > > > make: *** [MySQLmodule.o] Error 1
> > > >
> > > > What is wrong ?
> > > >
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "Gitte Wange" <gitte@mmmanager.org>
> > > > > To: "Peter Bengtsson" <peter@grenna.net>
> > > > > Cc: <zope@zope.org>
> > > > > Sent: Tuesday, March 27, 2001 12:01 PM
> > > > > Subject: Re: [Zope] Using Zope and MySQL
> > > > >
> > > > >
> > > > > > I run Linux
> > > > > >
> > > > > > I have tried to compile the ZMySQLDA but it fails everytime.
> > > > > > Yes I have installed the MySQL_devel package
> > > > > >
> > > > > > Gitte
> > > > > >
> > > > > >
> > > > > > On 27 Mar 2001 11:15:28 +0100, Peter Bengtsson wrote:
> > > > > > > Welcome to hell!
> > > > > > >
> > > > > > > Getting Zope to work with MySQL can be either very very easy, and
> > > very
> > > > > very
> > > > > > > difficult.
> > > > > > > It all depends on how well you read the README's and HOWTO's.
> > > > > > >
> > > > > > > Are you using Win32 or *nix?
> > > > > > > ZMySQLDA is almost never a problem. The most pain on the mailing
> > > list is
> > > > > > > about the mysql-python bit.
> > > > > > >
> > > > > > > What's the traceback (when you click the little broken box in
> > > > > > > Control_Panel/Products)
> > > > > > >
> > > > > > > Peter
> > > > > > >
> > > > > > > ----- Original Message -----
> > > > > > > From: "Gitte Wange" <gitte@mmmanager.org>
> > > > > > > To: <zope@zope.org>
> > > > > > > Sent: Tuesday, March 27, 2001 8:16 AM
> > > > > > > Subject: [Zope] Using Zope and MySQL
> > > > > > >
> > > > > > >
> > > > > > > > Hello,
> > > > > > > > Yesterday I tried to setup Zope with MySQL, but the Product I
> > > found on
> > > > > > > > Zope.org to do this, didn't work.
> > > > > > > > Now is there anyone who knows how to setup Zope with MySQL ??
> > > > > > > >
> > > > > > > > Regards,
> > > > > > > >
> > > > > > > > --
> > > > > > > > ************************
> > > > > > > > Gitte Wange Jensen
> > > > > > > >
> > > > > > > > System Squid Developer
> > > > > > > > MMManager Aps
> > > > > > > > +45 29 72 79 72
> > > > > > > >
> > > > > > > > gitte@mmmanager.org
> > > > > > > > ************************
> > > > > > > >
> > > > > > > >
> > > > > > > > _______________________________________________
> > > > > > > > Zope maillist  -  Zope@zope.org
> > > > > > > > http://lists.zope.org/mailman/listinfo/zope
> > > > > > > > **   No cross posts or HTML encoding!  **
> > > > > > > > (Related lists -
> > > > > > > >  http://lists.zope.org/mailman/listinfo/zope-announce
> > > > > > > >  http://lists.zope.org/mailman/listinfo/zope-dev )
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > ************************
> > > > > > Gitte Wange Jensen
> > > > > >
> > > > > > System Squid Developer
> > > > > > MMManager Aps
> > > > > > +45 29 72 79 72
> > > > > >
> > > > > > gitte@mmmanager.org
> > > > > > ************************
> > > > > >
> > > > > >
> > > > > > _______________________________________________
> > > > > > Zope maillist  -  Zope@zope.org
> > > > > > http://lists.zope.org/mailman/listinfo/zope
> > > > > > **   No cross posts or HTML encoding!  **
> > > > > > (Related lists -
> > > > > >  http://lists.zope.org/mailman/listinfo/zope-announce
> > > > > >  http://lists.zope.org/mailman/listinfo/zope-dev )
> > > >
> > > >
> > > >
> > > > --
> > > > ************************
> > > > Gitte Wange Jensen
> > > >
> > > > System Squid Developer
> > > > MMManager Aps
> > > > +45 29 72 79 72
> > > >
> > > > gitte@mmmanager.org
> > > > ************************
> >
> > --
> > ************************
> > Gitte Wange Jensen
> >
> > System Squid Developer
> > MMManager Aps
> > +45 29 72 79 72
> >
> > gitte@mmmanager.org
> > ************************
> >
> > _______________________________________________
> > Zope maillist  -  Zope@zope.org
> > http://lists.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope-dev )
> 
> --
> ---------------------------------------------------------
> The ONLY thing that seems to band all nations together,
> is that their governments are universally bad....
>                                                 --unknown
> 



-- 
************************
Gitte Wange Jensen

System Squid Developer
MMManager Aps
+45 29 72 79 72

gitte@mmmanager.org
************************