Re: [Zope] PoPy Installation. Where's the BEEF?

2001-01-11 Thread Steve Spicklemire


Did you move this Zope from it's original location in  /usr/local/zope?
I'm guessing you did.. and those paths are in the .pyc files.

try:

find /usr/local/EcoZope -name "*.pyc" -delete 

then (optionally) rerun w(o?)_pgci.py which will (among other things)
rebuild the .pyc files. If you don't, Zope will just be slower for a while
is it rebuilds the pyc files as it imports them (mostly at startup I 
would guess).

-steve

> "Eric" == Eric Walstad <[EMAIL PROTECTED]> writes:

Eric> AAKK!  I just noticed something...  -8<-- Start Snip
Eric> --8<- ZPoPyDA Import Traceback Traceback (innermost
Eric> last): File "/usr/local/Zope/lib/python/OFS/Application.py",
Eric> line 397, in import_products product=__import__(pname,
Eric> global_dict, global_dict, silly) File
Eric> "/usr/local/zope/lib/python/Products/ZPoPyDA/__init__.py",
Eric> line 32, in ?  File
Eric> "/usr/local/zope/lib/python/Products/ZPoPyDA/DA.py", line
Eric> 35, in ?  File
Eric> "/usr/local/zope/lib/python/Products/ZPoPyDA/PoPy_db.py",
Eric> line 35, in ?  The PoPy module is not installed -8<--
Eric> End Snip --8<- Notice the paths in the traceback.

Eric> I have one copy of Zope (no PostgreSQl support) in:
Eric> /usr/local/Zope

Eric> And another copy that will need to connect to PostgreSQL is
Eric> in: /usr/local/EcoZope

Eric> and ZPoPyDA is in:
Eric> /usr/local/EcoZope/lib/python/Products/ZPoPyDA/

Eric> The traceback is displaying wrong paths.  I searched the
Eric> ZPoPyDA python source for hard coded paths but didn't find
Eric> any.  Is there an environment variable that sets this?

Eric> Thanks for any help...  Eric.  

Eric> Eric Walstad [EMAIL PROTECTED] 


Eric> ___ Zope
Eric> maillist - [EMAIL PROTECTED]
Eric> http://lists.zope.org/mailman/listinfo/zope ** No cross
Eric> posts or HTML encoding!  ** (Related lists -
Eric> http://lists.zope.org/mailman/listinfo/zope-announce
Eric> http://lists.zope.org/mailman/listinfo/zope-dev )


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] PoPy Installation. Where's the BEEF?

2001-01-10 Thread Eric Walstad

AAKK!  I just noticed something...
-8<-- Start Snip --8<-
ZPoPyDA Import Traceback
Traceback (innermost last):
  File "/usr/local/Zope/lib/python/OFS/Application.py", line 397, in
import_products
product=__import__(pname, global_dict, global_dict, silly)
  File "/usr/local/zope/lib/python/Products/ZPoPyDA/__init__.py", line 32,
in ?
  File "/usr/local/zope/lib/python/Products/ZPoPyDA/DA.py", line 35, in ?
  File "/usr/local/zope/lib/python/Products/ZPoPyDA/PoPy_db.py", line 35, in
?
The PoPy module is not installed
-8<-- End Snip --8<-
Notice the paths in the traceback.

I have one copy of Zope (no PostgreSQl support) in:
/usr/local/Zope

And another copy that will need to connect to PostgreSQL is in:
/usr/local/EcoZope

and ZPoPyDA is in:
/usr/local/EcoZope/lib/python/Products/ZPoPyDA/

The traceback is displaying wrong paths.  I searched the ZPoPyDA python
source for hard coded paths but didn't find any.  Is there an environment
variable that sets this?

Thanks for any help...
Eric.


Eric Walstad
[EMAIL PROTECTED]



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] PoPy Installation. Where's the BEEF?

2001-01-10 Thread Magnus Heino (Rivermen)


> The PoPy module is not installed
> 
> So, it looks like I need to install PoPy.  I went to 

>Can anyone give me a pointer?

http://freshmeat.net/search/?q=popy

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] PoPy module finally compiled but there is another prob

2000-12-16 Thread Andreas Heckel

Paolo Quaglia wrote:
> 
> Hi to all
> Finally I compiled the Popy module (the 1.4) and I obtained the
> PoPymodule.so file
> I copied the module in the [ZopDir]/lib/python directory
> I installed the ZPoPyDA.0.7
> 
> but When I start Zop this error occour:
> 
> Traceback (innermost last):
> The PoPy module is old: Update your version of PoPy

