Re[2]: [Zope] ZMySQLDA

Ben Ocean zope@thewebsons.com
Wed, 02 Jan 2002 21:40:04 -0800


At 01:09 AM 1/3/02 +0100, you wrote:
>Hello Ben,
>
> >>My _mysql.so is in :
> >>
> >>/usr/lib/python2.1/site-packages/_mysql.so
> >>/usr/lib/python2.1/site-packages/_mysql_exceptions.py
> >>/usr/lib/python2.1/site-packages/_mysql_exceptions.pyc
> >>
> >>/usr/lib/python2.1 is your /usr/local/lib/python
> >>
> >>in my db.py is the following import:
> >>
> >>import _mysql
> >>from _mysql_exceptions import OperationalError, NotSupportedError
> >>MySQLdb_version_required =3D (0,9,0)
> >>
> >>try
> >>
> >>python db.py
> >>
> >>Does this give an mysql-relevant error ??
>
>BO> #python db.py
>BO> python: can't open file 'db.py'
>BO> #find / -name "db.py"
>BO> /home/httpd/ZopeInstallation/OtherProducts/ZMySQLDA/db.py
>BO>=20
>/home/httpd/ZopeInstallation/Zope_software_home/lib/python/Products/ZGadfly=
DA/db.py
>BO> #pwd
>BO> /home/virtuals/mercury/html/GlobalRequestPatch
>BO> #cd /home/httpd/ZopeInstallation/OtherProducts/ZMySQLDA/
>BO> #python db.py
>BO> Traceback (most recent call last):
>BO>    File "db.py", line 106, in ?
>BO>      import MySQL, regex, sys
>BO> ImportError: No module named MySQL
>
> >>I have ZMySQLDA 2.0.8
> >>
> >>Hope this helps. I had similar problems with MySQL. I had an old=
 ZMySQLDA
> >>version.
> >>Don't know if that is your problmen.
>
>BO> I have the most recent. The problem is with this module MySQL. Where do=
 I
>BO> get it?
>you could try the following:
>below your folder
>/home/httpd/ZopeInstallation/Zope_software_home/lib/python there
>should be a subdirectory site-packages.

Negatory.

>Copy the stuff from your
>"standalone"-python installations site-packages sub-dir - in your
>case=B4/usr/lib/python2.1/site-packages - to the site-packages dir in
>the "Zope"-python.

Tried playing around with symlinks. There ain't no module named MySQL=20
anywhere in my machine. To be frank, I'm getting a little pissed off at=20
this damn product. Can't live without it, yet it obviously needs a whole=20
lot of work. Would be nice if it actually worked, and easily so.

>If you have a Zope-Version based on python 2.1 that
>should do the trick - at least it did for me.

Lucky for you. Hope I finally get this thing to work. I've been trying for=
=20
months.
Any more ideas would be appreciated, and hopefully the author will work out=
=20
the bugs.
Thanks,
BenO