[Zope-dev] Zope Tests: 7 OK

2007-01-19 Thread Zope Tests Summarizer
Summary of messages to the zope-tests list.
Period Thu Jan 18 12:00:00 2007 UTC to Fri Jan 19 12:00:00 2007 UTC.
There were 7 messages: 7 from Zope Unit Tests.


Tests passed OK
---

Subject: OK : Zope-2.6 Python-2.1.3 : Linux
From: Zope Unit Tests
Date: Thu Jan 18 21:06:59 EST 2007
URL: http://mail.zope.org/pipermail/zope-tests/2007-January/007069.html

Subject: OK : Zope-2.6 Python-2.3.6 : Linux
From: Zope Unit Tests
Date: Thu Jan 18 21:08:29 EST 2007
URL: http://mail.zope.org/pipermail/zope-tests/2007-January/007070.html

Subject: OK : Zope-2.7 Python-2.3.6 : Linux
From: Zope Unit Tests
Date: Thu Jan 18 21:09:59 EST 2007
URL: http://mail.zope.org/pipermail/zope-tests/2007-January/007071.html

Subject: OK : Zope-2.8 Python-2.3.6 : Linux
From: Zope Unit Tests
Date: Thu Jan 18 21:11:30 EST 2007
URL: http://mail.zope.org/pipermail/zope-tests/2007-January/007072.html

Subject: OK : Zope-2.9 Python-2.4.4 : Linux
From: Zope Unit Tests
Date: Thu Jan 18 21:13:00 EST 2007
URL: http://mail.zope.org/pipermail/zope-tests/2007-January/007073.html

Subject: OK : Zope-2.10 Python-2.4.4 : Linux
From: Zope Unit Tests
Date: Thu Jan 18 21:14:30 EST 2007
URL: http://mail.zope.org/pipermail/zope-tests/2007-January/007074.html

Subject: OK : Zope-trunk Python-2.4.4 : Linux
From: Zope Unit Tests
Date: Thu Jan 18 21:16:00 EST 2007
URL: http://mail.zope.org/pipermail/zope-tests/2007-January/007075.html

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: [Plone-developers] ploneout - Or how using zc.buildout for a common Zope2 project might look like

2007-01-19 Thread Martijn Faassen

Hanno Schlichting wrote:

Martijn Faassen wrote:

[snip]

Great idea! We should try this. Hanno? :)


Yep, we can try that one too. I thought I remembered people reporting
bugs about the multiple Products directories at some point, but I cannot
remember where that was exactly. I only did go for the symlink approach
as that has been the way I did it on Windows, at the time I developed on
Windows (see http://en.wikipedia.org/wiki/NTFS_junction_point for some
explanation of Windows symlink support).


I guess we can disregard most of my 'Products as eggs' mail and simply
allowing us to point to products directories in the Zope 2 instance
recipe. I think a good pattern would be to simply have a 'Products'
directory directly in the buildout directory.


Shouldn't we have the same distinction between products and development
products as we have it with eggs and development eggs?


Ideally perhaps, but since Products are just simple directories and 
don't really support this, we might want to skip this step for now.



If you develop a set of products based on CMF for example, you might
want to have an unpacked tarball of the latest CMF release lying around
and have it included in the Zope instance, plus your own products that
probably come directly from a SVN checkout.

This would give us both a products and develop-products directory, which
you could both include in an instance's zope.conf.


If we can make this work that would of course be nice. :)

Regards,

Martijn

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] [Zope2] 'zopectl test' failing on the trunk and 2.10 branch

2007-01-19 Thread Andreas Jung

Hi,

although make test reports no errors for the trunk/2.10 branch I get the
following errors when running zopectl test. Any ideas?

Andreas

--

Traceback (most recent call last):
 File 
/develop/sandboxes/Zope/Zope2/trunk/lib/python/Testing/ZopeTestCase/profiler.py, 
line 88, in __call__

   self.setUp()
 File 
/develop/sandboxes/Zope/Zope2/trunk/lib/python/Testing/ZopeTestCase/base.py, 
line 92, in setUp

   self.afterSetUp()
 File 
/develop/sandboxes/Zope/Zope2/trunk/lib/python/Testing/ZopeTestCase/testShoppingCart.py, 
line 71, in afterSetUp

   request.set('SESSION', sdm.getSessionData())
 File 
/develop/sandboxes/Zope/Zope2/trunk/lib/python/Products/Sessions/SessionDataManager.py, 
line 94, in getSessionData

   return self._getSessionDataObject(key)
 File 
/develop/sandboxes/Zope/Zope2/trunk/lib/python/Products/Sessions/SessionDataManager.py, 
line 180, in _getSessionDataObject

   container = self._getSessionDataContainer()
 File 