Have a look at PoPy_db.py
Search for __compatibility__
I don't know if it was a bad thing but I changed it ot ('1.4.1',) and
the PoPyDA works.

-- 

Andreas Heckel   [EMAIL PROTECTED]
LINUX is like a wigwam ...no gates ...no windows and an apache inside
;-)

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] PoPy and Delete results

2000-11-28 Thread Chris Gray

Thanks for the response, Dieter.

For consistency within Zope, an integer result could still be repackaged
as a sequence result.

For now I can do what I wanted to by:

select count(food) from penguins
where food='Henri Bergson'

(thus getting the number of records about to be affected by a delete 
as a sequence result) before running:

delete from penguins
where food='Henri Bergson'

Cheers,
Chris

On Tue, 28 Nov 2000, Dieter Maurer wrote:

> Chris Gray writes:
>  > In psql a delete command returns a count of the number of rows
>  > deleted.  Is this returned result available to a ZSQL method using PoPy or
>  > PyGreSQL?
> I think, Zope should pass integer results from SQL commands.
> But I fear, it does not.
> 
> When I looked at the code (quite some time ago), I had the impression,
> that Zope does only pass sequence results. Integer results
> are translated into 'None'.
> 
> 
> Dieter
> 
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
> 


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] PoPy and Delete results

2000-11-27 Thread Dieter Maurer

Chris Gray writes:
 > In psql a delete command returns a count of the number of rows
 > deleted.  Is this returned result available to a ZSQL method using PoPy or
 > PyGreSQL?
I think, Zope should pass integer results from SQL commands.
But I fear, it does not.

When I looked at the code (quite some time ago), I had the impression,
that Zope does only pass sequence results. Integer results
are translated into 'None'.


Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] PoPy and system tables

2000-11-27 Thread Federico Di Gregorio

> can anybody out there tell me why this query fails 
> although PoPyDA is connected as postgres superuser ?
> 
> select * from pg_class

at now popy tries to dereference every oid thinking it is a large object.
obviously that is not tru for oids of system tables... *grin*

hope this helps,
federico

-- 
Federico Di Gregorio
MIXAD LIVE Chief of Research & Technology  [EMAIL PROTECTED]
Debian GNU/Linux Developer & Italian Press Contact[EMAIL PROTECTED]
 Best friends are often failed lovers. -- Me

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] PoPy and system tables

2000-11-26 Thread Andreas

Chris Gray wrote:
> 
> I can pinpoint the problem a bit more.
> 
> select
> relname, relowner, relpages, reltuples, relhasindex, relisshared, relkind,
> relnatts, relchecks, reltriggers, relukeys, relfkeys, relrefs, relhaspkey,
> relhasrules, relacl
> from pg_class
> 
> works fine but
> 
> select reltype from pg_class
> select relam from pg_class
> select rellongrelid from pg_class
> 
> all cause problems and sometimes crash my instance of Zope!  These three
> fields all have the type oid.  Apparently PoPy can't handle returned
> values of this type.

PoPyDA has serious problems with oid fields.
But I found a temporary solution.

select int4(relam) from pg_class



-- 

Andreas Heckel   [EMAIL PROTECTED]
UNIX is like a wigwam ...no gates ...no windows and an apache inside ;-)

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] PoPy and system tables

2000-11-25 Thread Chris Gray

I can pinpoint the problem a bit more.

select 
relname, relowner, relpages, reltuples, relhasindex, relisshared, relkind,
relnatts, relchecks, reltriggers, relukeys, relfkeys, relrefs, relhaspkey,
relhasrules, relacl
from pg_class

works fine but

select reltype from pg_class
select relam from pg_class
select rellongrelid from pg_class

all cause problems and sometimes crash my instance of Zope!  These three
fields all have the type oid.  Apparently PoPy can't handle returned
values of this type.

Chris

On Sun, 26 Nov 2000, Andreas wrote:

> Hi,
> can anybody out there tell me why this query fails 
> although PoPyDA is connected as postgres superuser ?
> 
> select * from pg_class
> 
> BTW: when I try this query I get no traceback :-(
> 
> Postgres 7.02
> PoPy 1.4.1
> ZPoPyDA 0.7
> Zope2.1.6
> Linux 2.2.13
> 
> 
> -- 
> _
> Andreas Heckel[EMAIL PROTECTED]
> 
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
> 



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] PoPy and system tables

2000-11-25 Thread Andreas

Andreas wrote:
> 
> Hi,
> can anybody out there tell me why this query fails
> although PoPyDA is connected as postgres superuser ?
> 
> select * from pg_class

