[Zope-DB] Database Adapter issue

Tom Dossis td@yoma.com.au
Tue, 20 Aug 2002 16:29:28 +1000


Ken wrote:
> Hmm..Yep your probably right. I did install python on the system.
> 
> I uninstalled the adapter and reinstalled..Odd..
> Here's the error now.. It's a bit different.
> 
> 
> ImportError:
> /usr/local/www/Zope/lib/python/Products/ZPsycopgDA/psycopgmodule.so:
> Undefined symbol "PyType_IsSubtype"
> 
> Wow.. I wonder how I manage to keep doing these silly things to myself :)
> output of which python is /usr/local/bin. I am guessing that is the system
> installed version. Where is the actuall python install that comes with Zope
> ?

It all depends on your zope startup script... it could be anything like..
$INST_HOME/bin/python
or
/usr/bin/python
or
python
or..

If you're running Zope's python ($INST_HOME/bin/python), then your 
psycopg module should be installed somewhere like 
$INST_HOME/lib/python2.1/site-packages

If your system python version is OK (2.1.3?) with zope 2.5.1 then you 
can start zope with /usr/local/bin/python and it should pickup the 
psycopg module in its site-packages.

Also keep in mind - I know nothing about psycopg...

-Tom

> 
> 
> Thanks again.
> 
> 
> -----Original Message-----
> From: Tom Dossis [mailto:td@yoma.com.au]
> Sent: Monday, August 19, 2002 10:45 PM
> To: Ken
> Cc: zope-db@zope.org
> Subject: Re: [Zope-DB] Database Adapter issue
> 
> 
> Ken wrote:
> 
>>Thanks Tom,
>>
>>I have the module installed and it is located in Zope/lib/python
>>That should work right ?
>>
>>Also, I can fire up python from my home directory, and type import psycopg
>>and hit enter. I recieve no error so I am assuming that is finding it.
>>
>>Does this sound right ?
> 
> 
> That's good.  Are you and Zope running the same python? Zope comes with
> it's own python installation and maybe your system has it's own?
> 
> 
>>
>>Ken
>>
>>
>>
>>
>>
>>>Traceback (most recent call last):
>>> File "/usr/local/www/Zope/lib/python/OFS/Application.py", line 531, in
>>>import_product
>>>   product=__import__(pname, global_dict, global_dict, silly)
>>> File "/usr/local/www/Zope/lib/python/Products/ZPsycopgDA/__init__.py",
>>>line 92, in ?
>>>   import DA
>>> File "/usr/local/www/Zope/lib/python/Products/ZPsycopgDA/DA.py", line
>>
>>91,
>>
>>
>>>in ?
>>>   from db import DB
>>> File "/usr/local/www/Zope/lib/python/Products/ZPsycopgDA/db.py", line
>>
>>99,
>>
>>
>>>in ?
>>>   import psycopg
>>>ImportError: No module named psycopg
>>
>>
>>
>>Have you installed the underlying python2.1-psycopg package/module?
>>If so where? Looks like it's not in your Zope python path..
>>
>> From with the python interpreter the following command needs to work
>>without error:
>>
>>import psycopg
>>
>>
>>I use Postgres 7.1 to store faxes encoded in base64 which are >>2K
>>(though I use the ZPoPyDA adaptor).
>>The type 'TEXT' - provides for unlimited number of characters.  A good
>>online book can be found at:
>>
>>http://www.ca.postgresql.org/docs/aw_pgsql_book/index.html
>>
>>
>>Regards
>>-Tom
>>
>>
>>
>>_______________________________________________
>>Zope-DB mailing list
>>Zope-DB@zope.org
>>http://lists.zope.org/mailman/listinfo/zope-db
>>
> 
> 
> 
> 
> 
> 
> _______________________________________________
> Zope-DB mailing list
> Zope-DB@zope.org
> http://lists.zope.org/mailman/listinfo/zope-db
>