psycopg version mismatch (imported 2.0.6 (dec mx dt ext pq3))
Hi I am using zope 2.10 , python2.4 and psycopg2-2.0.9 . I had created entry in ZIM successfully but while connecting to db it is giving me following error. Please pull me out from this ASAP. An error was encountered while publishing this resource. Error Type: ImportError Error Value: psycopg version mismatch (imported 2.0.6 (dec mx dt ext pq3)) Thanks & Regards Amol Kumbhar
A full traceback is always helpful for getting help. -aj On Fri, Mar 6, 2009 at 06:39, amol kumbhar <amol.kumbhar39@gmail.com> wrote:
Hi
I am using zope 2.10 , python2.4 and psycopg2-2.0.9 . I had created entry in ZIM successfully but while connecting to db it is giving me following error. Please pull me out from this ASAP.
An error was encountered while publishing this resource.
Error Type: ImportError Error Value: psycopg version mismatch (imported 2.0.6 (dec mx dt ext pq3))
Thanks & Regards Amol Kumbhar
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
+-------[ amol kumbhar ]---------------------- | | Hi | | I am using zope 2.10 , python2.4 and psycopg2-2.0.9 . I had created entry in | ZIM successfully but while connecting to db it is giving me following error. | Please pull me out from this ASAP. | | An error was encountered while publishing this resource. | | Error Type: ImportError | Error Value: psycopg version mismatch (imported 2.0.6 (dec mx dt ext pq3)) Your ZPsycopg and your psycopg don't match up version-wise. You say you have psycopg 2.0.9 but 2.0.6 was imported... -- Andrew Milton akm@theinternet.com.au
This is my full error Log * Site Error Log at / <http://localhost:9673/manage_workspace>error_log<http://localhost:9673/error_log/manage_workspace> * Exception traceback Time 2009/03/05 23:09:14.170 GMT+0530 User Name (User Id) admin (admin) Request URL http://localhost:9673/manage_addProduct/ZPsycopgDA/manage_addZPsycopgConnect... Exception Type ImportError Exception Value psycopg version mismatch (imported 2.0.6 (dec mx dt ext pq3)) Traceback (innermost last): - Module ZPublisher.Publish, line 119, in publish - Module ZPublisher.mapply, line 88, in mapply - Module ZPublisher.Publish, line 42, in call_object - Module Products.ZPsycopgDA.DA, line 63, in manage_addZPsycopgConnection - Module Products.ZPsycopgDA.DA, line 83, in __init__ - Module Products.ZPsycopgDA.DA, line 98, in edit - Module Products.ZPsycopgDA.DA, line 120, in connect ImportError: psycopg version mismatch (imported 2.0.6 (dec mx dt ext pq3)) Display traceback as text<http://localhost:9673/error_log/getLogEntryAsText?id=1236274754.170.538033616757> REQUEST formzdatetime'YES'tilevel2title'Z Psycopg 2 Database Connection' encoding'utf-8'submit' Add 'id'Psycopg2_database_connection' connection_string'zopedb@localhost:5432 postgres 1'check'YES'cookies dtpref_rows'20'dtpref_cols'90%'tree-s 'eJzT0MgpMOQKVneEA1dbda4CI67EkgJjLj0AeGcHew'lazy itemsSESSION<bound method SessionDataManager.getSessionData of <SessionDataManager at /session_data_manager>>otherzdatetime'YES'tilevel2TraversalRequestNameStack []AUTHENTICATED_USER<User 'admin'>URL' http://localhost:9673/manage_addProduct/ZPsycopgDA/manage_addZPsycopgConnect... 'title'Z Psycopg 2 Database Connection'check'YES'SERVER_URL' http://localhost:9673'AUTHENTICATION_PATH''encoding'utf-8'PUBLISHED<bound method __FactoryDispatcher__.manage_addZPsycopgConnection of <App.ProductContext.__FactoryDispatcher__ object at 0x9325d8c>>id 'Psycopg2_database_connection'connection_string'zopedb@localhost:5432 postgres 1'ACTUAL_URL' http://localhost:9673/manage_addProduct/ZPsycopgDA/manage_addZPsycopgConnect... 'URL0 http://localhost:9673/manage_addProduct/ZPsycopgDA/manage_addZPsycopgConnect... URL1http://localhost:9673/manage_addProduct/ZPsycopgDAURL2 http://localhost:9673/manage_addProductURL3http://localhost:9673BASE0 http://localhost:9673BASE1http://localhost:9673BASE2 http://localhost:9673/manage_addProductBASE3 http://localhost:9673/manage_addProduct/ZPsycopgDABASE4 http://localhost:9673/manage_addProduct/ZPsycopgDA/manage_addZPsycopgConnect... environHTTP_COOKIE'dtpref_rows="20"; dtpref_cols="90%"; tree-s="eJzT0MgpMOQKVneEA1dbda4CI67EkgJjLj0AeGcHew"'SERVER_SOFTWARE'Zope/(Zope 2.10.5-final, python 2.4.5, linux2) ZServer/1.1'SCRIPT_NAME''REQUEST_METHOD 'POST'HTTP_KEEP_ALIVE'300'SERVER_PROTOCOL'HTTP/1.1'channel.creation_time 1236274737CONNECTION_TYPE'keep-alive'HTTP_ACCEPT_CHARSET 'ISO-8859-1,utf-8;q=0.7,*;q=0.7'HTTP_USER_AGENT'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.6) Gecko/2009020911 Ubuntu/8.04 (hardy) Firefox/3.0.6' HTTP_REFERER'http://localhost:9673/manage_addProduct/ZPsycopgDA/add' SERVER_NAME'0.0.0.0'REMOTE_ADDR'127.0.0.1'PATH_TRANSLATED '/manage_addProduct/ZPsycopgDA/manage_addZPsycopgConnection'SERVER_PORT '9673'CONTENT_LENGTH'192'HTTP_HOST'localhost:9673'HTTP_ACCEPT 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' GATEWAY_INTERFACE'CGI/1.1'HTTP_ACCEPT_LANGUAGE'en-us,en;q=0.5'CONTENT_TYPE 'application/x-www-form-urlencoded'HTTP_ACCEPT_ENCODING'gzip,deflate' PATH_INFO'/manage_addProduct/ZPsycopgDA/manage_addZPsycopgConnection' On Fri, Mar 6, 2009 at 11:15 AM, Andrew Milton <akm@theinternet.com.au>wrote:
+-------[ amol kumbhar ]---------------------- | | Hi | | I am using zope 2.10 , python2.4 and psycopg2-2.0.9 . I had created entry in | ZIM successfully but while connecting to db it is giving me following error. | Please pull me out from this ASAP. | | An error was encountered while publishing this resource. | | Error Type: ImportError | Error Value: psycopg version mismatch (imported 2.0.6 (dec mx dt ext pq3))
Your ZPsycopg and your psycopg don't match up version-wise.
You say you have psycopg 2.0.9 but 2.0.6 was imported...
-- Andrew Milton akm@theinternet.com.au
-- Amol Kumbhar Software Developer SVBP informatics Cell : 9881720442 e-mail : amol.kumbhar39@gmail.com
+-------[ amol kumbhar ]---------------------- | This is my full error Log | | Site Error Log at /error_log Yes you also need to update your ZPsycopg in your Zope products (it's part of the psycopg distribution). -- Andrew Milton akm@theinternet.com.au
Thanks for replying but I am still there ..... My DA.py contain this list of allowed_psycopg_version : *ALLOWED_PSYCOPG_VERSIONS = ('2.0.7','2.0.8','2.0.9')* and the condition which is generating the ImportError from this file is : *# check psycopg version and raise exception if does not match if psycopg2.__version__[:9] not in ALLOWED_PSYCOPG_VERSIONS: raise ImportError("psycopg version mismatch (imported %s)" % psycopg2.__version__)* could you please guide me which version should I add in ALLOWED_PSYCOPG_VERSION list On Fri, Mar 6, 2009 at 2:03 PM, Andrew Milton <akm@theinternet.com.au>wrote:
+-------[ amol kumbhar ]---------------------- | This is my full error Log | | Site Error Log at /error_log
Yes you also need to update your ZPsycopg in your Zope products (it's part of the psycopg distribution).
-- Andrew Milton akm@theinternet.com.au
-- Amol Kumbhar Software Developer SVBP informatics Cell : 9881720442 e-mail : amol.kumbhar39@gmail.com
+-------[ amol kumbhar ]---------------------- | nt-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: | quoted-printable Thanks for replying | but I am still there ..... | | My DA.py contain this list of allowed_psycopg_version : | | | ALLOWED_PSYCOPG_VERSIONS = ('2.0.7','2.0.8','2.0.9') | | | and the condition which is generating the ImportError from this file is : | | # check psycopg version and raise exception if does not match | if psycopg2.__version__[:9] not in ALLOWED_PSYCOPG_VERSIONS: | raise ImportError("psycopg version mismatch (imported %s)" % | psycopg2.__version__) | | could you please guide me which version should I add in | ALLOWED_PSYCOPG_VERSION list Don't do that unless you're not particularly fond of your data. 2.0.6 is not in this list because it contains bugs or incompatibilities with the 2.0.9 version of ZPsycopg. You have a psycopg 2.0.6 *somewhere* (the python package, not the Zope adapter). Either in your Zope's lib/python or in your site-packages for your python. You need to make sure that that is *also* 2.0.9 -- Andrew Milton akm@theinternet.com.au
I had found *psycopg2-2.0.6.egg-info* in * psycopg2-2.0.6.egg-info -> /usr/share/pycentral/python-psycopg2/site-packages/psycopg2-2.0.6.egg-info* this path,but I am not able to make out how could I replace this to 2.0.9 , Thanks Amol On Fri, Mar 6, 2009 at 3:08 PM, Andrew Milton <akm@theinternet.com.au>wrote:
+-------[ amol kumbhar ]---------------------- | nt-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: | quoted-printable Thanks for replying | but I am still there ..... | | My DA.py contain this list of allowed_psycopg_version : | | | ALLOWED_PSYCOPG_VERSIONS = ('2.0.7','2.0.8','2.0.9') | | | and the condition which is generating the ImportError from this file is : | | # check psycopg version and raise exception if does not match | if psycopg2.__version__[:9] not in ALLOWED_PSYCOPG_VERSIONS: | raise ImportError("psycopg version mismatch (imported %s)" % | psycopg2.__version__) | | could you please guide me which version should I add in | ALLOWED_PSYCOPG_VERSION list
Don't do that unless you're not particularly fond of your data. 2.0.6 is not in this list because it contains bugs or incompatibilities with the 2.0.9 version of ZPsycopg.
You have a psycopg 2.0.6 *somewhere* (the python package, not the Zope adapter).
Either in your Zope's lib/python or in your site-packages for your python.
You need to make sure that that is *also* 2.0.9
-- Andrew Milton akm@theinternet.com.au
-- Amol Kumbhar Software Developer SVBP informatics Cell : 9881720442 e-mail : amol.kumbhar39@gmail.com
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 amol kumbhar wrote:
Hi
I am using zope 2.10 , python2.4 and psycopg2-2.0.9 . I had created entry in ZIM successfully but while connecting to db it is giving me following error. Please pull me out from this ASAP.
An error was encountered while publishing this resource.
Error Type: ImportError Error Value: psycopg version mismatch (imported 2.0.6 (dec mx dt ext pq3))
Look at ZPsycopgDA/DA.py Edit the list in ALLOWED_PSYCOPG_VERSIONS to match your installed psycopg version. Regards Michael - -- http://blog.d2m.at http://planetzope.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJsN6tl0uAvQJUKVYRAm1oAJwOxbrfdOYkKGujsd8e7971P5bEoACdH2/o NpGGRm/4CHRdNap9RiN5liQ= =JcEm -----END PGP SIGNATURE-----
participants (4)
-
amol kumbhar -
Andreas Jung -
Andrew Milton -
Michael Haubenwallner