by now I found there is a problem with pg_class.oid.
"select relname from pg_class" works fine
"select oid from pg_class" fails


-- 

Andreas Heckel   [EMAIL PROTECTED]
Linux is like a wigwam ...no gates ...no windows and an apache inside
;-)

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] PoPy

2000-11-20 Thread Kyler B. Laird


On Mon, 30 Oct 2000 10:43:16 +1030 (CST) you wrote:

>ImportError: ./PoPymodule.so: Undefined symbol "sem_wait"

Take a look at the man page for sem_wait().  Take the
library/libraries listed there and put them on the
configure line for PoPy.  In my case (Solaris 2.6), I
added "--with-libs=-lposix4".

It'd be nice if PoPy would do this on its own.

--kyler

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Re: Fwd: Re: [Zope] PoPy module

2000-06-06 Thread Andreas

"Bak @ kedai" wrote:
> 
> On Mon, 05 Jun 2000, Thierry MICHEL wrote:
> >
> > > 2. Whether Auto-commit mode is on or off on ZPoPyDA  the new postgres
> > > 7.0 syntax
> > >  "select * from foo limit 20 offset 10" returns all records of foo and
> > > not only 20 !
> > >   With PyGreSQLDA it works :-)
> >
> > That's running every where, it's strange that's not running on your system.
> > Do you have packed the database of Zope ? Do you have create a new object ?
> >
> i will vouch for this, although i'm using postgres 6.5 (from rpm).  i packed
> the database,  stop and start zope.  create a zpopyda connection, and test the
> connection with SQL query.  and limit doesn't work.

It can't worke with postgres 6.5 because it's a NEW FEATURE of postgres
7.0 :-) 

-- 
_
Andreas Heckel[EMAIL PROTECTED]

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Re: Fwd: Re: [Zope] PoPy module

2000-06-05 Thread Bak @ kedai

On Mon, 05 Jun 2000, Thierry MICHEL wrote:
>
> > 2. Whether Auto-commit mode is on or off on ZPoPyDA  the new postgres
> > 7.0 syntax 
> >  "select * from foo limit 20 offset 10" returns all records of foo and
> > not only 20 !
> >   With PyGreSQLDA it works :-)
> 
> That's running every where, it's strange that's not running on your system.
> Do you have packed the database of Zope ? Do you have create a new object ?
>
i will vouch for this, although i'm using postgres 6.5 (from rpm).  i packed
the database,  stop and start zope.  create a zpopyda connection, and test the
connection with SQL query.  and limit doesn't work.

  
> PygresqlDA runs ok because it doesn't deal with cursors ... :-)
> 
> Thierry
> [EMAIL PROTECTED]
>

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Re: Fwd: Re: [Zope] PoPy module

2000-06-05 Thread Andreas

Thierry MICHEL wrote:
...
> > 1. When I try to connect to postgres 6.4 using PoPy the connect fails
> >postgres.log: ERROR: parser: parse error at or near "transaction"
> 
> Postgres 6.4 seems not being SQL 92 compliant for the transactions !
> PoPy is ! pygresql no certtainly !

OK ... take it as a note for users still working with postgres 6.4 ;-)

 
> > 2. Whether Auto-commit mode is on or off on ZPoPyDA  the new postgres
> > 7.0 syntax
> >  "select * from foo limit 20 offset 10" returns all records of foo and
> > not only 20 !
> >   With PyGreSQLDA it works :-)
> 
> That's running every where, it's strange that's not running on your system.
> Do you have packed the database of Zope ? Do you have create a new object ?
> 
> PygresqlDA runs ok because it doesn't deal with cursors ... :-)

I of course I packed the Zope database several times.
But after I installed PoPy I did not pack it. I only
created a Z PoPy Database connection and a Z SQL Method to test the DA.

Please reply if I can help you with some logs or version info of my
system.

-- 
_
Andreas Heckel[EMAIL PROTECTED]
Programmers don't die, they just GOSUB without RETURN ;-)

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Re: Fwd: Re: [Zope] PoPy module

2000-06-05 Thread Thierry MICHEL

