Re: [Zope] Re: Exporting portal member data to csv

2007-02-27 Thread Maciej Wisniowski

> * Module ZPublisher.Publish, line 115, in publish
> * Module ZPublisher.mapply, line 88, in mapply
> * Module ZPublisher.Publish, line 41, in call_object
> * Module Products.ExternalMethod.ExternalMethod, line 225, in __call__
>   __traceback_info__: ((,), {}, None)
> * Module C:\Program Files\Plone 2\Data\Extensions\export.py, line
>   15, in createcsv
>
What code do you have in export.py, especially what is in line 15?

-- 
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] Re: Exporting portal member data to csv

2007-02-27 Thread Win Myint Aung
Here is error log. 

Time2007/02/28 10:41:23.080 GMT+7
User Name (User Id)admin (admin)
Request URLhttp://localhost:8080/export
Exception TypeAttributeError
Exception Valueportal_memberdata

Traceback (innermost last): 
Module ZPublisher.Publish, line 115, in publish 
Module ZPublisher.mapply, line 88, in mapply 
Module ZPublisher.Publish, line 41, in call_object 
Module Products.ExternalMethod.ExternalMethod, line 225, in __call__
__traceback_info__: ((,), {}, None) 
Module C:\Program Files\Plone 2\Data\Extensions\export.py, line 15, in 
createcsv 
AttributeError: portal_memberdata 


- Original Message 
From: Paul Williams <[EMAIL PROTECTED]>
To: zope@zope.org
Cc: zope-db@zope.org
Sent: Tuesday, February 27, 2007 8:22:36 PM
Subject: [Zope] Re: Exporting portal member data to csv


What does your log say?

Win Myint Aung wrote:
> When i run the external method in plone site, it shows errors.
>  
> The error shows.
>  
> 
> 
> Site Error
> 
> An error was encountered while publishing this resource.
> 
> *Error Type: AttributeError*
> *Error Value: portal_memberdata*
> 
>  
> 
> The following is the codings used in external methon.
>  
> # make heading row
> row = makeRow()
> row[0] = 'member_id'
> row[1] = 'password'
> writer.writerow(row)
>
> for member in self.portal_membership.listMembers():
>
> # make row for each member full of blank values
> row = makeRow()
> member_id = member.getId()
> user = acl_users.getUser(name=member_id)
> password = user._getPassword()
> row[0] = member_id
> row[1] = password
> writer.writerow(row)
> 
> request.RESPONSE.setHeader('Content-Type','application/csv')
> request.RESPONSE.setHeader('Content-Length',len(text.getvalue()))
> 
> request.RESPONSE.setHeader('Content-Disposition','inline;filename=%smembers.csv'
>  
> %
> 
> time.strftime("%Y%m%d-%H%M%S-",time.localtime()))
> return text.getvalue()
>  
>  
>  
> 
> 
> TV dinner still cooling?
> Check out "Tonight's Picks" 
>  on Yahoo! TV.
> 
> 
> 
> 
> ___
> Zope-DB mailing list
> Zope-DB@zope.org
> http://mail.zope.org/mailman/listinfo/zope-db

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


 

It's here! Your new message!  
Get new email alerts with the free Yahoo! Toolbar.
http://tools.search.yahoo.com/toolbar/features/mail/___
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] ImportError: cannot import name base_hasattr

2007-02-27 Thread Maciej Wisniowski
> This really should go to the Plone list, but seeing as how I can't hit 
> their site from either of my browsers, how can I subscribe to
> the list?
plone.org works fine for me.
You can subscribe to plone-users list at:
https://lists.sourceforge.net/lists/listinfo/plone-users

Maybe you have something wrong with your PYTHONPATH.

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


[Zope] ImportError: cannot import name base_hasattr

2007-02-27 Thread tonylabarbara
Hi:
This really should go to the Plone list, but seeing as how I can't hit their 
site from either of my browsers, how can I subscribe to the list? I couldn't 
download Plone, either, so I just built it from tarballs from an earlier 
installation, tarballing all the products associated with it (Plone 2.1.4, I 
think). Then I loaded them up in Zope 2.7.8 and got this error:
 
Traceback (most recent call last):
  File "/usr/local/www/zope/278/lib/python/OFS/Application.py", line 673, in 
import_product
  File "/usr/local/zope/instance1/Products/ATContentTypes/__init__.py", line 
54, in ?
import Products.ATContentTypes.content
  File "/usr/local/zope/instance1/Products/ATContentTypes/content/__init__.py", 
line 34, in ?
import Products.ATContentTypes.content.topic
  File "/usr/local/zope/instance1/Products/ATContentTypes/content/topic.py", 
line 33, in ?
from Products.CMFPlone.CatalogTool import CatalogTool
  File "/usr/local/zope/instance1/Products/CMFPlone/CatalogTool.py", line 27, 
in ?
from Products.CMFPlone.utils import base_hasattr
ImportError: cannot import name base_hasattr
Traceback (most recent call last):
  File "/usr/local/zope/278/lib/python/Zope/Startup/run.py", line 50, in ?
run()
  File "/usr/local/zope/278/lib/python/Zope/Startup/run.py", line 19, in run
start_zope(opts.configroot)
  File "/usr/local/zope/278/lib/python/Zope/Startup/__init__.py", line 52, in 
start_zope
starter.startZope()
  File "/usr/local/zope/278/lib/python/Zope/Startup/__init__.py", line 231, in 
startZope
Zope.startup()
  File "/usr/local/zope/278/lib/python/Zope/Startup/__init__.py", line 47, in 
startup
# drop privileges after setting up servers
  File "/usr/local/www/zope/278/lib/python/Zope/App/startup.py", line 45, in 
startup
  File "/usr/local/www/zope/278/lib/python/OFS/Application.py", line 650, in 
import_products
  File "/usr/local/www/zope/278/lib/python/OFS/Application.py", line 673, in 
import_product
  File "/usr/local/zope/instance1/Products/ATContentTypes/__init__.py", line 
54, in ?
import Products.ATContentTypes.content
  File "/usr/local/zope/instance1/Products/ATContentTypes/content/__init__.py", 
line 34, in ?
import Products.ATContentTypes.content.topic
  File "/usr/local/zope/instance1/Products/ATContentTypes/content/topic.py", 
line 33, in ?
from Products.CMFPlone.CatalogTool import CatalogTool
  File "/usr/local/zope/instance1/Products/CMFPlone/CatalogTool.py", line 27, 
in ?
from Products.CMFPlone.utils import base_hasattr
ImportError: cannot import name base_hasattr

CMFPlone/utils.py has a class named base_hasattr, so what's the problem? 
Perhaps I need to delete all the *.pyc files from the other server from which I 
copied all these products? (Lot of work, avoiding that since I'm not sure it's 
necessary, and there aren't any in CMFPlone anyway.)
TIA,
Tony

Check out the new AOL.  Most comprehensive set of free safety and security 
tools, free access to millions of high-quality videos from across the web, free 
AOL Mail and more.
___
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] Re: zope unresponsive

2007-02-27 Thread Paul Williams

No, we haven't done that yet.  That is something else we may try.



Marco Bizzarri wrote:
On 2/27/07, Paul Williams 
<[EMAIL PROTECTED]> wrote:



Tres Seaver wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Paul Williams wrote:
>> Ok, here is what we have.  I did a netstat on both machines, client 
and
>> server.  The client sees and established connection and the server 
does

>> not.  In the server log there is a disconnect.  As far as hardware
>> between them, there is a switch (dell powerconnect 6024).  Web Server
>> Directors might get hold of it but there are no hops on traceroute.
>> Traceroute only shows the client machine and the server machine.
>>
>> So the client is just continuously polling the connection but getting
>> nothing back.
>
> That sounds like some weird kernel / networking problem to me:  I don't
> see how Zope could be able to keep calling 'select' on a socket after
> the other side has closed it.

We agree.  This is a strange situation that none of us have seen before.

However, we have until tomorrow to do something and replacing hardware
is not feasable.


>
> Is there any possibility that some kind of failover / IP takeover has
> happened, such that the storage server now running is not the same host
> / instance as the one to shich the clients originally connected?  Are
> you using LVS + heartbeat, or some kind of hardware load balancer to
> manage such redundancy?

We do have Web Services Directors that do load balancing, but in this
particular case, the storage server is not setup for load balancing, I
am not aware of any features that make the zodb capable of clustering
except for replication services offered through zope.

We are not sure whether the traffic is going to the Web Services
Directores or not.  Even if it is, there are thousands of settings and
there is no-one available that knows what to change.


The storage server is a simple nas server with a static ip address.

>
>> What we are thinking about doing is changing the code in
>> zrpc/connection.py to close the connection in wait (line 638 zope
>> version 2.9.5) if the wait time gets too large or the poll has 
happened

>> too many times.
>>
>> We are great at plone development, but have very little backend zope
>> development.  Would someone please advise me as to whether this is 
going

>> to cause more problems?
>
> According to the log message you posted earlier in the thread, your
> appservers are spewing thousands of log messages from the connection's
> 'pending' method, although your deadlock debugger output shows the one
> thread blocked on 'select' inside of the connection's 'wait' method.
> There should be lots of log messages at TRACE level for the wait call,
> including a doubling / backoff of the delay value from 1 mx to 1 sec.
> Do you see those log messages, as well?

These messages are there.  You can see the time doubling.  This is where
we were thinking of breaking the connection once it gets to a certain
point and make zope reconnect.

This solves our hung connection problem, we think.  However, I am hoping
someone can let me know if I am breaking something else by doing this.




I don't remember if you already mentioned it. However: did you tried
to monitor the traffic outgoing and incoming? I mean, setting some
iptables rules and/or using something like tcpdump to monitor what is
going on here?

Regards
Marco




___
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] Re: [Zope3-Users] Cannot view the instances after I refresh the product in ZMI

2007-02-27 Thread Peter Bengtsson
You're most likely getting that error because your product is 
subclassing another product that has been refreshed.

Suppose you do this in MyAProduct.py

from Products.AnotherProduct.Foo import SomeClass
class ThisProduct(SomeClass):
  bla bla bla


If you refresh AnotherProduct, the MyAProduct will break and you'll get 
the error you mentioned.



David Johnson wrote:

Paste the code here. :)

On Feb 27, 2007, at 6:16 AM, Alex Cheng wrote:


Hello,

I have modified my product code and click refresh in ZMI to update the 
product. Unfortunately when I view its instance in zope. The error 
message is follows:


Error Type: TypeError
Error Value: 'NoneType' object is not callable

Could you help me?

Thanks.
--powered by python
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


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



--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
___
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] Re: [Zope-DB] Exporting portal member data to csv

2007-02-27 Thread Andreas Jung



--On 26. Februar 2007 19:43:11 -0800 Win Myint Aung <[EMAIL PROTECTED]> 
wrote:



When i run the external method in plone site, it shows errors.

The error shows.

Site Error
An error was encountered while publishing this resource.
Error Type: AttributeError
Error Value: portal_memberdata



You must provide the *full* traceback when reporting an error.

-aj

pgppegAXhRSkk.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] Re: zope unresponsive

2007-02-27 Thread Marco Bizzarri

On 2/27/07, Paul Williams <[EMAIL PROTECTED]> wrote:



Tres Seaver wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Paul Williams wrote:
>> Ok, here is what we have.  I did a netstat on both machines, client and
>> server.  The client sees and established connection and the server does
>> not.  In the server log there is a disconnect.  As far as hardware
>> between them, there is a switch (dell powerconnect 6024).  Web Server
>> Directors might get hold of it but there are no hops on traceroute.
>> Traceroute only shows the client machine and the server machine.
>>
>> So the client is just continuously polling the connection but getting
>> nothing back.
>
> That sounds like some weird kernel / networking problem to me:  I don't
> see how Zope could be able to keep calling 'select' on a socket after
> the other side has closed it.

We agree.  This is a strange situation that none of us have seen before.

However, we have until tomorrow to do something and replacing hardware
is not feasable.