/develop/sandboxes/Zope/Zope2/trunk/lib/python/Products/Sessions/SessionDataManager.py, 
line 223, in _getSessionDataContainer

   raise SessionDataManagerErr, (
SessionDataManagerErr: External session data container 
'/temp_folder/session_data' not found.


.

Error in test testAddQuantity 
(Testing.ZopeTestCase.testShoppingCart.TestSandboxedShoppingCart)

Traceback (most recent call last):
 File 
/develop/sandboxes/Zope/Zope2/trunk/lib/python/Testing/ZopeTestCase/profiler.py, 
line 88, in __call__

   self.setUp()
 File 
/develop/sandboxes/Zope/Zope2/trunk/lib/python/Testing/ZopeTestCase/base.py, 
line 92, in setUp

   self.afterSetUp()
 File 
/develop/sandboxes/Zope/Zope2/trunk/lib/python/Testing/ZopeTestCase/testShoppingCart.py, 
line 71, in afterSetUp

   request.set('SESSION', sdm.getSessionData())
 File 
/develop/sandboxes/Zope/Zope2/trunk/lib/python/Products/Sessions/SessionDataManager.py, 
line 94, in getSessionData

   return self._getSessionDataObject(key)
 File 
/develop/sandboxes/Zope/Zope2/trunk/lib/python/Products/Sessions/SessionDataManager.py, 
line 180, in _getSessionDataObject

   container = self._getSessionDataContainer()
 File 
/develop/sandboxes/Zope/Zope2/trunk/lib/python/Products/Sessions/SessionDataManager.py, 
line 223, in _getSessionDataContainer

   raise SessionDataManagerErr, (
SessionDataManagerErr: External session data container 
'/temp_folder/session_data' not found.


.

Error in test testCartIsEmpty 
(Testing.ZopeTestCase.testShoppingCart.TestSandboxedShoppingCart)

Traceback (most recent call last):
 File 
/develop/sandboxes/Zope/Zope2/trunk/lib/python/Testing/ZopeTestCase/profiler.py, 
line 88, in __call__

   self.setUp()
 File 
/develop/sandboxes/Zope/Zope2/trunk/lib/python/Testing/ZopeTestCase/base.py, 
line 92, in setUp

   self.afterSetUp()
 File 
/develop/sandboxes/Zope/Zope2/trunk/lib/python/Testing/ZopeTestCase/testShoppingCart.py, 
line 71, in afterSetUp

   request.set('SESSION', sdm.getSessionData())
 File 
/develop/sandboxes/Zope/Zope2/trunk/lib/python/Products/Sessions/SessionDataManager.py, 
line 94, in getSessionData

   return self._getSessionDataObject(key)
 File 
/develop/sandboxes/Zope/Zope2/trunk/lib/python/Products/Sessions/SessionDataManager.py, 
line 180, in _getSessionDataObject

   container = self._getSessionDataContainer()
 File 
/develop/sandboxes/Zope/Zope2/trunk/lib/python/Products/Sessions/SessionDataManager.py, 
line 223, in _getSessionDataContainer

   raise SessionDataManagerErr, (
SessionDataManagerErr: External session data container 
'/temp_folder/session_data' not found.


.

Error in test testDeleteItems 
(Testing.ZopeTestCase.testShoppingCart.TestSandboxedShoppingCart)

Traceback (most recent call last):
 File 
/develop/sandboxes/Zope/Zope2/trunk/lib/python/Testing/ZopeTestCase/profiler.py, 
line 88, in __call__

   self.setUp()
 File 
/develop/sandboxes/Zope/Zope2/trunk/lib/python/Testing/ZopeTestCase/base.py, 
line 92, in setUp

   self.afterSetUp()
 File 
/develop/sandboxes/Zope/Zope2/trunk/lib/python/Testing/ZopeTestCase/testShoppingCart.py, 
line 71, in afterSetUp

   request.set('SESSION', sdm.getSessionData())
 File 
/develop/sandboxes/Zope/Zope2/trunk/lib/python/Products/Sessions/SessionDataManager.py, 
line 94, in getSessionData

   return self._getSessionDataObject(key)
 File 
/develop/sandboxes/Zope/Zope2/trunk/lib/python/Products/Sessions/SessionDataManager.py, 
line 180, in _getSessionDataObject

   container = self._getSessionDataContainer()
 File 
/develop/sandboxes/Zope/Zope2/trunk/lib/python/Products/Sessions/SessionDataManager.py, 
line 223, in _getSessionDataContainer

   raise SessionDataManagerErr, (
SessionDataManagerErr: External session data container 
'/temp_folder/session_data' not found.


.

Error in test testEight 
(Testing.ZopeTestCase.testShoppingCart.TestSandboxedShoppingCart)

Traceback (most recent call last):
 File 
/develop/sandboxes/Zope/Zope2/trunk/lib/python/Testing/ZopeTestCase/profiler.py, 
line 88, in __call__

   self.setUp()
 File 

Re: [Zope-Perl] Installing pyperl on Mac OS X?

2007-01-19 Thread Felix Schwarz

Daryl Spitzer schrieb:

I installed pyperl-1.0.1 (apparently) without error, but `python
test.py` fails: pdb tells me that import perl results in
ImportError: perl2.so not found.  I get the same message if I try
import perl in the Python interpreter.  So I guess it didn't install
properly.

Does anyone have any troubleshooting suggestions?


This is expected if you don't use 1.0.1c but 1.0.1. See 
http://wiki.python.org/moin/PyPerl for a download link.


fs
___
Zope-perl maillist  -  Zope-perl@zope.org
http://mail.zope.org/mailman/listinfo/zope-perl


[Zope] Zope pretends to receive and send XMLRPC data, but strace sees nothing !

2007-01-19 Thread yacine chaouche

Sorry, it seems I didn't click on the right button :), here is the message
sent to the list this time :

Thank you Andreas for showing me this nice tool which is tcpflow.

Thanks to it, I am now sure that the probleme is coming from zope.


Would you take a look at this :
[EMAIL PROTECTED]:~/HTTPCONNECTIONS# tcpflow host 10.75.49.100 and port 8081
tcpflow[20104]: listening on eth0

The tcpflow is run on the 10.75.49.51 machine, the one that zope thinks it
sends two times the XMLRPC query.
10.75.49.100 is the server that runs zope.

Now i click on the button, on both browsers (remember they are on different
machines), invoking the method toutCompter via xmlhttprequest, and wait
for zope to complete the requests :

zope trace to the console
ip: 10.75.49.155 requests counting of lines 1 to 11
ip: 10.75.49.51 requests counting of lines 1 to 11
sending results to 10.75.49.155
sending results to 10.75.49.51
ip: 10.75.49.51 requests counting of lines 1 to 11
sending results to 10.75.49.51
/zope trace


Zope says he got 2 requests form 10.75.49.51 and sent it the results 2
times. Ok, let's check the tcpflow then for these supposed connections :
[EMAIL PROTECTED]:~/HTTPCONNECTIONS# ls
total 8,0K
-rw-r--r-- 1 root root 873 2007-01-18 18:52 010.075.049.051.41131-010.075
.049.100.08081
-rw-r--r-- 1 root root 607 2007-01-18 18:53
010.075.049.100.08081-010.075.049.051.41131

Allright, first file (machine to server):

[EMAIL PROTECTED]:~/HTTPCONNECTIONS# cat 
010.075.049.051.41131-010.075.049.100.08081
POST /aef/rechercheMultiligne/toutCompter HTTP/1.1
Host: 10.75.49.100:8081
User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.8.1) Gecko/20061010
Firefox/2.0
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9
,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: fr,en-us;q=0.7,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-15,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Referer: http://10.75.49.100:8081/aef/rechercheMultiligne
Content-Length: 224
Cookie: _ZopeId=58653529A2r8NuahgXc
Pragma: no-cache
Cache-Control: no-cache

requete_1=ape%2012*requete_2=ape%2012*requete_3=ape%2012*requete_4=ape%2012*requete_5=ape%2012*requete_6=ape%2012*requete_7=ape%2012*requete_8=ape%2012*requete_9=ape%2012*requete_10=ape%2012*borneInf=0borneSup=
10[EMAIL PROTECTED]:~/HTTPCONNECTIONS#


Allright, there is only ONE POST request. So zope didnt really got two
requests. Now let's see if it sent the data two times as it presumes :

[EMAIL PROTECTED]:~/HTTPCONNECTIONS# cat 
010.075.049.100.08081-010.075.049.051.41131
HTTP/1.1 200 OK
Server: Zope/(Zope 2.9.0-, python 2.4.2, linux2) ZServer/1.1
Date: Thu, 18 Jan 2007 17:51:42 GMT
Content-Length: 413
Charset: utf-8
Content-Type: text/xml; charset=utf-8

?xml version=1.0 encoding=utf-8 ?comptagescomptage
numLigne=13/comptagecomptage numLigne=23/comptagecomptage
numLigne=33/comptagecomptage numLigne=43/comptagecomptage
numLigne=53/comptagecomptage numLigne=63/comptagecomptage
numLigne=73/comptagecomptage numLigne=83/comptagecomptage
numLigne=93/comptagecomptage numLigne=103/comptage/comptages
[EMAIL PROTECTED]:~/HTTPCONNECTIONS#

The results were sent just one time, not two.

What is going on here ?

Any comment would be really appreciated.

Thanks,
Y.Chaouche
___
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 )


Re: [Zope] Zope pretends to receive and send XMLRPC data, but strace sees nothing ! (fwd)

2007-01-19 Thread yacine chaouche

The toutCompter methode does a lot of thing and it would take a triple
couples of lines to describe what it does all.
Anyway, is there a way for me to detect ConflictErrors ? they don't appear
on the console so i guess they are catched.

Y.Chaouche

2007/1/19, Gabriel Genellina [EMAIL PROTECTED]:


At Thursday 18/1/2007 16:30, Andreas Jung wrote:


zope trace to the console
ip: 10.75.49.155 requests counting of lines 1 to 11
ip: 10.75.49.51 requests counting of lines 1 to 11
sending results to 10.75.49.155
sending results to 10.75.49.51
ip: 10.75.49.51 requests counting of lines 1 to 11
sending results to 10.75.49.51
/zope trace


Zope says he got 2 requests form 10.75.49.51 and sent it the results 2
times. Ok, let's check the tcpflow then for these supposed connections :
[...]
Allright, there is only ONE POST request. So zope didnt really got two
requests. Now let's see if it sent the data two times as it presumes :
[...]
The results were sent just one time, not two.

What is going on here ?

What does the toutCompter method really does? Does it modify some
object state? That might provoke a ConflictError, forcing a
transaction abort and the request to be re-tried (up to three times,
silently, then it goes logged).


--
Gabriel Genellina
Softlab SRL






__
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas

___
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 )

___
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 )


