Things that i have noticed<br><br>1)running and importing psycopg2 <br><br>gives this error <br><br>Traceback (most recent call last):<br> File "<stdin>", line 1, in ?<br> File "/usr/lib/python2.4/site-packages/psycopg2/__init__.py", line 60, in ?<br>
from _psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID<br>ImportError: /usr/lib/python2.4/site-packages/psycopg2/_psycopg.so: undefined symbol: PyUnicodeUCS2_Decode<br><br>2) for some reason in the Python-2.4.3/lib/python2.4/site-packages/psycopg2 it has psycopg1.py so when i open it, it<br>
says in order to import do:- "from psycopg2 import psycopg1 as psycopg"(also says to run in psycopg1.1.x compatible mode) and if i do import it this way it gives me this error <br><br>Traceback (most recent call last):<br>
File "<stdin>", line 1, in ?<br> File "/usr/lib/python2.4/site-packages/psycopg2/__init__.py", line 55, in ?<br> from psycopg2 import tz<br>ImportError: cannot import name tz<br><br>I am thinking there is something in 2) is this normal? <br>
<br><br><br>ps : 2.0.11 is in the allowed psycopg ALLOWED_PSYCOPG_VERSIONS = ('2.0.7','2.0.8','2.0.9','2.0.10', '2.0.11')<br><br><br>Regards,<br>Amir<br><br>tlc2<br><br><div class="gmail_quote">
On Wed, Jun 24, 2009 at 10:56 AM, Rowan Woodhouse <span dir="ltr"><<a href="mailto:rwoodhouse@wirelessmeasurement.com" target="_blank">rwoodhouse@wirelessmeasurement.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I had the same problem but found that if I just modified the list of<br>
acceptable psycopg versions everything worked fine.<br>
<font color="#888888"><br>
Rowan<br>
</font><div><div></div><div><br>
Amir wrote:<br>
> Hey,<br>
> yes i have it installed at<br>
> instance/Python-2.4.3/lib/python2.4/site-packages/psycopg2 and i had also<br>
> moved the adapter to the<br>
> instance/client1/Products folder, but still it is giving me the version<br>
> mismatch error. Also i checked the psycopg* in my system but<br>
> over there also i can see that it is correct version that has been installed<br>
> /usr/lib/python2.4/site-packages/psycopg2 .<br>
><br>
> Regards,<br>
> Amir<br>
><br>
> tlc2<br>
><br>
> On Tue, Jun 23, 2009 at 3:41 PM, Thomas Bennett <<a href="mailto:bennetttm@appstate.edu" target="_blank">bennetttm@appstate.edu</a>>wrote:<br>
><br>
>> Have you installed psycopg2 2.0.11, not the adapter but the library for<br>
>> python? and is it in the python path for your Zope python?<br>
>><br>
>> I'm thinking you have psycopg not psycopg2 installed as your python library<br>
>> and the psycopg2 adapter. There is no psycopg 2.0.11.<br>
>><br>
>> I am assuming this is still how psycopg is installed, the library and the<br>
>> DA<br>
>> product.<br>
>><br>
>> <a href="http://initd.org/pub/software/psycopg/" target="_blank">http://initd.org/pub/software/psycopg/</a><br>
>><br>
>><br>
>> Thomas<br>
>><br>
>><br>
>><br>
>> On Tuesday 23 June 2009 16:06:03 Amir wrote:<br>
>>> Hi,<br>
>>> I have (Zope 2.9.4-final, python 2.4.3, linux2) and I have used<br>
>>> psycopg2.0.11 adapter to connect Zope to Postgresql but I am getting this<br>
>>> error when I try to add the connection object the error is :-<br>
>>><br>
>>> Error Type: ImportError<br>
>>><br>
>>> Error Value: psycopg version mismatch (imported 2.0.11 (dt dec ext pq3))<br>
>>><br>
>>> while the event log traceback shows that :-<br>
>>><br>
>>> 2009-06-23T10:55:49 ERROR Shared.DC.ZRDB.Connection Error connecting to<br>
>>> relational database.<br>
>>> Traceback (most recent call last):<br>
>>> File "/opt/Plone-2.5/lib/python/Shared/DC/ZRDB/Connection.py", line 71,<br>
>>> in __setstate__<br>
>>> try: self.connect(self.connection_string)<br>
>>> File "/opt/Plone-2.5/zeocluster/client1/Products/ZPsycopgDA/DA.py",<br>
>> line<br>
>>> 120, in connect<br>
>>> raise ImportError("psycopg version mismatch (imported %s)" %<br>
>>> ImportError: psycopg version mismatch (imported 2.0.11 (dt dec ext pq3))<br>
>>><br>
>>> I would appreciate for an answer asap.<br>
>>><br>
>>> Thanks<br>
>>> Amir<br>
>>><br>
>>> tlc2<br>
>>><br>
>>> ***<br>
>>> *<br>
>> --<br>
>> Normally I'm against big things,<br>
>> I think the world is going to be saved by millions of small things.<br>
>> Too many things can go wrong when they get big.<br>
>> - Pete Seeger at his 90th birthday party Sunday May 3, 2009<br>
>><br>
>> ==========================================<br>
>> Thomas McMillan Grant Bennett Appalachian State University<br>
>> Operations & Systems Analyst P O Box 32026<br>
>> University Library Boone, North Carolina<br>
>> 28608<br>
>> (828) 262 6587<br>
>><br>
>> Library Systems Help Desk: <a href="https://www.library.appstate.edu/help/" target="_blank">https://www.library.appstate.edu/help/</a><br>
>> ==========================================<br>
>> _______________________________________________<br>
>> Zope maillist - <a href="mailto:Zope@zope.org" target="_blank">Zope@zope.org</a><br>
>> <a href="http://mail.zope.org/mailman/listinfo/zope" target="_blank">http://mail.zope.org/mailman/listinfo/zope</a><br>
>> ** No cross posts or HTML encoding! **<br>
>> (Related lists -<br>
>> <a href="http://mail.zope.org/mailman/listinfo/zope-announce" target="_blank">http://mail.zope.org/mailman/listinfo/zope-announce</a><br>
>> <a href="http://mail.zope.org/mailman/listinfo/zope-dev" target="_blank">http://mail.zope.org/mailman/listinfo/zope-dev</a> )<br>
>><br>
><br>
><br>
</div></div>> ------------------------------------------------------------------------<br>
<div><div></div><div>><br>
> _______________________________________________<br>
> Zope maillist - <a href="mailto:Zope@zope.org" target="_blank">Zope@zope.org</a><br>
> <a href="http://mail.zope.org/mailman/listinfo/zope" target="_blank">http://mail.zope.org/mailman/listinfo/zope</a><br>
> ** No cross posts or HTML encoding! **<br>
> (Related lists -<br>
> <a href="http://mail.zope.org/mailman/listinfo/zope-announce" target="_blank">http://mail.zope.org/mailman/listinfo/zope-announce</a><br>
> <a href="http://mail.zope.org/mailman/listinfo/zope-dev" target="_blank">http://mail.zope.org/mailman/listinfo/zope-dev</a> )<br>
<br>
_______________________________________________<br>
Zope maillist - <a href="mailto:Zope@zope.org" target="_blank">Zope@zope.org</a><br>
<a href="http://mail.zope.org/mailman/listinfo/zope" target="_blank">http://mail.zope.org/mailman/listinfo/zope</a><br>
** No cross posts or HTML encoding! **<br>
(Related lists -<br>
<a href="http://mail.zope.org/mailman/listinfo/zope-announce" target="_blank">http://mail.zope.org/mailman/listinfo/zope-announce</a><br>
<a href="http://mail.zope.org/mailman/listinfo/zope-dev" target="_blank">http://mail.zope.org/mailman/listinfo/zope-dev</a> )<br>
</div></div></blockquote></div><br>