so I was able  to fix instance/Python-2.4.3/bin/python errors that I was getting by editing the psycopg1.py file and changing the following statement :-<br><br>import _psycopg as _2psycopg<br><br>to<br><br>import _2psycopg<br>
<br>now I am able to import psycopg2 @ zope python level but not yet on zope because when I add the connection object it gives the same mismatch version error.<br><br>Regards,<br>Amir<br><br>tlc2<br><br><br><br><div class="gmail_quote">
On Wed, Jun 24, 2009 at 11:23 AM, Amir <span dir="ltr">&lt;<a href="mailto:fixer.solver@gmail.com">fixer.solver@gmail.com</a>&gt;</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;">
Things that i have noticed<br><br>1)running and importing psycopg2 <br><br>gives this error <br><div class="im"><br>Traceback (most recent call last):<br></div>  File &quot;&lt;stdin&gt;&quot;, line 1, in ?<br>  File &quot;/usr/lib/python2.4/site-packages/psycopg2/__init__.py&quot;, 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:- &quot;from psycopg2 import psycopg1 as psycopg&quot;(also says to run in psycopg1.1.x compatible mode) and if i do import it this way it gives me this error <br><div class="im"><br>Traceback (most recent call last):<br>
</div>
  File &quot;&lt;stdin&gt;&quot;, line 1, in ?<br>  File &quot;/usr/lib/python2.4/site-packages/psycopg2/__init__.py&quot;, 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 = (&#39;2.0.7&#39;,&#39;2.0.8&#39;,&#39;2.0.9&#39;,&#39;2.0.10&#39;, &#39;2.0.11&#39;)<br><br><br>Regards,<br>Amir<br><br>tlc2<div><div></div><div class="h5">
<br><br><div class="gmail_quote">
On Wed, Jun 24, 2009 at 10:56 AM, Rowan Woodhouse <span dir="ltr">&lt;<a href="mailto:rwoodhouse@wirelessmeasurement.com" target="_blank">rwoodhouse@wirelessmeasurement.com</a>&gt;</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>
&gt; Hey,<br>
&gt;       yes i have it installed at<br>
&gt; instance/Python-2.4.3/lib/python2.4/site-packages/psycopg2  and i had also<br>
&gt; moved the adapter to the<br>
&gt; instance/client1/Products folder, but still it is giving me the version<br>
&gt; mismatch error. Also i checked the psycopg* in my system but<br>
&gt; over there also i can see that it is correct version that has been installed<br>
&gt; /usr/lib/python2.4/site-packages/psycopg2 .<br>
&gt;<br>
&gt; Regards,<br>
&gt; Amir<br>
&gt;<br>
&gt; tlc2<br>
&gt;<br>
&gt; On Tue, Jun 23, 2009 at 3:41 PM, Thomas Bennett &lt;<a href="mailto:bennetttm@appstate.edu" target="_blank">bennetttm@appstate.edu</a>&gt;wrote:<br>
&gt;<br>
&gt;&gt; Have you installed psycopg2 2.0.11, not the adapter but the library for<br>
&gt;&gt; python?  and is it in the python path for your Zope python?<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m thinking you have psycopg not psycopg2 installed as your python library<br>
&gt;&gt; and the psycopg2 adapter.  There is no psycopg 2.0.11.<br>
&gt;&gt;<br>
&gt;&gt; I am assuming this is still how psycopg is installed, the library and the<br>
&gt;&gt; DA<br>
&gt;&gt; product.<br>
&gt;&gt;<br>
&gt;&gt; <a href="http://initd.org/pub/software/psycopg/" target="_blank">http://initd.org/pub/software/psycopg/</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Thomas<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Tuesday 23 June 2009 16:06:03 Amir wrote:<br>
&gt;&gt;&gt; Hi,<br>
&gt;&gt;&gt;    I have (Zope 2.9.4-final, python 2.4.3, linux2) and I have used<br>
&gt;&gt;&gt; psycopg2.0.11 adapter to connect Zope to Postgresql but I am getting this<br>
&gt;&gt;&gt; error when I try to add the connection object the error is :-<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Error Type: ImportError<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Error Value: psycopg version mismatch (imported 2.0.11 (dt dec ext pq3))<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; while the event log traceback shows that :-<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; 2009-06-23T10:55:49 ERROR Shared.DC.ZRDB.Connection Error connecting to<br>
&gt;&gt;&gt; relational database.<br>
&gt;&gt;&gt; Traceback (most recent call last):<br>
&gt;&gt;&gt;   File &quot;/opt/Plone-2.5/lib/python/Shared/DC/ZRDB/Connection.py&quot;, line 71,<br>
&gt;&gt;&gt; in __setstate__<br>
&gt;&gt;&gt;     try: self.connect(self.connection_string)<br>
&gt;&gt;&gt;   File &quot;/opt/Plone-2.5/zeocluster/client1/Products/ZPsycopgDA/DA.py&quot;,<br>
&gt;&gt; line<br>
&gt;&gt;&gt; 120, in connect<br>
&gt;&gt;&gt;     raise ImportError(&quot;psycopg version mismatch (imported %s)&quot; %<br>
&gt;&gt;&gt; ImportError: psycopg version mismatch (imported 2.0.11 (dt dec ext pq3))<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I would appreciate for an answer asap.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Thanks<br>
&gt;&gt;&gt; Amir<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; tlc2<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; ***<br>
&gt;&gt;&gt; *<br>
&gt;&gt; --<br>
&gt;&gt;  Normally I&#39;m against big things,<br>
&gt;&gt;  I think the world is going to be saved by millions of small things.<br>
&gt;&gt; Too many things can go wrong when they get big.<br>
&gt;&gt; - Pete Seeger  at his 90th birthday party Sunday May 3, 2009<br>
&gt;&gt;<br>
&gt;&gt; ==========================================<br>
&gt;&gt; Thomas McMillan Grant Bennett           Appalachian State University<br>
&gt;&gt; Operations &amp; Systems Analyst            P O Box 32026<br>
&gt;&gt; University Library                                Boone, North Carolina<br>
&gt;&gt; 28608<br>
&gt;&gt; (828) 262 6587<br>
&gt;&gt;<br>
&gt;&gt; Library Systems Help Desk: <a href="https://www.library.appstate.edu/help/" target="_blank">https://www.library.appstate.edu/help/</a><br>
&gt;&gt; ==========================================<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Zope maillist  -  <a href="mailto:Zope@zope.org" target="_blank">Zope@zope.org</a><br>
&gt;&gt; <a href="http://mail.zope.org/mailman/listinfo/zope" target="_blank">http://mail.zope.org/mailman/listinfo/zope</a><br>
&gt;&gt; **   No cross posts or HTML encoding!  **<br>
&gt;&gt; (Related lists -<br>
&gt;&gt;  <a href="http://mail.zope.org/mailman/listinfo/zope-announce" target="_blank">http://mail.zope.org/mailman/listinfo/zope-announce</a><br>
&gt;&gt;  <a href="http://mail.zope.org/mailman/listinfo/zope-dev" target="_blank">http://mail.zope.org/mailman/listinfo/zope-dev</a> )<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
</div></div>&gt; ------------------------------------------------------------------------<br>
<div><div></div><div>&gt;<br>
&gt; _______________________________________________<br>
&gt; Zope maillist  -  <a href="mailto:Zope@zope.org" target="_blank">Zope@zope.org</a><br>
&gt; <a href="http://mail.zope.org/mailman/listinfo/zope" target="_blank">http://mail.zope.org/mailman/listinfo/zope</a><br>
&gt; **   No cross posts or HTML encoding!  **<br>
&gt; (Related lists -<br>
&gt;  <a href="http://mail.zope.org/mailman/listinfo/zope-announce" target="_blank">http://mail.zope.org/mailman/listinfo/zope-announce</a><br>
&gt;  <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>
</div></div></blockquote></div><br>