Re: [Zope] Zope pretends to receive and send XMLRPC data, but strace sees nothing ! (fwd)

2007-01-19 Thread yacine chaouche

I mean triple couples of lines of code.

2007/1/19, yacine chaouche [EMAIL PROTECTED]:


The toutCompter methode does a lot of thing and it would take a triple
couples of lines to describe what it does all.
Anyway, is there a way for me to detect ConflictErrors ? they don't appear
on the console so i guess they are catched.

Y.Chaouche

2007/1/19, Gabriel Genellina [EMAIL PROTECTED]:

 At Thursday 18/1/2007 16:30, Andreas Jung wrote:


 zope trace to the console
 ip: 10.75.49.155 requests counting of lines 1 to 11
 ip: 10.75.49.51 requests counting of lines 1 to 11
 sending results to 10.75.49.155
 sending results to 10.75.49.51
 ip: 10.75.49.51 requests counting of lines 1 to 11
 sending results to 10.75.49.51
 /zope trace
 
 
 Zope says he got 2 requests form 10.75.49.51 and sent it the results 2
 times. Ok, let's check the tcpflow then for these supposed connections
 :
 [...]
 Allright, there is only ONE POST request. So zope didnt really got two
 requests. Now let's see if it sent the data two times as it presumes :
 [...]
 The results were sent just one time, not two.
 
 What is going on here ?

 What does the toutCompter method really does? Does it modify some
 object state? That might provoke a ConflictError, forcing a
 transaction abort and the request to be re-tried (up to three times,
 silently, then it goes logged).


 --
 Gabriel Genellina
 Softlab SRL






 __
 Preguntá. Respondé. Descubrí.
 Todo lo que querías saber, y lo que ni imaginabas,
 está en Yahoo! Respuestas (Beta).
 ¡Probalo ya!
 http://www.yahoo.com.ar/respuestas

 ___
 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 )



___
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 )


Re: [Zope] How to get modules that are called by external methods reloaded?

2007-01-19 Thread Maciej Wisniowski

 Subject says it sall.
 Only way I have found so far is to restart zope, and on a production server, 
 that is not very popular. Takes about 10 minutes on ours..
   
Have you tried to go into Edit form of your external method
and just hit Save button?
This should tell you that External method was updated.

-- 
Maciej Wisniowski
___
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 )


Re: [Zope] Running egg-packaged product tests

2007-01-19 Thread Sébastien Nicouleaud

Maybe I should reformulate :

Is there a simple way to run unit tests for products packaged as eggs with
Zope 2.9.6+Five 1.4.2, or with Zope 2.10.1 ?

Thanks
Seb


2007/1/12, Sébastien Nicouleaud [EMAIL PROTECTED]:


Hello,

I'm trying to run tests for an egg-packaged product (deployed in
development mode), with zope 2.10.1.
I'm using the zopectl test command, with --path set to my product
source directory.

The problem is that the test runner seems to call the product initialize()
function 2 times (one during zope initialization, and one during testrunner
initialization), resulting in duplicated profile id declarations...

Is there a way to run the tests for an egg-packaged product without
setting the --path option to the source dir, in order to prevent this
duplication ?

Thanks
Seb
___
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 )


Re: [Zope] How to get modules that are called by external methodsreloaded?

2007-01-19 Thread Jonathan


- Original Message - 
From: Gaute Amundsen [EMAIL PROTECTED]

To: zope@zope.org
Sent: Friday, January 19, 2007 4:36 AM
Subject: [Zope] How to get modules that are called by external 
methodsreloaded?




Subject says it sall.
Only way I have found so far is to restart zope, and on a production 
server,

that is not very popular. Takes about 10 minutes on ours..


AFAIK there is no way to reload a module called by an External Method 
without restarting Zope.  I have encountered this situation many many times. 
If at all possible you should set up a development server so that you can do 
this more quickly (my restarts take about 10-15 seconds) and not impact 
production users.


If you are really stuck with a single server for production and development 
one possible work-around is that you could copy the module source code into 
your external method, develop/debug, then move it out into its own file when 
has been completed.


Jonathan 


___
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 )


Re: [Zope] How to get modules that are called by external methods reloaded?

2007-01-19 Thread Gaute Amundsen
On Friday 19 January 2007 12:13, Maciej Wisniowski wrote:
  Subject says it sall.
  Only way I have found so far is to restart zope, and on a production
  server, that is not very popular. Takes about 10 minutes on ours..

 Have you tried to go into Edit form of your external method
 and just hit Save button?
 This should tell you that External method was updated.

Most definitely.
That updates everything in the file in the Extensions folder, but noting that 
this file imports.

Gaute
___
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 )


Re: [Zope] How to get modules that are called by external methodsreloaded?

2007-01-19 Thread Gaute Amundsen
On Friday 19 January 2007 13:42, Jonathan wrote:
 - Original Message -
 From: Gaute Amundsen [EMAIL PROTECTED]
 To: zope@zope.org
 Sent: Friday, January 19, 2007 4:36 AM
 Subject: [Zope] How to get modules that are called by external
 methodsreloaded?

  Subject says it sall.
  Only way I have found so far is to restart zope, and on a production
  server,
  that is not very popular. Takes about 10 minutes on ours..

 AFAIK there is no way to reload a module called by an External Method
 without restarting Zope.  I have encountered this situation many many
 times. 

Ok, then :-(

 If at all possible you should set up a development server so that 
 you can do this more quickly (my restarts take about 10-15 seconds) and not
 impact production users.

 If you are really stuck with a single server for production and development
 one possible work-around is that you could copy the module source code into
 your external method, develop/debug, then move it out into its own file
 when has been completed.

 Jonathan

It was just during a maneuver like that, that I happened to reload a page, 
before i had swapped two lib folders...

Ok. Thanks.

Gaute


___
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 )