On Mon, Jun 05, 2000 at 10:25:20AM +0200, [EMAIL PROTECTED] wrote:
> 
> 
> -- Forwarded message --
>   Da: jani <[EMAIL PROTECTED]>
> Soggetto: Re: [Zope] PoPy module
> Data: Sun, 04 Jun 2000 20:14:03 -0700
>A: Alexander N Gould <[EMAIL PROTECTED]>
>Copia: [EMAIL PROTECTED]
> 
> Alexander N Gould wrote:
> > 
> > I'm trying to install the PoPy Python module on my Yellowdog Linux system
> > (a redhat clone for PowerPC hardware).  I'm sure it's a simple task, but I
> > don't know how to do it.  Any suggestions or tips?  Thanks in advance.
> > 
> > Building highways to reduce traffic is like loosening your belt to reduce
> > obesity
> 
> First make sure that pyton-devel is installed on your system. 
> It's available at www.python.org I think.
> 
> Untar PoPy-1.1.tar.gz and ZPoPyDA-0.3.tar.gz .
> First you have to build PoPy. 
> On my system I had to modify the lib and include path in Setup and
> in PoPymodule.c
> 
> Setup:
> *shared*
> PoPy PoPymodule.c -I/usr/local/pgsql/include -L/usr/local/pgsql/lib -lpr
> 
> PoPymodule.c:
> ...
> #include 
> #include 
> ...
> 
> Go on with:
> make -f Makefile.pre.in boot
> make
> 
> You should now have the shared library PoPymodule.so .
> Copy this file to python1.5/site-packages on your system.

With make install, it compiles and installs directly in the python1.5/site-packages.
 
> Now you have to install zope-popyda-0.3
> "make install" will place the Zope product to
> /usr/lib/zope/lib/python/Products/ZPoPyDA
> 
> Just move it to the Product folder of your Zope installation.
> Restart Zope and it should work ;-)
> 
> Take a look at the README. It describes the format of the connection
> string.
> It's different from that of PyGreSQLDA!
> Also make sure that you hav set proper permissions on
> &PGDATA/pg_hba.conf
> 
> BTW after i recognized some problems using PoPy I switched back to
> PyGreSQLDA.

> 1. When I try to connect to postgres 6.4 using PoPy the connect fails
>postgres.log: ERROR: parser: parse error at or near "transaction"

Postgres 6.4 seems not being SQL 92 compliant for the transactions !
PoPy is ! pygresql no certtainly !
 
> 2. Whether Auto-commit mode is on or off on ZPoPyDA  the new postgres
> 7.0 syntax 
>  "select * from foo limit 20 offset 10" returns all records of foo and
> not only 20 !
>   With PyGreSQLDA it works :-)

That's running every where, it's strange that's not running on your system.
Do you have packed the database of Zope ? Do you have create a new object ?

PygresqlDA runs ok because it doesn't deal with cursors ... :-)

Thierry
[EMAIL PROTECTED]

 
> -- 
> _
> Andreas Heckel[EMAIL PROTECTED]
> 
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
> 
> 
> 

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] PoPy module

2000-06-04 Thread jani

Alexander N Gould wrote:
> 
> I'm trying to install the PoPy Python module on my Yellowdog Linux system
> (a redhat clone for PowerPC hardware).  I'm sure it's a simple task, but I
> don't know how to do it.  Any suggestions or tips?  Thanks in advance.
> 
> Building highways to reduce traffic is like loosening your belt to reduce
> obesity

First make sure that pyton-devel is installed on your system. 
It's available at www.python.org I think.

Untar PoPy-1.1.tar.gz and ZPoPyDA-0.3.tar.gz .
First you have to build PoPy. 
On my system I had to modify the lib and include path in Setup and
in PoPymodule.c

Setup:
*shared*
PoPy PoPymodule.c -I/usr/local/pgsql/include -L/usr/local/pgsql/lib -lpr

PoPymodule.c:
...
#include 
#include 
...

Go on with:
make -f Makefile.pre.in boot
make

You should now have the shared library PoPymodule.so .
Copy this file to python1.5/site-packages on your system.

Now you have to install zope-popyda-0.3
"make install" will place the Zope product to
/usr/lib/zope/lib/python/Products/ZPoPyDA

Just move it to the Product folder of your Zope installation.
Restart Zope and it should work ;-)

Take a look at the README. It describes the format of the connection
string.
It's different from that of PyGreSQLDA!
Also make sure that you hav set proper permissions on
&PGDATA/pg_hba.conf

BTW after i recognized some problems using PoPy I switched back to
PyGreSQLDA.
1. When I try to connect to postgres 6.4 using PoPy the connect fails
   postgres.log: ERROR: parser: parse error at or near "transaction"

2. Whether Auto-commit mode is on or off on ZPoPyDA  the new postgres
7.0 syntax 
 "select * from foo limit 20 offset 10" returns all records of foo and
not only 20 !
  With PyGreSQLDA it works :-)

-- 
_
Andreas Heckel[EMAIL PROTECTED]

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )