ImportError: No module named cPersistence
Hi, In the following environment I get this traceback. What does anyone have any suggestions on what is wrong. zope 2.7.0-rc1 MySQL-python-0.9.3b1 ZMySQLDA-2.0.8 MySQL-Max-5.0.0-0 edev:/opt/zopeInstance/bin # ./runzope Traceback (most recent call last): File "/opt/Zope-2.7.0-rc1/lib/python/Zope/Startup/run.py", line 49, in ? run() File "/opt/Zope-2.7.0-rc1/lib/python/Zope/Startup/run.py", line 18, in run opts = _setconfig() File "/opt/Zope-2.7.0-rc1/lib/python/Zope/Startup/run.py", line 41, in _setconfig opts.realize(doc="Sorry, no option docs yet.") File "/opt/Zope-2.7.0-rc1/lib/python/zdaemon/zdoptions.py", line 262, in realize self.load_schema() File "/opt/Zope-2.7.0-rc1/lib/python/zdaemon/zdoptions.py", line 303, in load_schema self.schema = ZConfig.loadSchema(self.schemafile) File "/opt/Zope-2.7.0-rc1/lib/python/ZConfig/loader.py", line 37, in loadSchema return SchemaLoader().loadURL(url) File "/opt/Zope-2.7.0-rc1/lib/python/ZConfig/loader.py", line 71, in loadURL return self.loadResource(r) File "/opt/Zope-2.7.0-rc1/lib/python/ZConfig/loader.py", line 137, in loadResource schema = ZConfig.schema.parseResource(resource, self) File "/opt/Zope-2.7.0-rc1/lib/python/ZConfig/schema.py", line 43, in parseResource xml.sax.parse(resource.file, parser) File "/usr/local/lib/python2.3/xml/sax/__init__.py", line 33, in parse parser.parse(source) File "/usr/local/lib/python2.3/xml/sax/expatreader.py", line 107, in parse xmlreader.IncrementalParser.parse(self, source) File "/usr/local/lib/python2.3/xml/sax/xmlreader.py", line 123, in parse self.feed(buffer) File "/usr/local/lib/python2.3/xml/sax/expatreader.py", line 207, in feed self._parser.Parse(data, isFinal) File "/usr/local/lib/python2.3/xml/sax/expatreader.py", line 300, in start_element self._cont_handler.startElement(name, AttributesImpl(attrs)) File "/opt/Zope-2.7.0-rc1/lib/python/ZConfig/schema.py", line 115, in startElement getattr(self, "start_" + name)(attrs) File "/opt/Zope-2.7.0-rc1/lib/python/ZConfig/schema.py", line 469, in start_schema keytype, valuetype, datatype = self.get_sect_typeinfo(attrs) File "/opt/Zope-2.7.0-rc1/lib/python/ZConfig/schema.py", line 207, in get_sect_typeinfo datatype = self.get_datatype(attrs, "datatype", "null") File "/opt/Zope-2.7.0-rc1/lib/python/ZConfig/schema.py", line 200, in get_datatype return self._registry.get(dtname) File "/opt/Zope-2.7.0-rc1/lib/python/ZConfig/datatypes.py", line 298, in get t = self.search(name) File "/opt/Zope-2.7.0-rc1/lib/python/ZConfig/datatypes.py", line 323, in search package = __import__(n, g, g, component) File "/opt/Zope-2.7.0-rc1/lib/python/Zope/Startup/datatypes.py", line 18, in ? from ZODB.config import ZODBDatabase File "/opt/Zope-2.7.0-rc1/lib/python/ZODB/__init__.py", line 18, in ? import cPersistence, Persistence ImportError: No module named cPersistence Thanks, Mike
Hi Michael, Michael Long schrieb:
Hi,
In the following environment I get this traceback. What does anyone have any suggestions on what is wrong.
zope 2.7.0-rc1 MySQL-python-0.9.3b1 ZMySQLDA-2.0.8 MySQL-Max-5.0.0-0
edev:/opt/zopeInstance/bin # ./runzope Traceback (most recent call last): [...] ImportError: No module named cPersistence
You need to read the README and at least a little of the docs. Apparently you just unpacked the source code and tried to start it right away. Setup of 2.7 is a bit different to 2.6.x, so you have to read. (try ./configure --help for a start) (also dont use runzope but zopectl start) Regards Tino Wildenhain
Hi Michael,
Michael Long schrieb:
Hi,
In the following environment I get this traceback. What does anyone have any suggestions on what is wrong.
zope 2.7.0-rc1 MySQL-python-0.9.3b1 ZMySQLDA-2.0.8 MySQL-Max-5.0.0-0
edev:/opt/zopeInstance/bin # ./runzope Traceback (most recent call last): [...] ImportError: No module named cPersistence
You need to read the README and at least a little of the docs. Apparently you just unpacked the source code and tried to start it right away.
Tino, I had this instance of zope 2.7 running. I then shut it down and installed MySQL-python-0.9.3b1 and ZMySQLDA-2.0.8. It was at this point that I get the error. The reason I used runzope instead of zopectl was to have the traceback dumped to the console. I do not understand the use of zopectl enough yet to debug with it :( The bottom line is that I want to connect to MySQL 5.0 and the only option I have found so far is ZMySQLDA. Thanks for the help, Mike
Hi Michael, Michael Long schrieb:
Hi Michael,
Michael Long schrieb:
Hi,
In the following environment I get this traceback. What does anyone have any suggestions on what is wrong.
zope 2.7.0-rc1 MySQL-python-0.9.3b1 ZMySQLDA-2.0.8 MySQL-Max-5.0.0-0
edev:/opt/zopeInstance/bin # ./runzope Traceback (most recent call last):
[...]
ImportError: No module named cPersistence
You need to read the README and at least a little of the docs. Apparently you just unpacked the source code and tried to start it right away.
Tino,
I had this instance of zope 2.7 running. I then shut it down and installed MySQL-python-0.9.3b1 and ZMySQLDA-2.0.8. It was at this point that I get the error. The reason I used runzope instead of zopectl was to have the traceback dumped to the console. I do not understand the use of zopectl enough yet to debug with it :( The bottom line is that I want to connect to MySQL 5.0 and the only option I have found so far is ZMySQLDA.
Thanks for the help, Mike
Ah. uhm.. sorry. This traceback can only occur when cPersistence.so wasnt compiled yet, has been deleted, is for the wrong python version or is otherwise unavailable. It is usually generated thru installation/compilation. I'd check paths for INSTANCE_HOME, SOFTWARE_HOME etc; which python version is used (and if its different to the version you installed with) Regards Tino Wildenhain
Ah. uhm.. sorry. This traceback can only occur when cPersistence.so
No problem ;)
wasnt compiled yet, has been deleted, is for the wrong python version or is otherwise unavailable. It is usually generated thru installation/compilation.
I'd check paths for INSTANCE_HOME, SOFTWARE_HOME etc; which python version is used (and if its different to the version you installed with)
INSTANCE_HOME and SOFTWARE_HOME are set correctly. Something went horribly wrong when installing MySQL-python-0.9.3b1. Many of the *.so files were deleted. I replaced them from source and now get the following error. edev:/opt/zopeInstance/bin # ./runzope Error: The object named by "DBTab.ClassFactories.autoClassFactory" could not be imported (line 821 in file:///opt/zopeInstance/etc/zope.conf) For help, use /opt/Zope-2.7.0-rc1/lib/python/Zope/Startup/run.py -h This is the relevant piece of zope.conf: 814 815 <zodb_db main> 816 # Main FileStorage database 817 <filestorage> 818 path $INSTANCE/var/Data.fs 819 </filestorage> 820 mount-point / 821 </zodb_db> 822 823 <zodb_db temporary> 824 # Temporary storage database (for sessions) 825 <temporarystorage> 826 name temporary storage for sessioning 827 </temporarystorage> 828 mount-point /temp_folder 829 container-class Products.TemporaryFolder.TemporaryContainer 830 </zodb_db> 831 and when I run "/opt/Zope-2.7.0-rc1/lib/python/Zope/Startup/run.py -h" I get the following: Traceback (most recent call last): File "/opt/Zope-2.7.0-rc1/lib/python/Zope/Startup/run.py", line 49, in ? run() File "/opt/Zope-2.7.0-rc1/lib/python/Zope/Startup/run.py", line 17, in run from Zope.Startup import start_zope ImportError: No module named Zope.Startup When I do a listing on /opt/Zope-2.7.0-rc1/lib/python/Zope/Startup I get: drwxr-xr-x 5 zadmin root 4096 2004-01-29 10:40 . drwxr-xr-x 4 zadmin root 40 2004-01-28 23:40 .. -rw-r--r-- 1 zadmin root 12578 2004-01-08 18:34 __init__.py -rw-r--r-- 1 zadmin root 12625 2004-01-28 23:40 __init__.pyc -rw-r--r-- 1 zadmin root 5738 2003-03-18 16:37 cmdline.py -rw-r--r-- 1 zadmin root 7922 2003-12-20 12:47 datatypes.py -rw-r--r-- 1 zadmin root 9515 2004-01-28 23:40 datatypes.pyc -rw-r--r-- 1 zadmin root 4895 2004-01-08 18:34 handlers.py -rw-r--r-- 1 zadmin root 8787 2004-01-28 23:40 handlers.pyc drwxr-xr-x 2 zadmin root 32 2004-01-19 16:12 misc drwxr-xr-x 2 zadmin root 16 2004-01-19 16:12 nt -rw-r--r-- 1 zadmin root 858 2003-03-18 16:37 options.py -rw-r--r-- 1 zadmin root 686 2004-01-28 23:40 options.pyc -rw-r--r-- 1 zadmin root 1902 2003-12-21 19:24 run.py -rw-r--r-- 1 zadmin root 2069 2004-01-28 23:40 run.pyc drwxr-xr-x 2 zadmin root 32 2004-01-19 16:12 tests -rw-r--r-- 1 zadmin root 2015 2003-12-21 21:33 warnfilter.py -rw-r--r-- 1 zadmin root 2031 2004-01-29 10:40 warnfilter.pyc -rw-r--r-- 1 zadmin root 422 2003-12-21 21:33 warnfilter.xml -rw-r--r-- 1 zadmin root 7649 2003-12-21 19:24 zopectl.py -rw-r--r-- 1 zadmin root 27415 2004-01-08 18:34 zopeschema.xml What should I look for next?
On Thu, 29 Jan 2004 11:03:39 -0500 (EST) "Michael Long" <mlong@datalong.com> wrote:
Ah. uhm.. sorry. This traceback can only occur when cPersistence.so
No problem ;)
wasnt compiled yet, has been deleted, is for the wrong python version or is otherwise unavailable. It is usually generated thru installation/compilation.
I'd check paths for INSTANCE_HOME, SOFTWARE_HOME etc; which python version is used (and if its different to the version you installed with)
INSTANCE_HOME and SOFTWARE_HOME are set correctly.
Something went horribly wrong when installing MySQL-python-0.9.3b1. Many of the*.so files were deleted. I replaced them from source and now get the following error.
Please explain how you can replace .so files from source, these are compiled object files! Sounds like you need to recompile your C extensions. This is easily done from your SOFTWARE_HOME directory: % python setup.py build_ext -if This assumes you were using an inplace build and the system python. -Casey
On Thu, 29 Jan 2004 11:03:39 -0500 (EST)
Something went horribly wrong when installing MySQL-python-0.9.3b1. Many of the*.so files were deleted. I replaced them from source and now get the following error.
Please explain how you can replace .so files from source, these are compiled object files!
The reality is that I don't understand how zope/python works at this level, although I am trying to learn. The fact that I can build zope from a tarball is a small miracle :-) I found the .so files at /Zope-2.7.0-rc1/build-base/python-2.3/build-lib/
Sounds like you need to recompile your C extensions. This is easily done from your SOFTWARE_HOME directory:
% python setup.py build_ext -if
This worked perfectly, I actually ran it from the ZOPE_HOME. Now getting back to solving my original problem of connecting to MySQL. When I put ZMySQLDA in the products directory and start zope I get the following error: 2004-01-29T17:37:34 ERROR(200) Zope Could not import Products.ZMySQLDA Traceback (most recent call last): File "/opt/Zope-2.7.0-rc1/lib/python/OFS/Application.py", line 654, in import_product product=__import__(pname, global_dict, global_dict, silly) File "/opt/Zope-2.7.0-rc1/lib/python/Products/ZMySQLDA/__init__.py", line 91, in ? def panic(self, msg): File "/opt/Zope-2.7.0-rc1/lib/python/Products/ZMySQLDA/DA.py", line 92, in ? File "/opt/Zope-2.7.0-rc1/lib/python/Products/ZMySQLDA/db.py", line 89, in ? ImportError: No module named _mysql Traceback (most recent call last): File "/opt/Zope-2.7.0-rc1/lib/python/Zope/Startup/run.py", line 49, in ? run() File "/opt/Zope-2.7.0-rc1/lib/python/Zope/Startup/run.py", line 19, in run start_zope(opts.configroot) File "/opt/Zope-2.7.0-rc1/lib/python/Zope/Startup/__init__.py", line 51, in start_zope starter.startZope() File "/opt/Zope-2.7.0-rc1/lib/python/Zope/Startup/__init__.py", line 230, in startZope Zope.startup() File "/opt/Zope-2.7.0-rc1/lib/python/Zope/__init__.py", line 46, in startup _startup() File "/opt/Zope-2.7.0-rc1/lib/python/Zope/App/startup.py", line 45, in startup OFS.Application.import_products() File "/opt/Zope-2.7.0-rc1/lib/python/OFS/Application.py", line 631, in import_products import_product(product_dir, product_name, raise_exc=debug_mode) File "/opt/Zope-2.7.0-rc1/lib/python/OFS/Application.py", line 654, in import_product product=__import__(pname, global_dict, global_dict, silly) File "/opt/Zope-2.7.0-rc1/lib/python/Zope/Startup/__init__.py", line 91, in ? def panic(self, msg): File "/opt/Zope-2.7.0-rc1/lib/python/Products/ZMySQLDA/DA.py", line 92, in ? File "/opt/Zope-2.7.0-rc1/lib/python/Products/ZMySQLDA/db.py", line 89, in ? ImportError: No module named _mysql
On Thu, 29 Jan 2004 17:54:47 -0500 (EST) "Michael Long" <mlong@datalong.com> wrote:
On Thu, 29 Jan 2004 11:03:39 -0500 (EST)
Something went horribly wrong when installing MySQL-python-0.9.3b1. Many of the*.so files were deleted. I replaced them from source and now get the following error.
Please explain how you can replace .so files from source, these are compiled object files!
The reality is that I don't understand how zope/python works at this level, although I am trying to learn. The fact that I can build zope from a tarball is a small miracle :-)
I found the .so files at /Zope-2.7.0-rc1/build-base/python-2.3/build-lib/
Sounds like you need to recompile your C extensions. This is easily done from your SOFTWARE_HOME directory:
% python setup.py build_ext -if
This worked perfectly, I actually ran it from the ZOPE_HOME.
[..]
ImportError: No module named _mysql
Looks like you need to install mysql-python, which ZMySQLDA depends on. This gets installed into your python site-packages by default. Download it and do: python setup.py install hth, -Casey
Sounds like you need to recompile your C extensions. This is easily done from your SOFTWARE_HOME directory:
% python setup.py build_ext -if
This worked perfectly, I actually ran it from the ZOPE_HOME.
[..]
ImportError: No module named _mysql
Looks like you need to install mysql-python, which ZMySQLDA depends on. This gets installed into your python site-packages by default. Download it and do:
python setup.py install
Thank you all for the help. I have much joy now. Cheers, Mike
Hello, I gave up ! ... very sorry to ask for help for what i thought would piece of cake : i just cannot make work ExternalEditor helper on Windows 2000 + IE6 and HTTPS. IE6 shouts that it cannot download the file : i ve checked and the "do not save encrypted pages to disk" is unchecked !! so i am stuck and would like to know if this is something that somebody manage to do, and if yes how ?????? Thanx Seb
participants (4)
-
Casey Duncan -
Michael Long -
Sebastien Pastor -
Tino Wildenhain