Re: [Zope] How to get modules that are called by external methodsreloaded?

2007-01-19 Thread Maciej Wisniowski

 If you are really stuck with a single server for production and
 development one possible work-around is that you could copy the module
 source code into your external method, develop/debug, then move it out
 into its own file when has been completed.
One may try with different Zope setup. I mean use ZEO with 2 zope
instances that share sessions between them. With proper load balancer
it is possible to almost transparently for the users restart one of
the instances, and later, restart the second one. User are switched
from one instance to the second and they're not losing their sessions.
I've tried this only on a small environment, so I'm not
sure how it will work in big, loaded production environment.

-- 
Maciej Wisniowski
___
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 )


Re: [Zope] How to get modules that are called by external methods reloaded?

2007-01-19 Thread yacine chaouche

I think that when you restart zope, it compiles everything that is in the
products directory. So what happens when you compile it for yourself while
zope is running ?

If you have only one machine,  you can setup multiple zope instances to
develop and debug on them so that you are not obliged to restart the
production instance.

Y.Chaouche
2007/1/19, Gaute Amundsen [EMAIL PROTECTED]:


On Friday 19 January 2007 12:13, Maciej Wisniowski wrote:
  Subject says it sall.
  Only way I have found so far is to restart zope, and on a production
  server, that is not very popular. Takes about 10 minutes on ours..

 Have you tried to go into Edit form of your external method
 and just hit Save button?
 This should tell you that External method was updated.

Most definitely.
That updates everything in the file in the Extensions folder, but noting
that
this file imports.

Gaute
___
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 )

___
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 )


RE: [Zope] FW: Problem Starting Zope after Installation

2007-01-19 Thread Ken Winter
 I forgot to answer one question: the Python I'm using is 2.3.5.  (As with
Zope, I chose this version to match the version on the server I'm developing
for.)

 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 18, 2007 10:19 PM
To: Ken Winter; 'Zope List'
Subject: Re: [Zope] FW: Problem Starting Zope after Installation

 

I wonder why it was not cased in the output in your first message.  This is
strange.

Which batch file do you start it with? can you post it here?

Which version of python are you using? (just for giggles)

 

Bobb

 

PS: If you're early in the installation... which you are it looks like you
may want to punt and try it again.

PSS: I assume your ...ateTime\DateTuime.py  below is a typeo, otherwise,
that's your problem.

 

- Original Message - 

From: Ken Winter mailto:[EMAIL PROTECTED]  

To: [EMAIL PROTECTED] ; 'Zope List' mailto:zope@zope.org  

Sent: Thursday, January 18, 2007 8:05 PM

Subject: RE: [Zope] FW: Problem Starting Zope after Installation

 

I searched my C: drive for everything with datetime (any case) in the
title.  

 

The only relevant datetime (any case) *folder* is C:\Program
Files\Zope-2.8.8-final\lib\python\DateTime\, and it is correctly cased.  

 

There are lots of *files* with datetime (various cases) in their names,
e.g. C:\Program Files\Zope-2.8.8-final\lib\python\DateTime\DateTuime.py and
C:\Program Files\Zope-2.8.8-final\bin\DLLs\datetime.pyd.  

 

Could any of these be relevant?

 

~ Thanks 

~ Ken

 

 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 18, 2007 7:44 PM
To: Ken Winter; Zope List
Subject: Re: [Zope] FW: Problem Starting Zope after Installation

 

your datetime directory should be named DateTime...

Case matters.

 

hth

bobb

 

 

- Original Message - 

From: Ken Winter mailto:[EMAIL PROTECTED]  

To: Zope List mailto:zope@zope.org  

Sent: Thursday, January 18, 2007 2:40 PM

Subject: [Zope] FW: Problem Starting Zope after Installation

 

Hi Zope ~

 

I just installed Zope 2.8.8 (version selected to match a server I'm
developing for) on my Windows XP machine, using the instructions in the Zope
Book (http://www.plope.com/Books/2_7Edition/InstallingZope.stx#0-0), and
electing not to run it as a service.  I can't get it to start - see the
attached screen shot for the failure messages.

 

~ TIA

~ Ken


  _  


___
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 )


  _  


___
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 )

___
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 )


Re: [Zope] FW: Problem Starting Zope after Installation

2007-01-19 Thread Jonathan


- Original Message - 
From: Ken Winter [EMAIL PROTECTED]

To: 'Zope List' zope@zope.org
Sent: Friday, January 19, 2007 8:52 AM
Subject: RE: [Zope] FW: Problem Starting Zope after Installation




Here is the .bat file:

@set PYTHON=C:\Program Files\Zope-2.8.8-final\bin\python.exe
@set ZOPE_HOME=C:\Program Files\Zope-2.8.8-final
@set INSTANCE_HOME=C:\Zope-Instance
@set SOFTWARE_HOME=C:\Program Files\Zope-2.8.8-final\lib\python
@set CONFIG_FILE=C:\Zope-Instance\etc\zope.conf
@set PYTHONPATH=%SOFTWARE_HOME%
@set ZOPE_RUN=%SOFTWARE_HOME%\Zope2\Startup\run.py
%PYTHON% %ZOPE_RUN% -C %CONFIG_FILE% %1 %2 %3 %4 %5 %6 %7
pause

It is exactly as provided in the Zope 2.8.8 installation kit, except that I
added the pause at the end so I could take a screen shot. I run it just
by clicking on its Windows icon, so there are no calling parameters.

I just noticed that the screen shot I sent earlier did not show the whole
session, so I attach a complete one here.

Yes, ...ateTime\DateTuime.py my last message was a typo.


~ Thanks again
~ Ken

I know exactly zip about zope on windows (i'm a linux user), but it looks 
like the zope installer is not finding python on your system ('datetime' is 
a python module; 'DateTime.py' is a Zope module).


You can test your python installation by running python (the version 
specified by the .bat file: C:\Program 
Files\Zope-2.8.8-final\bin\python.exe), and then at the python prompt type: 
from datetime import datetime

and see what happens.

good luck!


Jonathan


___
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 )


Re: [Zope] FW: Problem Starting Zope after Installation

2007-01-19 Thread Jonathan


- Original Message - 
From: Ken Winter [EMAIL PROTECTED]

To: 'Jonathan' [EMAIL PROTECTED]; 'Zope List' zope@zope.org
Sent: Friday, January 19, 2007 9:45 AM
Subject: RE: [Zope] FW: Problem Starting Zope after Installation



Jonathan ~

I tried your suggestion and got basically the same error (see attached
screen shot).  What does that imply about what to do next?

~ Thanks again
~ Ken


I just checked an older version of python (2.3.4) on my linux server and the 
'from datetime import datetime' command worked just fine, so your 2.3.5 
version should have 'datetime'.  All i can think of is that your python 
installation is pooched.  Can you 'uninstall' python, and then 
download/re-install a fresh version?



Jonathan