>
> Is there any possibility that some kind of failover / IP takeover has
> happened, such that the storage server now running is not the same host
> / instance as the one to shich the clients originally connected?  Are
> you using LVS + heartbeat, or some kind of hardware load balancer to
> manage such redundancy?

We do have Web Services Directors that do load balancing, but in this
particular case, the storage server is not setup for load balancing, I
am not aware of any features that make the zodb capable of clustering
except for replication services offered through zope.

We are not sure whether the traffic is going to the Web Services
Directores or not.  Even if it is, there are thousands of settings and
there is no-one available that knows what to change.


The storage server is a simple nas server with a static ip address.

>
>> What we are thinking about doing is changing the code in
>> zrpc/connection.py to close the connection in wait (line 638 zope
>> version 2.9.5) if the wait time gets too large or the poll has happened
>> too many times.
>>
>> We are great at plone development, but have very little backend zope
>> development.  Would someone please advise me as to whether this is going
>> to cause more problems?
>
> According to the log message you posted earlier in the thread, your
> appservers are spewing thousands of log messages from the connection's
> 'pending' method, although your deadlock debugger output shows the one
> thread blocked on 'select' inside of the connection's 'wait' method.
> There should be lots of log messages at TRACE level for the wait call,
> including a doubling / backoff of the delay value from 1 mx to 1 sec.
> Do you see those log messages, as well?

These messages are there.  You can see the time doubling.  This is where
we were thinking of breaking the connection once it gets to a certain
point and make zope reconnect.

This solves our hung connection problem, we think.  However, I am hoping
someone can let me know if I am breaking something else by doing this.




I don't remember if you already mentioned it. However: did you tried
to monitor the traffic outgoing and incoming? I mean, setting some
iptables rules and/or using something like tcpdump to monitor what is
going on here?

Regards
Marco


--
Marco Bizzarri
http://iliveinpisa.blogspot.com/
___
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] Re: [Zope3-Users] Cannot view the instances after I refresh the product in ZMI

2007-02-27 Thread David Johnson

Paste the code here. :)

On Feb 27, 2007, at 6:16 AM, Alex Cheng wrote:


Hello,

I have modified my product code and click refresh in ZMI to update  
the product. Unfortunately when I view its instance in zope. The  
error message is follows:


Error Type: TypeError
Error Value: 'NoneType' object is not callable

Could you help me?

Thanks.
--
powered by python
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


___
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] Re: zope unresponsive

2007-02-27 Thread Paul Williams



Tres Seaver wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Paul Williams wrote:
Ok, here is what we have.  I did a netstat on both machines, client and 
server.  The client sees and established connection and the server does 
not.  In the server log there is a disconnect.  As far as hardware 
between them, there is a switch (dell powerconnect 6024).  Web Server 
Directors might get hold of it but there are no hops on traceroute. 
Traceroute only shows the client machine and the server machine.


So the client is just continuously polling the connection but getting 
nothing back.


That sounds like some weird kernel / networking problem to me:  I don't
see how Zope could be able to keep calling 'select' on a socket after
the other side has closed it.


We agree.  This is a strange situation that none of us have seen before.

However, we have until tomorrow to do something and replacing hardware 
is not feasable.





Is there any possibility that some kind of failover / IP takeover has
happened, such that the storage server now running is not the same host
/ instance as the one to shich the clients originally connected?  Are
you using LVS + heartbeat, or some kind of hardware load balancer to
manage such redundancy?


We do have Web Services Directors that do load balancing, but in this 
particular case, the storage server is not setup for load balancing, I 
am not aware of any features that make the zodb capable of clustering 
except for replication services offered through zope.


We are not sure whether the traffic is going to the Web Services 
Directores or not.  Even if it is, there are thousands of settings and 
there is no-one available that knows what to change.



The storage server is a simple nas server with a static ip address.



What we are thinking about doing is changing the code in 
zrpc/connection.py to close the connection in wait (line 638 zope 
version 2.9.5) if the wait time gets too large or the poll has happened 
too many times.


We are great at plone development, but have very little backend zope 
development.  Would someone please advise me as to whether this is going 
to cause more problems?


