View previous topic :: View next topic |
Author |
Message |
nyk Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/66286827426c11da48f45.gif)
Joined: 28 Aug 2004 Posts: 527 Location: Bern (Switzerland)
|
Posted: Thu Feb 16, 2006 7:57 pm Post subject: ZMySQLDA can't import _mysql module, but python can [SOLVED] |
|
|
I emerged zope and zmysqlda, but the ZMySQLDA product is "broken". This is the traceback:
Code: |
Traceback (most recent call last):
File "/usr/lib/zope-2.8.4/lib/python/OFS/Application.py", line 695, in import_product
product=__import__(pname, global_dict, global_dict, silly)
File "/var/lib/zope/zope/Products/ZMySQLDA/__init__.py", line 91, in ?
import DA
File "/var/lib/zope/zope/Products/ZMySQLDA/DA.py", line 92, in ?
from db import DB
File "/var/lib/zope/zope/Products/ZMySQLDA/db.py", line 89, in ?
import _mysql
ImportError: No module named _mysql
|
From the command line I CAN import _mysql in python2.4, but not in python2.3.
I tried re-emerging mysql-python and then zope and zmysqlda, but this didn't help. What else could I try?
EDIT: Got it to work now by changing zopectl and runzope to use python 2.4.
Somehow, these changes should also be made in portage, as the current package is not working!
But I don't have lots of experience with creating ebuilds, and most of all I don't know who decides if it's okay to use python 2.4 for zope by default.
EDIT2: Now I changed it back to 2.3 in zopectl and 2.4 in runzope. This way the zmysqlda works and I don't get the DeprecationWarnings (whrandom) on startup anymore! It's really using 2.3 for the root owned "zdrun.py" process, which is like "init", I guess... Then it spawns 2.4 python threads. Which should be okay...?
Last edited by nyk on Tue Mar 28, 2006 5:43 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
pancapangrawit n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 10 Jan 2005 Posts: 8 Location: Graz (Austria)
|
Posted: Tue Feb 21, 2006 12:20 am Post subject: |
|
|
But can you run plone with python 2.4? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
__hermes__ n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 19 Dec 2004 Posts: 8
|
Posted: Wed Feb 22, 2006 10:52 am Post subject: How do u do |
|
|
I got exactly the same PB
How do u do that switching op ?
Thx |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
nyk Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/66286827426c11da48f45.gif)
Joined: 28 Aug 2004 Posts: 527 Location: Bern (Switzerland)
|
Posted: Thu Feb 23, 2006 8:08 am Post subject: |
|
|
Don't know about plone, I am using ZMS and it works with zmysqlda!
In the file /var/lib/zope/zope/bin/runzope, change the line
PYTHON="/usr/bin/python2.3"
to
PYTHON="/usr/bin/python2.4"
PS: Maybe you path is different, if you did't name you zope "zope". Then it would be /var/lib/zope/something_else/bin/runzope I guess....
But I always look it up in the zope control panel ("INSTANCE_HOME") anyway. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
__hermes__ n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 19 Dec 2004 Posts: 8
|
Posted: Thu Feb 23, 2006 10:15 am Post subject: Thx |
|
|
Thx it works !
I'm happy ![Laughing :lol:](images/smiles/icon_lol.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|