-Original Message-
From: Jonathan [mailto:[EMAIL PROTECTED]
Sent: Friday, January 19, 2007 9:22 AM
To: Ken Winter; 'Zope List'
Subject: Re: [Zope] FW: Problem Starting Zope after Installation

...


I know exactly zip about zope on windows (i'm a linux user), but it looks
like the zope installer is not finding python on your system ('datetime'
is
a python module; 'DateTime.py' is a Zope module).

You can test your python installation by running python (the version
specified by the .bat file: C:\Program
Files\Zope-2.8.8-final\bin\python.exe), and then at the python prompt
type:
from datetime import datetime
and see what happens.

good luck!


Jonathan





___
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 )


Re: [Zope] How to get modules that are called by external methods reloaded?

2007-01-19 Thread Jens Vagelpohl

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On 19 Jan 2007, at 14:09, yacine chaouche wrote:

I think that when you restart zope, it compiles everything that is  
in the products directory. So what happens when you compile it for  
yourself while zope is running ?


Sorry, that's just plain wrong. If a PYC file exists for a given PY  
file and the PY file has not been changed since the PYC file has been  
created then the module will not be recompiled.


jens


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFFsOTERAx5nvEhZLIRAkgOAJwN1OdUZydIXoXw2+Hz+yOwEH6ubACfSc8D
tX/z6pFyQ8f0QVVd3X0d9N4=
=XT9P
-END PGP SIGNATURE-
___
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 )


Re: [Zope] FW: Problem Starting Zope after Installation

2007-01-19 Thread Maciej Wisniowski

 I just checked an older version of python (2.3.4) on my linux server
 and the 'from datetime import datetime' command worked just fine, so
 your 2.3.5 version should have 'datetime'.  All i can think of is that
 your python installation is pooched.  Can you 'uninstall' python, and
 then download/re-install a fresh version?

Zope for Windows has its own Python included and it is installed
by default at c:\Program files\Zope\bin\python.exe

I've just tried on my vmware Windows installation to download
Zope 2.8.8 final from zope.org and install it.
It just works, even without 'work as service' option.
from datetime import datetime works as well.

Python 2.3.5 (#62, Feb  8 2005, 16:23:02) [MSC v.1200 32 bit (Intel)] on
win32
Type help, copyright, credits or license for more information.
 from datetime import datetime
 exit
'Use Ctrl-Z plus Return to exit.'
 ^Z

I'm not sure why it fails on your system. Try googling for datetime
problems.

-- 
Maciej Wisniowski
___
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 )


Re: [Zope] How to get modules that are called by external methods reloaded?

2007-01-19 Thread yacine chaouche

You are right Jens, but I thought that Gaute wanted to apply some
modifications to a module and see the results live, without restarting
zope.

Y.Chaouche

2007/1/19, Jens Vagelpohl [EMAIL PROTECTED]:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On 19 Jan 2007, at 14:09, yacine chaouche wrote:

 I think that when you restart zope, it compiles everything that is
 in the products directory. So what happens when you compile it for
 yourself while zope is running ?

Sorry, that's just plain wrong. If a PYC file exists for a given PY
file and the PY file has not been changed since the PYC file has been
created then the module will not be recompiled.

jens


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFFsOTERAx5nvEhZLIRAkgOAJwN1OdUZydIXoXw2+Hz+yOwEH6ubACfSc8D
tX/z6pFyQ8f0QVVd3X0d9N4=
=XT9P
-END PGP SIGNATURE-
___
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 )

___
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 )


RE: [Zope] FW: Problem Starting Zope after Installation

2007-01-19 Thread Andreas Jung



--On 19. Januar 2007 12:01:06 -0500 Ken Winter [EMAIL PROTECTED] wrote:


I just uninstalled *both* Zope and Python, then downloaded and installed
Zope 2.9.6 (rather than 2.8.8, since I just heard that my server is
upgrading).  Trying to run this yielded the attached error, which at least
is a bit different from the previous one.  In case you can't read the
attachment, the last couple of lines say:

File C:Zope\2.9.6\Zope\lib\python\AccessControl\Implementation.py, line
51, in setImplementation
From AccessControl ImplC as impl
File C:Zope\2.9.6\Zope\lib\python\AccessControl\ImplC.py, line 30, in ?
From ImplPython import RestrictedDTML, SecurityManager,
ZopeSecurityPolicy
ImportError: Non module named ImplPython


This indicates that you haven't compiled or installed Zope properly.
Triple check your installation procedure. Usually this never happens when 
you follow the standard configure; make install; bin/mkzopeinstance.py

dance.

-aj

pgpbRynG9EmSF.pgp
Description: PGP signature
___
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 )


Re: [Zope] FW: Problem Starting Zope after Installation

2007-01-19 Thread rawsystems

google is your friend.
http://plone.org/documentation/error/importerror-no-module-named-implpython

bobb


- Original Message - 
From: Ken Winter [EMAIL PROTECTED]

To: 'Jonathan' [EMAIL PROTECTED]; 'Zope List' zope@zope.org
Sent: Friday, January 19, 2007 12:01 PM
Subject: RE: [Zope] FW: Problem Starting Zope after Installation


I just uninstalled *both* Zope and Python, then downloaded and installed
Zope 2.9.6 (rather than 2.8.8, since I just heard that my server is
upgrading).  Trying to run this yielded the attached error, which at least
is a bit different from the previous one.  In case you can't read the
attachment, the last couple of lines say:

File C:Zope\2.9.6\Zope\lib\python\AccessControl\Implementation.py, line
51, in setImplementation
   From AccessControl ImplC as impl
File C:Zope\2.9.6\Zope\lib\python\AccessControl\ImplC.py, line 30, in ?
   From ImplPython import RestrictedDTML, SecurityManager,
   ZopeSecurityPolicy
ImportError: Non module named ImplPython

I then tried downloading and (re-)installing Python.  This didn't change the
above result at all.

~ Ken


-Original Message-
From: Jonathan [mailto:[EMAIL PROTECTED]
Sent: Friday, January 19, 2007 9:59 AM
To: Ken Winter; 'Zope List'
Subject: Re: [Zope] FW: Problem Starting Zope after Installation

...


I just checked an older version of python (2.3.4) on my linux server and
the
'from datetime import datetime' command worked just fine, so your 2.3.5
version should have 'datetime'.  All i can think of is that your python
installation is pooched.  Can you 'uninstall' python, and then
download/re-install a fresh version?

Jonathan








___
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 )



___
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 )


Re: [Zope] How to get modules that are called by external methods reloaded?

2007-01-19 Thread Dieter Maurer
Gaute Amundsen wrote at 2007-1-19 10:36 +0100:
Only way I have found so far is to restart zope, and on a production server, 
that is not very popular. Takes about 10 minutes on ours..

You can use Python's reload builtin to reload them.

Be warned however, that you must reload also any module that contains
(has imported) functions defined in the reloaded module.



-- 
Dieter
___
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 )


Re: [Zope] How to get modules that are called by external methods reloaded?

2007-01-19 Thread Andreas Jung



--On 19. Januar 2007 10:36:04 +0100 Gaute Amundsen [EMAIL PROTECTED] wrote:


Subject says it sall.
Only way I have found so far is to restart zope, and on a production
server,  that is not very popular. Takes about 10 minutes on ours..