According to the log message you posted earlier in the thread, your
appservers are spewing thousands of log messages from the connection's
'pending' method, although your deadlock debugger output shows the one
thread blocked on 'select' inside of the connection's 'wait' method.
There should be lots of log messages at TRACE level for the wait call,
including a doubling / backoff of the delay value from 1 mx to 1 sec.
Do you see those log messages, as well?


These messages are there.  You can see the time doubling.  This is where 
we were thinking of breaking the connection once it gets to a certain 
point and make zope reconnect.


This solves our hung connection problem, we think.  However, I am hoping 
someone can let me know if I am breaking something else by doing this.






Tres.
- --
===
Tres Seaver  +1 540-429-0999  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF5Dvr+gerLs4ltQ4RAm/HAKCUN5WboOxVGeB11GhEfgYQ3wos3QCdH0TW
DbcpXiMPlcQYyx0gewPFMLI=
=9A/a
-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 )


[Zope] Re: zope unresponsive

2007-02-27 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Paul Williams wrote:
> Ok, here is what we have.  I did a netstat on both machines, client and 
> server.  The client sees and established connection and the server does 
> not.  In the server log there is a disconnect.  As far as hardware 
> between them, there is a switch (dell powerconnect 6024).  Web Server 
> Directors might get hold of it but there are no hops on traceroute. 
> Traceroute only shows the client machine and the server machine.
> 
> So the client is just continuously polling the connection but getting 
> nothing back.

That sounds like some weird kernel / networking problem to me:  I don't
see how Zope could be able to keep calling 'select' on a socket after
the other side has closed it.

Is there any possibility that some kind of failover / IP takeover has
happened, such that the storage server now running is not the same host
/ instance as the one to shich the clients originally connected?  Are
you using LVS + heartbeat, or some kind of hardware load balancer to
manage such redundancy?

> What we are thinking about doing is changing the code in 
> zrpc/connection.py to close the connection in wait (line 638 zope 
> version 2.9.5) if the wait time gets too large or the poll has happened 
> too many times.
> 
> We are great at plone development, but have very little backend zope 
> development.  Would someone please advise me as to whether this is going 
> to cause more problems?

According to the log message you posted earlier in the thread, your
appservers are spewing thousands of log messages from the connection's
'pending' method, although your deadlock debugger output shows the one
thread blocked on 'select' inside of the connection's 'wait' method.
There should be lots of log messages at TRACE level for the wait call,
including a doubling / backoff of the delay value from 1 mx to 1 sec.
Do you see those log messages, as well?


Tres.
- --
===
Tres Seaver  +1 540-429-0999  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF5Dvr+gerLs4ltQ4RAm/HAKCUN5WboOxVGeB11GhEfgYQ3wos3QCdH0TW
DbcpXiMPlcQYyx0gewPFMLI=
=9A/a
-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] Re: Exporting portal member data to csv

2007-02-27 Thread Paul Williams

What does your log say?

Win Myint Aung wrote:

When i run the external method in plone site, it shows errors.
 
The error shows.
 



Site Error

An error was encountered while publishing this resource.

*Error Type: AttributeError*
*Error Value: portal_memberdata*

 


The following is the codings used in external methon.
 
# make heading row

row = makeRow()
row[0] = 'member_id'
row[1] = 'password'
writer.writerow(row)
   
for member in self.portal_membership.listMembers():
   
# make row for each member full of blank values

row = makeRow()
member_id = member.getId()
user = acl_users.getUser(name=member_id)
password = user._getPassword()
row[0] = member_id
row[1] = password
writer.writerow(row)

request.RESPONSE.setHeader('Content-Type','application/csv')
request.RESPONSE.setHeader('Content-Length',len(text.getvalue()))

request.RESPONSE.setHeader('Content-Disposition','inline;filename=%smembers.csv' 
%

time.strftime("%Y%m%d-%H%M%S-",time.localtime()))

return text.getvalue()
 
 
 



TV dinner still cooling?
Check out "Tonight's Picks" 
 on Yahoo! TV.





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


___
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] Re: zope unresponsive

