The current CVS version of setup.py should work without any problems on Mac OS X (includes -flat-namespace). If ZMySQLDA is still not working, go to the Control Panel, Products, and look for ZMySQLDA. If it's broken, you should be able to view a traceback.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2002-03-06
Still no good. I got your latest CVS setup.py (1.21), built and installed with it (output below). Maybe I'm using the wrong exec. of python?
It doesn't show up in my Products folder in Zope, either. What is a traceback?
-- thanks, Bergen
[zopeatista:~] berg% cd /Applications/Zope_2.4/lib/python/Products/MySQL-python-0.9.0/
[zopeatista:python/Products/MySQL-python-0.9.0] berg% sudo /Applications/Zope_2.4/SoftwareHome/bin/python setup.py build
Password:
running build
running build_py
not copying CompatMysqldb.py (output up-to-date)
not copying _mysql_exceptions.py (output up-to-date)
not copying MySQLdb/__init__.py (output up-to-date)
not copying MySQLdb/converters.py (output up-to-date)
not copying MySQLdb/connections.py (output up-to-date)
not copying MySQLdb/cursors.py (output up-to-date)
not copying MySQLdb/sets.py (output up-to-date)
not copying MySQLdb/times.py (output up-to-date)
not copying MySQLdb/constants/__init__.py (output up-to-date)
not copying MySQLdb/constants/CR.py (output up-to-date)
not copying MySQLdb/constants/FIELD_TYPE.py (output up-to-date)
not copying MySQLdb/constants/ER.py (output up-to-date)
not copying MySQLdb/constants/FLAG.py (output up-to-date)
not copying MySQLdb/constants/REFRESH.py (output up-to-date)
not copying MySQLdb/constants/CLIENT.py (output up-to-date)
running build_ext
skipping '_mysql' extension (up-to-date)
[zopeatista:python/Products/MySQL-python-0.9.0] berg% sudo /Applications/Zope_2.4/SoftwareHome/bin/python setup.py install
running install
running build
running build_py
not copying CompatMysqldb.py (output up-to-date)
not copying _mysql_exceptions.py (output up-to-date)
not copying MySQLdb/__init__.py (output up-to-date)
not copying MySQLdb/converters.py (output up-to-date)
not copying MySQLdb/connections.py (output up-to-date)
not copying MySQLdb/cursors.py (output up-to-date)
not copying MySQLdb/sets.py (output up-to-date)
not copying MySQLdb/times.py (output up-to-date)
not copying MySQLdb/constants/__init__.py (output up-to-date)
not copying MySQLdb/constants/CR.py (output up-to-date)
not copying MySQLdb/constants/FIELD_TYPE.py (output up-to-date)
not copying MySQLdb/constants/ER.py (output up-to-date)
not copying MySQLdb/constants/FLAG.py (output up-to-date)
not copying MySQLdb/constants/REFRESH.py (output up-to-date)
not copying MySQLdb/constants/CLIENT.py (output up-to-date)
running build_ext
skipping '_mysql' extension (up-to-date)
running install_lib
not copying build/lib.darwin-5.3-Power Macintosh-2.1/_mysql.so (output up-to-date)
not copying build/lib.darwin-5.3-Power Macintosh-2.1/_mysql_exceptions.py (output up-to-date)
not copying build/lib.darwin-5.3-Power Macintosh-2.1/CompatMysqldb.py (output up-to-date)
not copying build/lib.darwin-5.3-Power Macintosh-2.1/MySQLdb/__init__.py (output up-to-date)
not copying build/lib.darwin-5.3-Power Macintosh-2.1/MySQLdb/connections.py (output up-to-date)
not copying build/lib.darwin-5.3-Power Macintosh-2.1/MySQLdb/constants/__init__.py (output up-to-date)
not copying build/lib.darwin-5.3-Power Macintosh-2.1/MySQLdb/constants/CLIENT.py (output up-to-date)
not copying build/lib.darwin-5.3-Power Macintosh-2.1/MySQLdb/constants/CR.py (output up-to-date)
not copying build/lib.darwin-5.3-Power Macintosh-2.1/MySQLdb/constants/ER.py (output up-to-date)
not copying build/lib.darwin-5.3-Power Macintosh-2.1/MySQLdb/constants/FIELD_TYPE.py (output up-to-date)
not copying build/lib.darwin-5.3-Power Macintosh-2.1/MySQLdb/constants/FLAG.py (output up-to-date)
not copying build/lib.darwin-5.3-Power Macintosh-2.1/MySQLdb/constants/REFRESH.py (output up-to-date)
not copying build/lib.darwin-5.3-Power Macintosh-2.1/MySQLdb/converters.py (output up-to-date)
not copying build/lib.darwin-5.3-Power Macintosh-2.1/MySQLdb/cursors.py (output up-to-date)
not copying build/lib.darwin-5.3-Power Macintosh-2.1/MySQLdb/sets.py (output up-to-date)
not copying build/lib.darwin-5.3-Power Macintosh-2.1/MySQLdb/times.py (output up-to-date)
skipping byte-compilation of /Applications/Zope_2.4/SoftwareHome/lib/python2.1/site-packages/_mysql_exceptions.py to _mysql_exceptions.pyc
skipping byte-compilation of /Applications/Zope_2.4/SoftwareHome/lib/python2.1/site-packages/CompatMysqldb.py to CompatMysqldb.pyc
skipping byte-compilation of /Applications/Zope_2.4/SoftwareHome/lib/python2.1/site-packages/MySQLdb/__init__.py to __init__.pyc
skipping byte-compilation of /Applications/Zope_2.4/SoftwareHome/lib/python2.1/site-packages/MySQLdb/connections.py to connections.pyc
skipping byte-compilation of /Applications/Zope_2.4/SoftwareHome/lib/python2.1/site-packages/MySQLdb/constants/__init__.py to __init__.pyc
skipping byte-compilation of /Applications/Zope_2.4/SoftwareHome/lib/python2.1/site-packages/MySQLdb/constants/CLIENT.py to CLIENT.pyc
skipping byte-compilation of /Applications/Zope_2.4/SoftwareHome/lib/python2.1/site-packages/MySQLdb/constants/CR.py to CR.pyc
skipping byte-compilation of /Applications/Zope_2.4/SoftwareHome/lib/python2.1/site-packages/MySQLdb/constants/ER.py to ER.pyc
skipping byte-compilation of /Applications/Zope_2.4/SoftwareHome/lib/python2.1/site-packages/MySQLdb/constants/FIELD_TYPE.py to FIELD_TYPE.pyc
skipping byte-compilation of /Applications/Zope_2.4/SoftwareHome/lib/python2.1/site-packages/MySQLdb/constants/FLAG.py to FLAG.pyc
skipping byte-compilation of /Applications/Zope_2.4/SoftwareHome/lib/python2.1/site-packages/MySQLdb/constants/REFRESH.py to REFRESH.pyc
skipping byte-compilation of /Applications/Zope_2.4/SoftwareHome/lib/python2.1/site-packages/MySQLdb/converters.py to converters.pyc
skipping byte-compilation of /Applications/Zope_2.4/SoftwareHome/lib/python2.1/site-packages/MySQLdb/cursors.py to cursors.pyc
skipping byte-compilation of /Applications/Zope_2.4/SoftwareHome/lib/python2.1/site-packages/MySQLdb/sets.py to sets.pyc
skipping byte-compilation of /Applications/Zope_2.4/SoftwareHome/lib/python2.1/site-packages/MySQLdb/times.py to times.pyc
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2002-03-06
Also, I originally (2 days ago) tried setup.py using the python 2.2 that wasn't under Zope. Will that affect anything?
Berg
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2002-03-06
I just took the whole lib out, and tried it again. Still not working... Hmm...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You may need to zap your build directory to force everything to rebuild.
MySQLdb by itself will not show up as a Zope product. You also need to install ZMySQLDA. I guess that you will have to untar it in your /Applications/Zope_2.4/SoftwareHome directory and then restart Zope.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2002-03-12
Thanks andy - the problem was that I thought the "Zope top directory" was my Zope folder - but everything should have gone in Software Home. This became obvious after looking through Software Home and seeing lib/python/Products... etc.
Now that its working, though, I'm not able to test 'select' queries (like 'select * from staff'). 'desc' and 'show' queries work fine.
I see vits-jaeger had a similar problem, and I got the same error as him.
Error Type: SystemError
Error Value: Objects/tupleobject.c:506: bad argument to internal function
Traceback (innermost last):
File /Applications/Zope-2.4.1-MOSX/lib/python/ZPublisher/Publish.py, line 223, in publish_module
File /Applications/Zope-2.4.1-MOSX/lib/python/ZPublisher/Publish.py, line 187, in publish
File /Applications/Zope-2.4.1-MOSX/lib/python/Zope/__init__.py, line 226, in zpublisher_exception_hook
(Object: RoleManager)
File /Applications/Zope-2.4.1-MOSX/lib/python/ZPublisher/Publish.py, line 171, in publish
File /Applications/Zope-2.4.1-MOSX/lib/python/ZPublisher/mapply.py, line 160, in mapply
(Object: manage_test)
File /Applications/Zope-2.4.1-MOSX/lib/python/ZPublisher/Publish.py, line 112, in call_object
(Object: manage_test)
File /Applications/Zope-2.4.1-MOSX/lib/python/Shared/DC/ZRDB/Connection.py, line 179, in manage_test
(Object: RoleManager)
File /Applications/Zope-2.4.1-MOSX/lib/python/Products/ZMySQLDA/db.py, line 293, in query
SystemError: (see above)
Thank you for helping me get this running..
Bergen
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2002-03-07
Should I be running the adapters in /Zope_2.4... or in /Applications/Zope_2.4...
(.../lib/python/Products/)
I notice that none of the Shared python files are compiled in /Zope_2.4
When I tried to run the following out of python:
import MySQLDA, I got the following traceback
>>> import ZMySQLDA
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "ZMySQLDA/__init__.py", line 91, in ?
import DA
File "ZMySQLDA/DA.py", line 92, in ?
from db import DB
File "ZMySQLDA/db.py", line 101, in ?
from Shared.DC.ZRDB.TM import TM
ImportError: No module named Shared.DC.ZRDB.TM
is my zope installed OK? It was done by our IT guy, who doesn't really remember how it was done...
(I also already tried running setup.py with the entire lib in /Zope_2.4/)
Any help would be swell. Thanks - Bergen
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Mac OS 10.1
MySQL-python-0.9.0
ZMySQLDA-2.0.8
Zope 2.4
Zope has Python 2.1
Python 2.2 also installed
I finally got it working by editing the setup.py to include the -flat_namespace LDFLAG.
I executed setup.py using the Python (2.1) in my Zope directory. I did both the build and the install, with no errors.
I restarted Zope using the 'Update Configuration and Restart' button in the Zope Server Status [Setup] window.
Still, I don't see Z SQL Database Connection in my Zope add menu. Any ideas? I'm relatively new to Zope.
(Note: I had alread done numerous failed builds and installs with MySQL-python-0.9.0 and 0.9.1 before succeeding)
The current CVS version of setup.py should work without any problems on Mac OS X (includes -flat-namespace). If ZMySQLDA is still not working, go to the Control Panel, Products, and look for ZMySQLDA. If it's broken, you should be able to view a traceback.
Still no good. I got your latest CVS setup.py (1.21), built and installed with it (output below). Maybe I'm using the wrong exec. of python?
It doesn't show up in my Products folder in Zope, either. What is a traceback?
-- thanks, Bergen
[zopeatista:~] berg% cd /Applications/Zope_2.4/lib/python/Products/MySQL-python-0.9.0/
[zopeatista:python/Products/MySQL-python-0.9.0] berg% sudo /Applications/Zope_2.4/SoftwareHome/bin/python setup.py build
Password:
running build
running build_py
not copying CompatMysqldb.py (output up-to-date)
not copying _mysql_exceptions.py (output up-to-date)
not copying MySQLdb/__init__.py (output up-to-date)
not copying MySQLdb/converters.py (output up-to-date)
not copying MySQLdb/connections.py (output up-to-date)
not copying MySQLdb/cursors.py (output up-to-date)
not copying MySQLdb/sets.py (output up-to-date)
not copying MySQLdb/times.py (output up-to-date)
not copying MySQLdb/constants/__init__.py (output up-to-date)
not copying MySQLdb/constants/CR.py (output up-to-date)
not copying MySQLdb/constants/FIELD_TYPE.py (output up-to-date)
not copying MySQLdb/constants/ER.py (output up-to-date)
not copying MySQLdb/constants/FLAG.py (output up-to-date)
not copying MySQLdb/constants/REFRESH.py (output up-to-date)
not copying MySQLdb/constants/CLIENT.py (output up-to-date)
running build_ext
skipping '_mysql' extension (up-to-date)
[zopeatista:python/Products/MySQL-python-0.9.0] berg% sudo /Applications/Zope_2.4/SoftwareHome/bin/python setup.py install
running install
running build
running build_py
not copying CompatMysqldb.py (output up-to-date)
not copying _mysql_exceptions.py (output up-to-date)
not copying MySQLdb/__init__.py (output up-to-date)
not copying MySQLdb/converters.py (output up-to-date)
not copying MySQLdb/connections.py (output up-to-date)
not copying MySQLdb/cursors.py (output up-to-date)
not copying MySQLdb/sets.py (output up-to-date)
not copying MySQLdb/times.py (output up-to-date)
not copying MySQLdb/constants/__init__.py (output up-to-date)
not copying MySQLdb/constants/CR.py (output up-to-date)
not copying MySQLdb/constants/FIELD_TYPE.py (output up-to-date)
not copying MySQLdb/constants/ER.py (output up-to-date)
not copying MySQLdb/constants/FLAG.py (output up-to-date)
not copying MySQLdb/constants/REFRESH.py (output up-to-date)
not copying MySQLdb/constants/CLIENT.py (output up-to-date)
running build_ext
skipping '_mysql' extension (up-to-date)
running install_lib
not copying build/lib.darwin-5.3-Power Macintosh-2.1/_mysql.so (output up-to-date)
not copying build/lib.darwin-5.3-Power Macintosh-2.1/_mysql_exceptions.py (output up-to-date)
not copying build/lib.darwin-5.3-Power Macintosh-2.1/CompatMysqldb.py (output up-to-date)
not copying build/lib.darwin-5.3-Power Macintosh-2.1/MySQLdb/__init__.py (output up-to-date)
not copying build/lib.darwin-5.3-Power Macintosh-2.1/MySQLdb/connections.py (output up-to-date)
not copying build/lib.darwin-5.3-Power Macintosh-2.1/MySQLdb/constants/__init__.py (output up-to-date)
not copying build/lib.darwin-5.3-Power Macintosh-2.1/MySQLdb/constants/CLIENT.py (output up-to-date)
not copying build/lib.darwin-5.3-Power Macintosh-2.1/MySQLdb/constants/CR.py (output up-to-date)
not copying build/lib.darwin-5.3-Power Macintosh-2.1/MySQLdb/constants/ER.py (output up-to-date)
not copying build/lib.darwin-5.3-Power Macintosh-2.1/MySQLdb/constants/FIELD_TYPE.py (output up-to-date)
not copying build/lib.darwin-5.3-Power Macintosh-2.1/MySQLdb/constants/FLAG.py (output up-to-date)
not copying build/lib.darwin-5.3-Power Macintosh-2.1/MySQLdb/constants/REFRESH.py (output up-to-date)
not copying build/lib.darwin-5.3-Power Macintosh-2.1/MySQLdb/converters.py (output up-to-date)
not copying build/lib.darwin-5.3-Power Macintosh-2.1/MySQLdb/cursors.py (output up-to-date)
not copying build/lib.darwin-5.3-Power Macintosh-2.1/MySQLdb/sets.py (output up-to-date)
not copying build/lib.darwin-5.3-Power Macintosh-2.1/MySQLdb/times.py (output up-to-date)
skipping byte-compilation of /Applications/Zope_2.4/SoftwareHome/lib/python2.1/site-packages/_mysql_exceptions.py to _mysql_exceptions.pyc
skipping byte-compilation of /Applications/Zope_2.4/SoftwareHome/lib/python2.1/site-packages/CompatMysqldb.py to CompatMysqldb.pyc
skipping byte-compilation of /Applications/Zope_2.4/SoftwareHome/lib/python2.1/site-packages/MySQLdb/__init__.py to __init__.pyc
skipping byte-compilation of /Applications/Zope_2.4/SoftwareHome/lib/python2.1/site-packages/MySQLdb/connections.py to connections.pyc
skipping byte-compilation of /Applications/Zope_2.4/SoftwareHome/lib/python2.1/site-packages/MySQLdb/constants/__init__.py to __init__.pyc
skipping byte-compilation of /Applications/Zope_2.4/SoftwareHome/lib/python2.1/site-packages/MySQLdb/constants/CLIENT.py to CLIENT.pyc
skipping byte-compilation of /Applications/Zope_2.4/SoftwareHome/lib/python2.1/site-packages/MySQLdb/constants/CR.py to CR.pyc
skipping byte-compilation of /Applications/Zope_2.4/SoftwareHome/lib/python2.1/site-packages/MySQLdb/constants/ER.py to ER.pyc
skipping byte-compilation of /Applications/Zope_2.4/SoftwareHome/lib/python2.1/site-packages/MySQLdb/constants/FIELD_TYPE.py to FIELD_TYPE.pyc
skipping byte-compilation of /Applications/Zope_2.4/SoftwareHome/lib/python2.1/site-packages/MySQLdb/constants/FLAG.py to FLAG.pyc
skipping byte-compilation of /Applications/Zope_2.4/SoftwareHome/lib/python2.1/site-packages/MySQLdb/constants/REFRESH.py to REFRESH.pyc
skipping byte-compilation of /Applications/Zope_2.4/SoftwareHome/lib/python2.1/site-packages/MySQLdb/converters.py to converters.pyc
skipping byte-compilation of /Applications/Zope_2.4/SoftwareHome/lib/python2.1/site-packages/MySQLdb/cursors.py to cursors.pyc
skipping byte-compilation of /Applications/Zope_2.4/SoftwareHome/lib/python2.1/site-packages/MySQLdb/sets.py to sets.pyc
skipping byte-compilation of /Applications/Zope_2.4/SoftwareHome/lib/python2.1/site-packages/MySQLdb/times.py to times.pyc
Also, I originally (2 days ago) tried setup.py using the python 2.2 that wasn't under Zope. Will that affect anything?
Berg
I just took the whole lib out, and tried it again. Still not working... Hmm...
You may need to zap your build directory to force everything to rebuild.
MySQLdb by itself will not show up as a Zope product. You also need to install ZMySQLDA. I guess that you will have to untar it in your /Applications/Zope_2.4/SoftwareHome directory and then restart Zope.
Thanks andy - the problem was that I thought the "Zope top directory" was my Zope folder - but everything should have gone in Software Home. This became obvious after looking through Software Home and seeing lib/python/Products... etc.
Now that its working, though, I'm not able to test 'select' queries (like 'select * from staff'). 'desc' and 'show' queries work fine.
I see vits-jaeger had a similar problem, and I got the same error as him.
Error Type: SystemError
Error Value: Objects/tupleobject.c:506: bad argument to internal function
Traceback (innermost last):
File /Applications/Zope-2.4.1-MOSX/lib/python/ZPublisher/Publish.py, line 223, in publish_module
File /Applications/Zope-2.4.1-MOSX/lib/python/ZPublisher/Publish.py, line 187, in publish
File /Applications/Zope-2.4.1-MOSX/lib/python/Zope/__init__.py, line 226, in zpublisher_exception_hook
(Object: RoleManager)
File /Applications/Zope-2.4.1-MOSX/lib/python/ZPublisher/Publish.py, line 171, in publish
File /Applications/Zope-2.4.1-MOSX/lib/python/ZPublisher/mapply.py, line 160, in mapply
(Object: manage_test)
File /Applications/Zope-2.4.1-MOSX/lib/python/ZPublisher/Publish.py, line 112, in call_object
(Object: manage_test)
File /Applications/Zope-2.4.1-MOSX/lib/python/Shared/DC/ZRDB/Connection.py, line 179, in manage_test
(Object: RoleManager)
File /Applications/Zope-2.4.1-MOSX/lib/python/Products/ZMySQLDA/db.py, line 293, in query
SystemError: (see above)
Thank you for helping me get this running..
Bergen
Should I be running the adapters in /Zope_2.4... or in /Applications/Zope_2.4...
(.../lib/python/Products/)
I notice that none of the Shared python files are compiled in /Zope_2.4
When I tried to run the following out of python:
import MySQLDA, I got the following traceback
>>> import ZMySQLDA
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "ZMySQLDA/__init__.py", line 91, in ?
import DA
File "ZMySQLDA/DA.py", line 92, in ?
from db import DB
File "ZMySQLDA/db.py", line 101, in ?
from Shared.DC.ZRDB.TM import TM
ImportError: No module named Shared.DC.ZRDB.TM
is my zope installed OK? It was done by our IT guy, who doesn't really remember how it was done...
(I also already tried running setup.py with the entire lib in /Zope_2.4/)
Any help would be swell. Thanks - Bergen