10 minutes is too long. Even Plone starts on modern hardware in about 30 
seconds. Are you using persistent ZEO client caches are checked against the 
ZEO server during the startup phase?


-aj

pgpKwO2al4n4C.pgp
Description: PGP signature
___
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 )


Re: [Zope] How to get modules that are called by external methodsreloaded?

2007-01-19 Thread Gabriel Genellina

At Friday 19/1/2007 09:42, Jonathan wrote:


Subject says it sall.
Only way I have found so far is to restart zope, and on a production server,
that is not very popular. Takes about 10 minutes on ours..


AFAIK there is no way to reload a module called by an External 
Method without restarting Zope.  I have encountered this situation 
many many times.


reload(module) inside the E.M., and edit/save it.


--
Gabriel Genellina
Softlab SRL 







__ 
Preguntá. Respondé. Descubrí. 
Todo lo que querías saber, y lo que ni imaginabas, 
está en Yahoo! Respuestas (Beta). 
¡Probalo ya! 
http://www.yahoo.com.ar/respuestas 


___
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 )


RE: [Zope] FW: Problem Starting Zope after Installation

2007-01-19 Thread Ken Winter
Andreas ~

I'm installing the Zope for Dummies version (appropriate to my level of
expertise): Download Zope-2.9.6-win32.exe, double-click on it, and take all
the defaults (except that I don't install it as a Windows service).  I'm not
sure how even I can do that wrong.  Is there a way?

~ Thanks
~ Ken


 -Original Message-
 From: Andreas Jung [mailto:[EMAIL PROTECTED]
 Sent: Friday, January 19, 2007 12:06 PM
 To: Ken Winter; 'Jonathan'; 'Zope List'
 Subject: RE: [Zope] FW: Problem Starting Zope after Installation
 
 
 
 --On 19. Januar 2007 12:01:06 -0500 Ken Winter [EMAIL PROTECTED] wrote:
 
  I just uninstalled *both* Zope and Python, then downloaded and installed
  Zope 2.9.6 (rather than 2.8.8, since I just heard that my server is
  upgrading).  Trying to run this yielded the attached error, which at
 least
  is a bit different from the previous one.  In case you can't read the
  attachment, the last couple of lines say:
 
  File C:Zope\2.9.6\Zope\lib\python\AccessControl\Implementation.py,
 line
  51, in setImplementation
  From AccessControl ImplC as impl
  File C:Zope\2.9.6\Zope\lib\python\AccessControl\ImplC.py, line 30, in
 ?
  From ImplPython import RestrictedDTML, SecurityManager,
  ZopeSecurityPolicy
  ImportError: Non module named ImplPython
 
 This indicates that you haven't compiled or installed Zope properly.
 Triple check your installation procedure. Usually this never happens when
 you follow the standard configure; make install; bin/mkzopeinstance.py
 dance.
 
 -aj

___
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 )


RE: [Zope] FW: Problem Starting Zope after Installation

2007-01-19 Thread Gabriel Genellina

At Friday 19/1/2007 11:45, Ken Winter wrote:


I tried your suggestion and got basically the same error (see attached
screen shot).  What does that imply about what to do next?


Something is really *wrong* with your Zope install - C:\Program 
Files\Zope-2.8.8-final\lib\python\DateTime should be the directory 
name, not datetime. That directory hides the standard Python 
datetime module.
I've just downloaded 2.8.8 and installed it and the directory name is 
correct, DateTime.
So I think you should delete all traces of your Zope installation and 
start again.



--
Gabriel Genellina
Softlab SRL 







__ 
Preguntá. Respondé. Descubrí. 
Todo lo que querías saber, y lo que ni imaginabas, 
está en Yahoo! Respuestas (Beta). 
¡Probalo ya! 
http://www.yahoo.com.ar/respuestas 


___
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 )


RE: [Zope] FW: Problem Starting Zope after Installation

2007-01-19 Thread Ken Winter
Thanks Bobb ~

What I got from the reference your provided is that Zope 2.9.6 requires
Python 2.4.  So, trying to be as thorough as I can in light of messages from
other forum participants, I:

1. Uninstalled Python (2.3) and Zope (2.9.6) again.
2. Deleted the remaining files from Zope instance from the previous
installation.
3. Searched for any compiled zope files (.pyc) that might be lying around.
I didn't find any that were relevant to Zope.
4. Downloaded and installed Python 2.4.4 (from python-2.4.4.msi). 
5. Reinstalled Zope 2.9.6 (from Zope-2.9.6-win32.exe).
6. Doubled-clicked on C:\Zope\Instance\2.9.6\bin\runzope.bat.

...and got the same error again.  This time I attach a screen shot of just
the last few lines of the error message, which I hope will be more legible.

~ Thanks to all
~ Ken


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Friday, January 19, 2007 12:58 PM
 To: Ken Winter; 'Jonathan'; 'Zope List'
 Subject: Re: [Zope] FW: Problem Starting Zope after Installation
 
 google is your friend.
 http://plone.org/documentation/error/importerror-no-module-named-
 implpython
 
 bobb
 
 
 - Original Message -
 From: Ken Winter [EMAIL PROTECTED]
 To: 'Jonathan' [EMAIL PROTECTED]; 'Zope List' zope@zope.org
 Sent: Friday, January 19, 2007 12:01 PM
 Subject: RE: [Zope] FW: Problem Starting Zope after Installation
 
 
 I just uninstalled *both* Zope and Python, then downloaded and installed
 Zope 2.9.6 (rather than 2.8.8, since I just heard that my server is
 upgrading).  Trying to run this yielded the attached error, which at least
 is a bit different from the previous one.  In case you can't read the
 attachment, the last couple of lines say:
 
 File C:Zope\2.9.6\Zope\lib\python\AccessControl\Implementation.py, line
 51, in setImplementation
 From AccessControl ImplC as impl
 File C:Zope\2.9.6\Zope\lib\python\AccessControl\ImplC.py, line 30, in ?
 From ImplPython import RestrictedDTML, SecurityManager,
 ZopeSecurityPolicy
 ImportError: Non module named ImplPython
 
 I then tried downloading and (re-)installing Python.  This didn't change
 the
 above result at all.
 
 ~ Ken
 
  -Original Message-
  From: Jonathan [mailto:[EMAIL PROTECTED]
  Sent: Friday, January 19, 2007 9:59 AM
  To: Ken Winter; 'Zope List'
  Subject: Re: [Zope] FW: Problem Starting Zope after Installation
 ...
 
  I just checked an older version of python (2.3.4) on my linux server and
  the
  'from datetime import datetime' command worked just fine, so your 2.3.5
  version should have 'datetime'.  All i can think of is that your python
  installation is pooched.  Can you 'uninstall' python, and then
  download/re-install a fresh version?
 
  Jonathan
 
 
 
 --
 --
 
 
  ___
  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 )
 
attachment: Zope_06_-_startup_problem.JPG
___
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 )


RE: [Zope] FW: Problem Starting Zope after Installation