2007-02-27 Thread Paul Williams
Ok, here is what we have.  I did a netstat on both machines, client and 
server.  The client sees and established connection and the server does 
not.  In the server log there is a disconnect.  As far as hardware 
between them, there is a switch (dell powerconnect 6024).  Web Server 
Directors might get hold of it but there are no hops on traceroute. 
Traceroute only shows the client machine and the server machine.


So the client is just continuously polling the connection but getting 
nothing back.


What we are thinking about doing is changing the code in 
zrpc/connection.py to close the connection in wait (line 638 zope 
version 2.9.5) if the wait time gets too large or the poll has happened 
too many times.


We are great at plone development, but have very little backend zope 
development.  Would someone please advise me as to whether this is going 
to cause more problems?


Thanks,
Paul Williams

Paul Williams wrote:
I have posted this several times, but have not until now been able to 
get DeadlockDebugger installed.  I see several people have had this 
problem, but no-one has posted a solution.


 


zope 2.9.5 + zeo

pythonm2.4.3

Red Hat RHEL 4

Plone 2.5.1

 

Our zeo clients hang intermittently.  We have no way of reproducing the 

problem, but it occurs daily.  The client hangs and a restart seems to fix the 


problem.

 


In the event log with tracing on we get

 


Trace zeo.zrpc.Connection(C) wait(16697) {server:8100} pending, async=0

 


There are hundreds to thousands of these until the server is restarted.

 


In the zeo log we get

 


Error caught in asyncor asyncore.py

 


error:(110,'Connection timed out')

 

We have been trying to track this down and have had no luck.  Does anyone have 


any suggestions?  Below is our deadlock debugger output

 

 


Threads traceback dump at 2007-02-23 15:26:50

 

Thread -1269564496 (GET 
/VirtualHostBase/https/soawds:443/VirtualHostRoot/Content///training):


  File 
"/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/ZServer/PubCore/ZServerPublisher.py", 
line 23, in __init__


  File 
"/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/ZPublisher/Publish.py", 
line 395, in publish_module


  File 
"/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/ZPublisher/Publish.py", 
line 196, in publish_module_standard


  File 
"/apps1/zope2.9.5/navo_instance/Products/PlacelessTranslationService/PatchStringIO.py", 
line 34, in new_publish


x = Publish.old_publish(request, module_name, after_list, debug)

  File 
"/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/ZPublisher/Publish.py", 
line 115, in publish


  File 
"/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/ZPublisher/mapply.py", 
line 88, in mapply


  File 
"/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/ZPublisher/Publish.py", 
line 41, in call_object


  File 
"/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/Shared/DC/Scripts/Bindings.py", 
line 311, in __call__


  File 
"/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/Shared/DC/Scripts/Bindings.py", 
line 348, in _bindAndExec


  File 
"/apps1/zope2.9.5/navo_instance/Products/CMFCore/FSPageTemplate.py", 
line 195, in _exec


result = self.pt_render(extra_context=bound_names)

  File 
"/apps1/zope2.9.5/navo_instance/Products/CacheSetup/patch_cmf.py", line 
38, in FSPT_pt_render


result = FSPageTemplate.inheritedAttribute('pt_render')(

  File 
"/apps1/zope2.9.5/navo_instance/Products/CacheSetup/patch_cmf.py", line 
92, in PT_pt_render


tal=not source, strictinsert=0)()

  File 
"/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/TAL/TALInterpreter.py", 
line 238, in __call__


  File 
"/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/TAL/TALInterpreter.py", 
line 281, in interpret


  File 
"/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/TAL/TALInterpreter.py", 
line 749, in do_useMacro


  File 
"/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/TAL/TALInterpreter.py", 
line 281, in interpret


  File 
"/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/TAL/TALInterpreter.py", 
line 457, in do_optTag_tal


  File 
"/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/TAL/TALInterpreter.py", 
line 442, in do_optTag


  File 
"/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/TAL/TALInterpreter.py", 
line 437, in no_tag


  File 
"/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/TAL/TALInterpreter.py", 
line 281, in interpret


  File 
"/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/TAL/TALInterpreter.py", 
line 749, in do_useMacro


  File 
"/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/TAL/TALInterpreter.py", 
line 281, in interpret


  File 
"/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/TAL/TALInterpreter.py", 
line 507, in do_setLocal_tal


  File 
"/var/tmp/Zope-2.9.5-1-buildroot/apps1/zope2.9.5/lib/python/Products/PageTempl

Re: [Zope] How to get REST friendly urls from sql database

2007-02-27 Thread Gaute Amundsen
On Wednesday 21 February 2007 16:27, Paul Winkler wrote:
> On Wed, Feb 21, 2007 at 12:32:30PM +0100, Gaute Amundsen wrote:
> > On Tuesday 20 February 2007 17:39, Paul Winkler wrote:
> > 

>
>
> You could instead follow Andreas' suggestion and use a through-the-web
> Script.  It might look something like:
>
> article_id = traverse_subpath[-1]
> data =  context.get_the_data_somehow(article_id)
> return data
>
> Your URLs would then look like:
>
> http://example.com/folder_id/script_id/article_id

I had no idea it could be that simple.
And certainly not from Andreas riddles ;)
That will do nicely for now.