2007-01-19 Thread Ken Winter
P.S.  Attached is a screen shot showing that ImplPython.py and
ImplPython.pyc do exist on my machine. 

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
 Ken Winter
 Sent: Friday, January 19, 2007 4:54 PM
 To: [EMAIL PROTECTED]; 'Jonathan'; 'Zope List'; 'Gabriel Genellina'
 Subject: RE: [Zope] FW: Problem Starting Zope after Installation
 
 Thanks Bobb ~
 
 What I got from the reference your provided is that Zope 2.9.6 requires
 Python 2.4.  So, trying to be as thorough as I can in light of messages
 from
 other forum participants, I:
 
 1. Uninstalled Python (2.3) and Zope (2.9.6) again.
 2. Deleted the remaining files from Zope instance from the previous
 installation.
 3. Searched for any compiled zope files (.pyc) that might be lying around.
 I didn't find any that were relevant to Zope.
 4. Downloaded and installed Python 2.4.4 (from python-2.4.4.msi).
 5. Reinstalled Zope 2.9.6 (from Zope-2.9.6-win32.exe).
 6. Doubled-clicked on C:\Zope\Instance\2.9.6\bin\runzope.bat.
 
 ...and got the same error again.  This time I attach a screen shot of just
 the last few lines of the error message, which I hope will be more
 legible.
 
 ~ Thanks to all
 ~ Ken
 
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Friday, January 19, 2007 12:58 PM
  To: Ken Winter; 'Jonathan'; 'Zope List'
  Subject: Re: [Zope] FW: Problem Starting Zope after Installation
 
  google is your friend.
  http://plone.org/documentation/error/importerror-no-module-named-
  implpython
 
  bobb
 
 
  - Original Message -
  From: Ken Winter [EMAIL PROTECTED]
  To: 'Jonathan' [EMAIL PROTECTED]; 'Zope List' zope@zope.org
  Sent: Friday, January 19, 2007 12:01 PM
  Subject: RE: [Zope] FW: Problem Starting Zope after Installation
 
 
  I just uninstalled *both* Zope and Python, then downloaded and installed
  Zope 2.9.6 (rather than 2.8.8, since I just heard that my server is
  upgrading).  Trying to run this yielded the attached error, which at
 least
  is a bit different from the previous one.  In case you can't read the
  attachment, the last couple of lines say:
 
  File C:Zope\2.9.6\Zope\lib\python\AccessControl\Implementation.py,
 line
  51, in setImplementation
  From AccessControl ImplC as impl
  File C:Zope\2.9.6\Zope\lib\python\AccessControl\ImplC.py, line 30, in
 ?
  From ImplPython import RestrictedDTML, SecurityManager,
  ZopeSecurityPolicy
  ImportError: Non module named ImplPython
 
  I then tried downloading and (re-)installing Python.  This didn't change
  the
  above result at all.
 
  ~ Ken
 
   -Original Message-
   From: Jonathan [mailto:[EMAIL PROTECTED]
   Sent: Friday, January 19, 2007 9:59 AM
   To: Ken Winter; 'Zope List'
   Subject: Re: [Zope] FW: Problem Starting Zope after Installation
  ...
  
   I just checked an older version of python (2.3.4) on my linux server
 and
   the
   'from datetime import datetime' command worked just fine, so your
 2.3.5
   version should have 'datetime'.  All i can think of is that your
 python
   installation is pooched.  Can you 'uninstall' python, and then
   download/re-install a fresh version?
  
   Jonathan
 
 
 
  
 --
  --
 
 
   ___
   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 )
  
attachment: Zope_07_-_files_exist.JPG
___
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 )


Re: [Zope] How to get modules that are called by external methods reloaded?

2007-01-19 Thread Gaute Amundsen
On Friday 19 January 2007 19:45, Dieter Maurer wrote:
 Gaute Amundsen wrote at 2007-1-19 10:36 +0100:
 Only way I have found so far is to restart zope, and on a production
  server, that is not very popular. Takes about 10 minutes on ours..

 You can use Python's reload builtin to reload them.

 Be warned however, that you must reload also any module that contains
 (has imported) functions defined in the reloaded module.

Ah.. to late now, but I wil keep that in mind next time :)

Gaute
___
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 )


Re: [Zope] How to get modules that are called by external methods reloaded?

2007-01-19 Thread Gaute Amundsen
On Friday 19 January 2007 19:51, Andreas Jung wrote:
 --On 19. Januar 2007 10:36:04 +0100 Gaute Amundsen [EMAIL PROTECTED] wrote:
  Subject says it sall.
  Only way I have found so far is to restart zope, and on a production
  server,  that is not very popular. Takes about 10 minutes on ours..

 10 minutes is too long. Even Plone starts on modern hardware in about 30
 seconds. Are you using persistent ZEO client caches are checked against the
 ZEO server during the startup phase?

 -aj

Hm...
We are using the setup right out of the box + apache, with Varnish in front 
of the most heavily loaded sites.

Right now (~24:00), it restarted in about aminute actually, but
considering that our DB size is 7030.2M and it contains about 70 virtual 
hosts, does 10 minutes still seem to long when under heavy load?

Gaute
___
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 )


RE: [Zope] FW: Problem Starting Zope after Installation

2007-01-19 Thread Andreas Jung



--On 19. Januar 2007 15:34:35 -0500 Ken Winter [EMAIL PROTECTED] wrote:


Andreas ~

I'm installing the Zope for Dummies version (appropriate to my level of
expertise): Download Zope-2.9.6-win32.exe, double-click on it, and take
all the defaults (except that I don't install it as a Windows service).
I'm not sure how even I can do that wrong.  Is there a way?



The Windows installer works fine for me (running Zope as service
and from the command-line).

-aj

pgpeU3NamSDgm.pgp
Description: PGP signature
___
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 )


RE: [Zope] FW: Problem Starting Zope after Installation

2007-01-19 Thread Andreas Jung



--On 19. Januar 2007 17:14:42 -0500 Ken Winter [EMAIL PROTECTED] wrote:


P.S.  Attached is a screen shot showing that ImplPython.py and
ImplPython.pyc do exist on my machine.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Ken Winter
Sent: Friday, January 19, 2007 4:54 PM
To: [EMAIL PROTECTED]; 'Jonathan'; 'Zope List'; 'Gabriel Genellina'
Subject: RE: [Zope] FW: Problem Starting Zope after Installation

Thanks Bobb ~

What I got from the reference your provided is that Zope 2.9.6 requires
Python 2.4.  So, trying to be as thorough as I can in light of messages
from
other forum participants, I:

1. Uninstalled Python (2.3) and Zope (2.9.6) again.
2. Deleted the remaining files from Zope instance from the previous
installation.
3. Searched for any compiled zope files (.pyc) that might be lying
around. I didn't find any that were relevant to Zope.
4. Downloaded and installed Python 2.4.4 (from python-2.4.4.msi).
5. Reinstalled Zope 2.9.6 (from Zope-2.9.6-win32.exe).
6. Doubled-clicked on C:\Zope\Instance\2.9.6\bin\runzope.bat.




And why do you need to install Python 2.4.4 in *addition* to Zope?
The Windows installer comes with its own Python installation.
Likely you are messing up the registry somehow. So why the second
Python installation?


-aj

pgptBRcTxyEcd.pgp
Description: PGP signature
___
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 )


Re: RE : [Zope-DB] How lunch SQL request from python script ?

2007-01-19 Thread Maciej Wisniowski
Please, stay on the list :)


First, isn't Charlie Clark solution good for you? It seems to be
reasonable.
 I have try to use external method but without success... (I have read some 
 post as you suggested it)
   
Create database connection object called 'myconnection' in ZMI and
connect it to your database.
Create external method like:

def callSQL(self, statement):
 conn = self.myconnection()
 return conn.query(statement)

-- 
Maciej Wisniowski
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: RE : [Zope-DB] How lunch SQL request from python script ?

2007-01-19 Thread Charlie Clark
Am 19.01.2007, 13:27 Uhr, schrieb Maciej Wisniowski  
[EMAIL PROTECTED]:



Please, stay on the list
First, isn't Charlie Clark solution good for you? It seems to be
reasonable.


Thanks! ;-)

I have try to use external method but without success... (I have read  
some post as you suggested it)



Create database connection object called 'myconnection' in ZMI and
connect it to your database.
Create external method like:
def callSQL(self, statement):
 conn = self.myconnection()
 return conn.query(statement)


The only thing that's missing for me is using this idiom with existing  
ZSQL methods and that's because I've forgotten how to get them to render  
the query rather than execute it. Anyone care to enlighten me! ;-)


Charlie
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: RE : [Zope-DB] How lunch SQL request from python script ?

2007-01-19 Thread Maciej Wisniowski


 The only thing that's missing for me is using this idiom with existing
 ZSQL methods and that's because I've forgotten how to get them to
 render the query rather than execute it. Anyone care to enlighten me! ;-)
Not sure if I understand you, but do you think about
src__=1 parameter when calling ZSQLMethod?

-- 
Maciej Wisniowski
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: RE : [Zope-DB] How lunch SQL request from python script ?

2007-01-19 Thread Ed Leafe

On Jan 19, 2007, at 7:31 AM, Charlie Clark wrote:


keep replies on the mailing list so that others can learn from them.


rant

	This is repeated so often that you'd think that the list  
administrators would get a clue and set the default Reply-to: header  
to include the list address. I run several technical lists, and  
except on announcement lists, set the Reply-to: to the list address,  
and these sorts of problems never happen. And despite the dire  
warnings of the email purists, nothing bad has ever happened; the  
world continues to turn just fine.


	If it is important that replies go to the list, then the default  
behavior should be just that. Send your complaints to the list  
admins, not to the posters who expect things to work intelligently.


/rant

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com


___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB]found reason: sql query works in database connector but not in ZSQL method

2007-01-19 Thread Charlie Clark

Am 19.01.2007, 17:50 Uhr, schrieb robert rottermann [EMAIL PROTECTED]:


it in deed seems not to work.
however I do not understand why.


If you use callproc() we could probably help you.


This is now academical as I resolved to not to use stored procedures
that return a record set (tough its a pain in the back).
what I do (did):



1. write data (in a ZSQL connction), did commit it, did flush the table.
(reading from plain mysql shows the data)
2. in a python modoul I
 - flush the tables (to force a reread)
 - read the data
 - send it to plone to display
unfortunately I get stale data.
As we need to go online next week, I resolved to not to use Stored
Procedure to retrieve the data.
However I really like to know why I cant.


Don't forget that Zope will also cache results from the database as indeed  
the ODBC driver may. You should really try this using a single connection  
object.

call the procedure + get the results if possible
if not call the results with an additional query
run the query that uses the results of stored procedure.

You can do all this in a single ExternalMethod.

Charlie

___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] Process one PloneFormGen request into many SQL tables

2007-01-19 Thread Dennis Schulz

Hi Paul,

Ok to tell you honestly the truth, as a beginner you should try to leave 
your fingers of zope 3 /alchemist.

The learning curve is steep.
You will have to learn about Zope 3 widgets, schemas, interfaces, 
adapters
You have to know how to configure the mapper, have to know how to handle 
the mapped objects
And there is a lot of automatic machinery in the background going on 
such as automatic interface generation, formlib machinery etc. you have 
to be aware of.


I am currently writing my final project about it and to figure out all 
this it took me a lot of time


Unfortunately I dont have much experience with Archetypes Widgets or 
PloneFormGen so I can't really help you.


But what you could certainly do is to write a zope 2 filesystem product 
that uses archetypes widgets.
I personally prefer not to use zsql methods since they include very 
special DTML systax and variables and stuff you dont need anywhere else.

You can also query the database adapter directly when you have a product.
Here an example: (conn is the db connection)
   sql  = select max(a.idAmendment) as last_id from 
cyc_Amendments a

   resultset = conn.manage_test(sql)
   result = int(resultset[0][0])

Or learn how to use SQLAlchemy, it really is a usefull toolkit you can 
also use standalone.



Dennis

Paul Eipper escribió:

(this list replies to authors instead of the list as default _ )

-- Forwarded message --
From: Paul Eipper [EMAIL PROTECTED]
Date: 19/01/2007 13:52
Subject: Re: [Zope-DB] Process one PloneFormGen request into many SQL 
tables

To: [EMAIL PROTECTED]


Hi Dennis,

I was referred to the alchemist product by the PloneFormGen dev, but
unfortunatelly I found the documentation for it extremely lacking (as
in nonexistant :P)

Since I am only learning all this, I can't take a product where there
aren't at least intro docs for it and try to figure it all out by
myself :(

The only thing i could find is a video presentation that I will be
taking a look at this weekend. Maybe it will serve as a good intro
doc. For now I am trying to make it work using Python scripts + ZSQL
methods manually.

Would alchemist really simplify the coding? (/me has no idea)

Thanks for the reply!

--
Paul Eipper
Brasil

2007/1/19, Dennis Schulz [EMAIL PROTECTED]:

Hi,

if you want to do things like this, you also could use the alchmist 
product.

However, I think the archetype / plone formgen integration at the moment
is not functional. (ask kapil t. and roché c. for closer info)
You would have to start out with plain zope 3 schema and formlib like in
the alchemist included orgpeople example.
I developed a neat little application that uses the unit of work and
automatic transaction support of sql alchemy and all dependent tables
are deleted, updated and inserted automatically by the mapper
(www.*sqlalchemy*.org/)

Dennis

___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db





___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] Process one PloneFormGen request into many SQL tables

2007-01-19 Thread Paul Eipper

Thanks for all the responses, they really help


  2) Is a ZSQL Method automatically executed as a transaction? Or do I
 need to manually define BEGIN; COMMIT; to guarantee I am getting the
 correct data?
Yes.


Hmm, that was Yes, it does the transaction thing automatically. or a
Yes, you need to do it manually. ??

Dennis, I will start looking at SQLAlchemy, it sounds very
interesting. I was under the impression I needed alchemist to work
with that on Zope.

At a point I was really thinking in doing it all with mySQL stored
procedures, but thought that doing the actual logic in Python would be
much better, since I would have to learn the stored procedures
'language' also otherwise.

Anyways, I am progressing with scripting in Python code here, even if
very slowly :P

Best Regards,
--
Paul Eipper
Brasil
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db