Thanks

Gaute

> --
>
> Paul Winkler
> http://www.slinkp.com
> ___
> 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] from php to zop

2007-02-27 Thread Adrian-Bogdan Andreias

Hi Zopistas,

I'm planning to migrate our company web development from PHP to Zope.
The reason is to increase productivity by using a modern language, a
powerful framework with out of the box functionality and take care of
enterprise concerns (transactions, OO db, complex auth&auth system etc).

There's obviously a learning curve. But the questions are if
zope/python/plone will really increase productivity and if Zope is mature
enough.

I have a strong C++ and other OOP languages background, so using OOP is not
an issue even of we're moving from PHP.
I have some knowledge of UML and played a bit with Python a few years ago.

After watching wetfeet.mov I was very impressed. But then tried to follow
the tutorial my self, but got stuck with some error:
E:\Program Files\ArchGenXML>ArchGenXML.py E:\projects\zope\tt2.xmi
<...stack trace ... >
 File "E:\Program Files\ArchGenXML\XMIParser.py", line 697, in
getAttributeValu
e
   return el.firstChild.nodeValue
AttributeError: 'NoneType' object has no attribute 'nodeValue'

The big issue, besides the error itself, is that I wasn't able to fix the
problem after 2-3 hours of googling and so.
There's probably some stupid error in the UML model. I tried to see if there
are extra spaces in tags (like "required ") or some extra association/tag
that is not linked. But got stuck. I've redone the model from scracth,
though this is not an option in real world development.

This is not a Zope problem necessarily. But to be productive in Zope one
needs good tools that work.

Other issues that make me think Zope may not be that mature:
- I've read the first 150 pages of The Zope Book by now, and found to much
errors (grammatical and logical); some example are not actually working
because they missed a letter or so; I have the list of errors if someone
that works on the PDF is interested
- funny comments in the book from other readers (this and that is not
working etc.)
- clearly ZMI can not be used for development, but rather for administrative
tasks and quick dev fixes; can you post the list of tools you're using for
Zope development (e.g. eclipse, argouml, software X for WebDav etc.)

Some other questions about Zope:
- Zope and Plone are clearly for Enterprise projects, but do you think they
are suited as well for other smaller projects like: feeds aggregator web
sites (like technorati.com, but not that complex), custom web directories
(like DMOZ, but a bit more complex), other small projects
- is there some migration guide, that also talks about tools that I've asked
about above

I found some very interested concepts in Zope architecture, like
acquisition, I love the core architecture as far as I read.
Zope has great potential for sure, but is it in a state that can offer
productivity boost when compared with PHP?

These were some random thoughts :). It would help me a lot with the decision
of moving to Zope or not.

Thanks and sorry for the "speling"


--
Adi Andreias
adi _at_ elvsoft (dot] com
Elvsoft, Cluj-Napoca, Romania
Online success
http://www.elvsoft.com/
Tel/Fax: +40 0364 103 430
Mobile: +40 0723 450 566
___
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 )