[Zope] newInteraction error

2008-07-11 Thread Erik Myllymaki

Hello,

I am getting a fair number of these errors popping up:

Error Type: AssertionError
Error Value: newInteraction called while another interaction is active.

I searched for the error mesage and only came up with a reference to 
Philipp von Weitershausen's book, which I have, but it really doesn't 
tell me much (while it quite possibly would tell another plenty :).


Strangely, the logs do not show this error, but they do have 
Unauthorized Errors correspondding to the page template that was being 
requested when the newInteraction error was thrown.


Our environment looks like this:

Zope Version (Zope 2.10.6-final, python 2.4.4, linux2)
Python Version 2.4.4 (#2, Mar 7 2008, 03:56:06) [GCC 4.1.2 (Ubuntu 
4.1.2-0ubuntu4)]

System Platform linux2
SOFTWARE_HOME /opt/testsite.com/parts/zope2/lib/python
ZOPE_HOME /opt/testsite.com/parts/zope2
INSTANCE_HOME /opt/testsite.com/parts/zclient1
CLIENT_HOME /opt/testsite.com/var/zclient1
Network Services ZServer.HTTPServer.zhttp_server (Port: 8050)
Process Id 1024 (-1247577200)
Running For 1 day 6 hours 12 min 1 sec

Any advice greatly appreciated.
___
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] LDAPUserFolder question

2008-07-08 Thread Erik Myllymaki

Jens Vagelpohl wrote:


On Jul 8, 2008, at 18:51 , Erik Myllymaki wrote:


I am using LDAPUserFolder-2.9 with Zope 2.10.6 on Ubuntu 7.

It is working well, users can log in and I can map groups to Zope roles.

However, I was hoping that I could assign groups local roles, so that 
I can allow groups to be 'Managers' only in certain sub-folders of our 
site.


Is this possible with LDAPUF, do I need additional packages, have i 
set it up incorrectly?


Erik,

The LDAPUserFolder itself has nothing to do with local roles per se. It 
also has no concept by itself of groups as Zope knows them in certain 
applications like Plone. The LDAPUserFolder equates group records in 
LDAP with roles in Zope, not with groups.


You're not providing any information about what your application looks 
like and what you're trying to achieve, but you may find more 
functionality (like Zope group support) by using the 
PluggableAuthService user folder in conjunction with the 
LDAPMultiPlugins product.


Thanks for the quick reply.

I use PAS, LDAPUserFolder and LDAMPMultiPluggins with Pone and I guess 
that is the functionality I am looking for with this Zope instance as 
well; the ability to map groups to local roles, instead of just users to 
local roles in subfolders and not site-wide (as LDAPUserFolder by itself 
already allows me to do).


I will install those products and see how it goes.


___
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] LDAPUserFolder question

2008-07-08 Thread Erik Myllymaki

I am using LDAPUserFolder-2.9 with Zope 2.10.6 on Ubuntu 7.

It is working well, users can log in and I can map groups to Zope roles.

However, I was hoping that I could assign groups local roles, so that I 
can allow groups to be 'Managers' only in certain sub-folders of our site.


Is this possible with LDAPUF, do I need additional packages, have i set 
it up incorrectly?


Thanks for any advice.
___
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] question about cataloging Page Templates

2008-06-24 Thread Erik Myllymaki
In Page Templates that use macros, how would you ensure that the entire 
rendered page is cataloged and returned by a search?


For instance, this template:


 

tomatoes

 


is returned when you search for "tomatoes" but is not returned when you 
search on a word that is in the "main" macro in "template1" Page Template.






___
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] template / context question

2008-06-20 Thread Erik Myllymaki
I have solved this by using macros instead of just trying to *include* 
the TAL snippit.


I wrapped the snippit in a tag like this:




and called it on each tempalte that uses it liek this:

use-macro="context/templates/widgets/template-lister/macros/lister">





Erik Myllymaki wrote:
I am trying to separate out small bits of HTML that are used on many 
pages of a site.


In one case I use a secondary navigation on some pages in the right 
column that is supposed to look in the containing folder's sub-folders 
and list the Page Templates that is finds there.


I create a folder called /templates/widgets and within there I have a 
Page Template called template-lister.


Quick Links



Location Title




 title

 

   
   Posting Title
   
   
  No Postings at this time
   







If I put this code directly in each Page Template that uses it, it works 
fine, but when removed from each Page Template and called like so:


tal:omit-tag="" />


it uses the context of the "/templates/widgets" folder and does not work.

Because this bit of TAL is used on many pages and the style of it 
changes often, I really want to pull it out into one place for easy 
updating.


I know I am missing something elemental here ...

Thanks for any advice.
___
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] template / context question

2008-06-20 Thread Erik Myllymaki
I am trying to separate out small bits of HTML that are used on many 
pages of a site.


In one case I use a secondary navigation on some pages in the right 
column that is supposed to look in the containing folder's sub-folders 
and list the Page Templates that is finds there.


I create a folder called /templates/widgets and within there I have a 
Page Template called template-lister.


Quick Links



Location Title




 title

 

   
   Posting Title
   
   
  No Postings at this time
   







If I put this code directly in each Page Template that uses it, it works 
fine, but when removed from each Page Template and called like so:


tal:omit-tag="" />


it uses the context of the "/templates/widgets" folder and does not work.

Because this bit of TAL is used on many pages and the style of it 
changes often, I really want to pull it out into one place for easy 
updating.


I know I am missing something elemental here ...

Thanks for any advice.
___
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] TextIndexNG3 question

2008-02-18 Thread Erik Myllymaki

Andreas Jung wrote:


and the PDFs
have no words cataloged at all.


If you have the external converters installed and if they are in the $PATH
and available to the Python interpreter process then I have strong 
doubts about that. Trible check that. If necessary take the debugger for 
checking

the calls of the external converters.


I'm pretty sure the converters are installed properly, but the issue is
prior to the calling of any converters.

Stepping through textindexng/content.py - extract_content():

139 for f in icc.getFields():
140 
141  ->  d = icc.getFieldData(f)
142 
143 # check if we need to convert
144 if d.has_key('mimetype'):


d never has a key of 'mimetype'.






___
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] TextIndexNG3 question

2008-02-18 Thread Erik Myllymaki

Andreas Jung wrote:

I find all Page Templates and PDFs and Catalog them. They do show up in
the Catalog, but the Page Templates have all their HTML tags included in
the catalog(I thought they would be stripped automagically)


Your expectations are wrong. If an object does not provide 
IIndexableContent or if there is no adapter for this then TXNG3 will 
default to the "old" Zope 2 indexing behaviour and index the string 
representation of the content as it is.



I had thought that since ZPT has a content type of text/html, that 
TextIndexNG3 would lookup and use the converter listed on the Converters 
page for the "text/html" mimetype: "Converter HTML to ASCII"  "always"


How do I enable this behaviour?
___
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] TextIndexNG3 question

2008-02-17 Thread Erik Myllymaki
I have an older Zope install and i want to enable searching of Page 
Templates and PDFs.


Because it's an older Zope version (2.8.5) I have had to go back a few 
revisions of TextIndexNG3 (3.1.16) and Five (1.2.6)


Install seems fine including setup of the extensions modules.

I create a textIndexNG Index called PrincipiaSearchSource, Converters 
show that pdftotext is available and HTML to ASCII is 'always' available.


I find all Page Templates and PDFs and Catalog them. They do show up in 
the Catalog, but the Page Templates have all their HTML tags included in 
the catalog(I thought they would be stripped automagically) and the PDFs 
have no words cataloged at all.


Any suggestions appreciated.

Thanks,


Erik Myllymaki



Zope Version
(Zope 2.8.5-final, python 2.3.5, linux2)
Python Version
2.3.5 (#1, Jan 3 2006, 23:22:48) [GCC 3.2.3 20030502 (Red Hat Linux 
3.2.3-52)]

System Platform
linux2
SOFTWARE_HOME
/usr/local/Zope-2.8.5/lib/python
ZOPE_HOME
/usr/local/Zope-2.8.5



Five (Installed product Five (Five 1.2.6))
TextIndexNG3 (Installed product TextIndexNG3 (3.1.16))
___
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] zope, webdav, ical, vcalendar, etc.

2007-02-02 Thread Erik Myllymaki
I am trying to dynamically create iCalendar or vCalendar files.

I can do this with a Zope Page Template, naming it myCalendar.ics. When
myCalendar.ics is accessed through a web browser, iCal pops up and asks
what I want to do with the calendar info, etc. and all is well.

But what I would like to do is use iCal or thunderbird( lightening ) to
subscribe to the calendar so that updates are handled automatically. For
iCal to do this, it wants to access the ics file via webdav.

So I attempt to connect to zope via its webdav port and request the sale
zpt, but of course it sends it as its source, not as the rendered
calendar. If i take out all the TAL and just have a static vCalendar or
iCalendar file then this works via webdav but my whole reason for doing
this is so that I can populate the calendar with events form a RDBMS
when the myCalendar.ics template is called.

Your ideas appreciated.




___
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] idiotic dreamweaver question

2006-09-21 Thread Erik Myllymaki
there is a patch to Zope that adds those extensions for you through the webdav 
interface - we use it here and it works well. google should find it for you.


Of course you could just name them all with extensions from within zope...

David Bear wrote:

Sorry to bug this list with a dw question. However, I was using DAV
in dw and found that dw is unable to handle file extensions like .pt,
.zpt, _html , etc.

Does anyone else use dreamweaver to edit zope/plone files? If so, how
do you make dreamweaver edit this types of files? I know _html, .pt,
.zpt etc are well formed xhtml -- but I don't know how to tell stupid
dw to edit them since it uses the extension to recognize file type.


___
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] question on URL styling

2006-09-11 Thread Erik Myllymaki



David H wrote:

Erik Myllymaki wrote:




David H wrote:


Jonathan wrote:



- Original Message - From: "Erik Myllymaki" 
<[EMAIL PROTECTED]>

To: 
Sent: Monday, September 11, 2006 12:24 PM
Subject: [Zope] question on URL styling


I am making a survey that has many very similar pages all in one 
directory.
The page templates are called page-1.html, page-2.html, ... 
page-n.html.


I am using two submit buttons on each of the pages; one for 'Next' 
and one for 'Previous' so that I catch changes to the form elements 
in each direction. I use a python script as index_html, and hit it 
on each submit (), and then redirect to the 
appropriate page, whether that page is current_page++ or 
current_page--. I also stuff all form variables into SESSION in the 
index_html python script.


What I am wondering though, is how to display the 'page' portion of 
the address - right now it always just displays as 
http://myzopesite.com/workingdirectory/


I would like it to display 
http://myzopesite.com/workingdirectory/page-1.html, 
http://myzopesite.com/workingdirectory/page-1.html, etc.


The pages are all accessible directly by those names, but by always 
going to index_html and returning the page via "return 
container[next_page](context, request)" I never see this part in 
the URL.




One possible work-around is to rename your python script, reformat 
your urls and use traverse_subpath to access the page to be 
displayed.  eg.  if you name your script 'displayPage', then you can 
have a url like:


http://myzopesite/workingdirectory/displayPage/page-1.html

the displayPage script will be invoked and it can then access 
REQUEST['traverse_subpath'] (which in the above case will contain 
'page-1.html').



hth

Jonathan


Erik,
I find your "use case" a bit strange.  Why would your users need to 
see different URLs?  Doesnt that pollute their browser's history list 
- and do you want them clicking some Page-nn from history?



I'm not too sure I understand the pollution reference...do you mean 
that it would make sense that an end user would only ever bookmark to 
the start of the survey, and not half way through?


I guess it's more for me and the designers then for end users.

After the user goes through the 30+ pages of survey questions, they are
presented with a summary page which basically shows all the 'Q's and 
'A's and their contact info on one big page "Hi, JOE from CALGARY, you 
told us that your favourite colour is GREEN, your favourite fruit is a 
BANANA ... etc.".


There are links beside each answer so that they can go back and change 
that answer before submitting the survey if they wish. So, they should 
have access to each and every page by name and they can jump around 
within the survey.





If you have users that will fill out 30+ pages of any survey I want your 
mailing list. :-)


we'll call them a "captive audience" :)


___
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] question on URL styling

2006-09-11 Thread Erik Myllymaki



David H wrote:

Jonathan wrote:



- Original Message - From: "Erik Myllymaki" 
<[EMAIL PROTECTED]>

To: 
Sent: Monday, September 11, 2006 12:24 PM
Subject: [Zope] question on URL styling


I am making a survey that has many very similar pages all in one 
directory.

The page templates are called page-1.html, page-2.html, ... page-n.html.

I am using two submit buttons on each of the pages; one for 'Next' 
and one for 'Previous' so that I catch changes to the form elements 
in each direction. I use a python script as index_html, and hit it on 
each submit (), and then redirect to the appropriate 
page, whether that page is current_page++ or current_page--. I also 
stuff all form variables into SESSION in the index_html python script.


What I am wondering though, is how to display the 'page' portion of 
the address - right now it always just displays as 
http://myzopesite.com/workingdirectory/


I would like it to display 
http://myzopesite.com/workingdirectory/page-1.html, 
http://myzopesite.com/workingdirectory/page-1.html, etc.


The pages are all accessible directly by those names, but by always 
going to index_html and returning the page via "return 
container[next_page](context, request)" I never see this part in the 
URL.



One possible work-around is to rename your python script, reformat 
your urls and use traverse_subpath to access the page to be 
displayed.  eg.  if you name your script 'displayPage', then you can 
have a url like:


http://myzopesite/workingdirectory/displayPage/page-1.html

the displayPage script will be invoked and it can then access 
REQUEST['traverse_subpath'] (which in the above case will contain 
'page-1.html').



hth

Jonathan


Erik,
I find your "use case" a bit strange.  Why would your users need to see 
different URLs?  Doesnt that pollute their browser's history list - and 
do you want them clicking some Page-nn from history?


I'm not too sure I understand the pollution reference...do you mean that it 
would make sense that an end user would only ever bookmark to the start of the 
survey, and not half way through?


I guess it's more for me and the designers then for end users.

After the user goes through the 30+ pages of survey questions, they are
presented with a summary page which basically shows all the 'Q's and 'A's and 
their contact info on one big page "Hi, JOE from CALGARY, you told us that your 
favourite colour is GREEN, your favourite fruit is a BANANA ... etc.".


There are links beside each answer so that they can go back and change that 
answer before submitting the survey if they wish. So, they should have access 
to each and every page by name and they can jump around within the survey.




___
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] question on URL styling

2006-09-11 Thread Erik Myllymaki



Andreas Jung wrote:



--On 11. September 2006 09:33:39 -0700 Erik Myllymaki 
<[EMAIL PROTECTED]> wrote:




I'm trying this out and it seems to be working:

request.RESPONSE.redirect(context[next_page].absolute_url())

is this the *correct* way to do it?


Basically yes. But it is bad practice to perform redirections with a ZPT
(I assume that since you're using lowercase 'request'). Better use a
PythonScript instead.



yes it is in a python script; i just keep the boilerplate from the example 
python scripts around:


request = context.REQUEST
.
.
.
request.RESPONSE.redirect(context[next_page].absolute_url())
.
.
.


Thanks.
___
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] question on URL styling

2006-09-11 Thread Erik Myllymaki


I'm trying this out and it seems to be working:

request.RESPONSE.redirect(context[next_page].absolute_url())

is this the *correct* way to do it?



Erik Myllymaki wrote:

I am making a survey that has many very similar pages all in one directory.
The page templates are called page-1.html, page-2.html, ... page-n.html.

I am using two submit buttons on each of the pages; one for 'Next' and 
one for 'Previous' so that I catch changes to the form elements in each 
direction. I use a python script as index_html, and hit it on each 
submit (), and then redirect to the appropriate page, 
whether that page is current_page++ or current_page--. I also stuff all 
form variables into SESSION in the index_html python script.


What I am wondering though, is how to display the 'page' portion of the 
address - right now it always just displays as 
http://myzopesite.com/workingdirectory/


I would like it to display 
http://myzopesite.com/workingdirectory/page-1.html, 
http://myzopesite.com/workingdirectory/page-1.html, etc.


The pages are all accessible directly by those names, but by always 
going to index_html and returning the page via "return 
container[next_page](context, request)" I never see this part in the URL.


Thanks for any suggestions.




___
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] question on URL styling

2006-09-11 Thread Erik Myllymaki

I am making a survey that has many very similar pages all in one directory.
The page templates are called page-1.html, page-2.html, ... page-n.html.

I am using two submit buttons on each of the pages; one for 'Next' and one for 
'Previous' so that I catch changes to the form elements in each direction. I 
use a python script as index_html, and hit it on each submit (action=".">), and then redirect to the appropriate page, whether that page is 
current_page++ or current_page--. I also stuff all form variables into SESSION 
in the index_html python script.


What I am wondering though, is how to display the 'page' portion of the address 
- right now it always just displays as http://myzopesite.com/workingdirectory/


I would like it to display http://myzopesite.com/workingdirectory/page-1.html, 
http://myzopesite.com/workingdirectory/page-1.html, etc.


The pages are all accessible directly by those names, but by always going to 
index_html and returning the page via "return container[next_page](context, 
request)" I never see this part in the URL.


Thanks for any suggestions.




___
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

2006-04-24 Thread Erik Myllymaki
I'll chime in with a "me too" ( see me thread within the last week on the same 
list).


I haven't looked into it as deeply as you, but I have tried the 
DeadlockDebugger which itself was inaccessible during the time when zope was 
spinning. Nothing in the logs.


My install is Zope 2.8.5 on RHEL 4 without Zeo.




Florent Guillaume wrote:

Try DeadlockDebugger.

Florent

Andy Altepeter wrote:

Hey All,

I'm experiencing hanging issues with my Zope-2.8.6+zeo setup/ RHEL 4. 
The hanging isn't categorized by 100% cpu usage. Actually, I had the 
same issues using 2.8.5, but I've upgraded since then.  Here's the 
situation:


I have one zeo client connected to a zeo server on the same box.  
Apache sits in front, using RewriteRules to request data from zope.


After some time (could be 2 minutes or an hour), the zeo client stops 
responding.  Apparently this is called a deadlock or a "spinning zope".


I've tried using gdb to attach to the zeo client pid, and use the 
recipe http://zopelabs.com/cookbook/1073504990 to print a traceback, 
but the call always aborted with SIGABORT.
I've captured all of the requests sent to zope during an uptime window 
(via Z2.log), and using wget to "replay" the requests.  I've also 
pulled from apache's rewrite log all requests proxied to zope, 
thinking the Z2.log only writes finished requests.  I setup another 
zeo client (on the same box, different port) and used wget to replay 
these captures as well.  Just running these captures does not cause 
zope to hang.  In fact, I have not been able to cause zope to hang by 
replaying.  There doesn't seem to be any one url or sequence of urls 
that cause zope to hang.


I've tried reinstalling the zope instance, but that didn't help.

I've tried using requestprofiler.py to inspect the trace.log.  This 
shows a high number of "hangs", but not on a url that actually 
triggers a spinning zope.


Basically, that's where I'm stuck.  Is there anything else I can try?  
Am I missing something?


Thanks for the help,
Andy
___
Zope maillist  -  [EMAIL PROTECTED]
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: RE : [Zope] zope 2.8.5 becomes unresponsive.

2006-04-24 Thread Erik Myllymaki
I got a chance to try and debug with the the DeadlockDebugger, but it was 
unresponsive...


Still nothing in the event log.

Any other ideas?


Jens Vagelpohl wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On 21 Apr 2006, at 07:52, Sébastien VINOT wrote:

I've read documentation about deadlock and apparently the CPU usage
should be high, isn't it ? Because in my case the CPU usage is falling
to 0.0 (while the python process is still alive).


No. Deadlocks cannot be identified by CPU usage. If Zope hangs, there is 
a deadlock. Use the diagnostic methods described in the documents you 
looked up.


jens

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

iD8DBQFESJ2iRAx5nvEhZLIRAiQ7AKCdWKcS8d0nh80djOdVNkrtGFzsRACgssng
JNnz286zi8qJMFI4CgQe0iI=
=27JP
-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] zope 2.8.5 becomes unresponsive.

2006-04-20 Thread Erik Myllymaki

Environment is RHEL 3, Zope v2.8.5 (Python 2.3.5).

Every couple of days the zope instance will become unresponsive and require a 
restart. ZMI is inaccessible at these times so I have to do run "service 
my_zope_service restart" in the usual redhat way.


There is nothing in the logs, and if I do "service y_zope_service status" I am 
told "program running; pid=22671"


This is a service under very light load.

I viewed the chanelog for v2.8.6 and didn't see any changes that address this, 
and for various reasons I do not want to move into the v2.9.x builds.


Any guidance appreciated.
___
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] Summary variables is removed in version 2.9?

2006-04-11 Thread Erik Myllymaki
I just upgraded a site from 2.8(Linux) to 2.9.2(windows) and I have had no 
problem like that.


e.g.

   
   
   

   
   
   
   





Infor Gates wrote:

Dear Zopist

I have upgraded my Zope 2.8.x to Zope 2.9.0.  I have used the  sequence 
which uses the summary variables (e.g. total-count). It works well in 2.8.  However, when I 
ported the same  sequence, the summary variables are not shown.  There is no 
error message too.
I have checked the documentation (in Zope Help) and others, but there is no 
hint of the above.

Have anyone have similar experiences?

Thank you for your time.

CY


-
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ 
countries) for 2¢/min or less.




___
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] where's the XML?

2006-04-11 Thread Erik Myllymaki
I want to access numerous methods/functions on a zope server via Javascript. 
Zope has xml "built-in" right? So must I write my own XML output?


For now, I wrap the existing functions like so:


http://xml.zope.org/namespaces/tal"; >
  

  fname1
  lname1

  


I know i'm missing the obvious here so please, somebody, hit me over the head 
with it.


Thanks.
___
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: MailDropHost on windows

2006-02-14 Thread Erik Myllymaki

Tres Seaver wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jens Vagelpohl wrote:

On 14 Feb 2006, at 17:58, Erik Myllymaki wrote:

I'm trying to get MailDropHost running under windows, but it errors 
with:


Traceback (most recent call last):
  File ".\maildrop.py", line 296, in ?
pid = os.fork()
AttributeError: 'module' object has no attribute 'fork'

Altering it to run without threading seems to work quite well.


It's forking not to use threading per se but to use threads as a way  to
completely detach from the console.

I will update the documentation to specifically mention that Windows  is
not officially supported, that was my oversight.


A sufficiently clever / motivated person could probably adapt the code
from 'zopeservice.py' to run the MailDropHost daemon as a service in
Windwos.


thanks for the tip - I was about to use srvany for this...
___
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] MailDropHost on windows

2006-02-14 Thread Erik Myllymaki

I'm trying to get MailDropHost running under windows, but it errors with:

Traceback (most recent call last):
  File ".\maildrop.py", line 296, in ?
pid = os.fork()
AttributeError: 'module' object has no attribute 'fork'

Altering it to run without threading seems to work quite well.


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

2006-01-17 Thread Erik Myllymaki

the complaint is not mine but is from the marketing department :)

in Thunderbird (on Windows anyway) it adds a black mark in place of the newline 
:-0

I was just curious. Thanks.

One other thing though, is that when using MailTemplates, i haven't found a way 
to include BCC and CC recipients without altering MailHost.py.




Tino Wildenhain wrote:

Erik Myllymaki schrieb:


I haven't delved too deeply here, but I think Zope MailTemplates are
wrapping any subject longer than 70 characters.

Is there any way to turn this feature off?



No, its just standard. Where is the problem?
rfc822 headers can be wrapped.

___
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] Zope MailTemplates

2006-01-17 Thread Erik Myllymaki
I haven't delved too deeply here, but I think Zope MailTemplates are wrapping 
any subject longer than 70 characters.


Is there any way to turn this feature off?
___
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] weird occurrance with Zope MailTemplates

2006-01-06 Thread Erik Myllymaki
I am running into a strange problem with Zope MailTemplates; it probably 
reflects my rather shallow understanding of Zope in general.


I am using a Python Script as my index_html. It has a simple form and calls 
itself on submit.


And I use another Python Script that simply calls my MailTemplate object:

--index_html--

request = container.REQUEST
RESPONSE =  request.RESPONSE

if not request.has_key('next_state'):
   return container['index.zpt'](context, request)

if request['next_state']=="Client Lookup":
  error=''
  message=''
  try:
container.send_template()
message = "Mail Sent!"
  except:
error = "Error sending Mail!"

  return container['index.zpt'](context, request, error=error, message=message)

--/index_html--

--send_template--
msg =  container.test_mt.as_message(
mfrom='[EMAIL PROTECTED]'.encode('utf-8'),
mto='[EMAIL PROTECTED]'.encode('utf-8'),
subject='This is the Subject of a MailTemplate'.encode('utf-8'),
message='This is the body'.encode('utf-8'),
encoding='utf-8'
)
msg.send()
return 'Mail Sent'
--/send_template--

My mailtemplate is the same on that is used in the examples(with a small typo 
corrected (s/option/options):


--test_mt--
  http://xml.zope.org/namespaces/tal";
  xmlns:metal="http://xml.zope.org/namespaces/metal";
  >Dear ,

   would like to thank you for
  your interest in:
  

  

  cheers,

  The Web Team
  

--/test_mt--

the send_template script works when tested from the ZMI.

When the MailTemplate was first created, it defaulted to text/plain. The weird 
thing is that this effected my main zpt in addition to the email. So after 
submitting the form, the zpt came back rendered as code instead of html, until I 
clued into what was happening and changed the MailTmeplate to text/html.


Is there a really good reason for this behaviour that I am missing?
___
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] tal:attributes question

2005-07-22 Thread Erik Myllymaki

I am trying to set the bgcolor of a page based on the existance of a variable.

Neither of these seem to work:





I can access the error variable with this:

tal:content="options/error | nothing">There was an error

___
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: question on python script, dtml method and options

2005-07-19 Thread Erik Myllymaki
next_state does get initialized - it is the name of the submit buttons on my 
various forms.



Josef Meile wrote:

Hi Erik,

I don't get a traceback, i just get error and message back as empty 
strings; their initiallized value.


very strange.


Looking at your python script I saw that initially you set error and
message to the empty string ''. I guess the script is not detecting a
'next_state' keyword in the request. So, it is excecuting the first if
of your code:

if not request.has_key('next_state'):
  return container['MAIN'](context, request, error=error, message=message)

Where are you initializing 'next_state'? Try printing the request
object to see if it really exists or perhaps you are doing some typo.

Regards,
Josef

___
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] question on python script, dtml method and options

2005-07-19 Thread Erik Myllymaki

I am using DTML only because I am using the excellent Calendar tag product.

sometimes, the links on the calendar tag get affected by from variables so as a 
hack i re-write the QUERY_STRING using:


request.RESPONSE.redirect(request['URL'] + '?mode-calendar=' + 
request['mode-calendar'] + '&date-calendar=' + request['date-calendar'] + 
'&location=' + request['location'])


instead of:

return container['MAIN'](context, request, error=error, message=message)

I originally left that detail out to avoid unnecessary confusion, but I think it 
might be the cause...ideas?






Peter Bengtsson wrote:

On 7/19/05, Erik Myllymaki <[EMAIL PROTECTED]> wrote:


I use the following template often. When using a page template for my MAIN page,
I access the error and message vars with:

Error message
Reg. Message

How would I access them when I use a dtml-method for my MAIN page?
 and  don't seem to work.




That _should_ work. 
In DTML, I think when you ask for something it does a options,

REQUEST, context, acquisition context lookup all in one loop. In TAL
you can't be lazy :( and you have to specify exactly where you expect
it to come from.

Bare in mind that keyword arguments only span across ONE template
where as variables in REQUEST span across ALL templates.

Doublecheck your template usage and/or send us your traceback.



Python Script - index_html:

# Import a standard function, and get the HTML request and response objects.
from Products.PythonScripts.standard import html_quote
request = container.REQUEST
RESPONSE =  request.RESPONSE

error=''
message=''

if not request.has_key('next_state'):
  return container['MAIN'](context, request, error=error, message=message)

elif  request.get('next_state') == 'Do Something':
  try:
doSomething()
message = message + 'We did something'
  except:
error = error + 'Error in doSomething()'


elif  request.get('next_state') == 'Do Something Else':
  try:
doSomethingElse()
message = message + 'We did something else'
  except:
error = error + 'Error in doSomethingElse()'


return container['MAIN'](context, request, error=error, message=message)

___
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] question on python script, dtml method and options

2005-07-19 Thread Erik Myllymaki
I don't get a traceback, i just get error and message back as empty strings; 
their initiallized value.


very strange.



Peter Bengtsson wrote:

On 7/19/05, Erik Myllymaki <[EMAIL PROTECTED]> wrote:


I use the following template often. When using a page template for my MAIN page,
I access the error and message vars with:

Error message
Reg. Message

How would I access them when I use a dtml-method for my MAIN page?
 and  don't seem to work.




That _should_ work. 
In DTML, I think when you ask for something it does a options,

REQUEST, context, acquisition context lookup all in one loop. In TAL
you can't be lazy :( and you have to specify exactly where you expect
it to come from.

Bare in mind that keyword arguments only span across ONE template
where as variables in REQUEST span across ALL templates.

Doublecheck your template usage and/or send us your traceback.



Python Script - index_html:

# Import a standard function, and get the HTML request and response objects.
from Products.PythonScripts.standard import html_quote
request = container.REQUEST
RESPONSE =  request.RESPONSE

error=''
message=''

if not request.has_key('next_state'):
  return container['MAIN'](context, request, error=error, message=message)

elif  request.get('next_state') == 'Do Something':
  try:
doSomething()
message = message + 'We did something'
  except:
error = error + 'Error in doSomething()'


elif  request.get('next_state') == 'Do Something Else':
  try:
doSomethingElse()
message = message + 'We did something else'
  except:
error = error + 'Error in doSomethingElse()'


return container['MAIN'](context, request, error=error, message=message)

___
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] question on python script, dtml method and options

2005-07-19 Thread Erik Myllymaki
I use the following template often. When using a page template for my MAIN page, 
I access the error and message vars with:


Error message
Reg. Message

How would I access them when I use a dtml-method for my MAIN page?
 and  don't seem to work.

Python Script - index_html:

# Import a standard function, and get the HTML request and response objects.
from Products.PythonScripts.standard import html_quote
request = container.REQUEST
RESPONSE =  request.RESPONSE

error=''
message=''

if not request.has_key('next_state'):
  return container['MAIN'](context, request, error=error, message=message)

elif  request.get('next_state') == 'Do Something':
  try:
doSomething()
message = message + 'We did something'
  except:
error = error + 'Error in doSomething()'


elif  request.get('next_state') == 'Do Something Else':
  try:
doSomethingElse()
message = message + 'We did something else'
  except:
error = error + 'Error in doSomethingElse()'


return container['MAIN'](context, request, error=error, message=message)

___
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] general design question

2005-06-23 Thread Erik Myllymaki

I am making a small application for sales and marketing reports in-house.

Each user has a unique login/username in zope (via NtUserFolder) and they also 
have a unique employee_id in exisitng SQL database tables.


Each page calls numerous SQL methods almost all of which need to know the 
employee_id number.


I can make a small method getEmpID(request.AUTHENTICATED_USER) and map the 
logins to the employee_ids, but then I am calling that at least once every page.


I could call getEmpID(request.AUTHENTICATED_USER) once when the user logs in and 
then set it in a cookie or a session variable but I am unsure of the possible 
security issues in doing that.


Or I could start using the zope/NT login as the key in various sales and 
marketing tables.


Just thought I'd *throw it out there* for any input, thanks.


___
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] index.html in Python Script?

2005-04-21 Thread Erik Myllymaki
thanks, and this seems to do what I want to:
request = container.REQUEST
RESPONSE =  request.RESPONSE
if not request.has_key('next_state'):
  return container['index.html'](context, request)
Phillip Hutchings wrote:
On 22/04/05, Erik Myllymaki <[EMAIL PROTECTED]> wrote:
How do address a ZPT with a name like index.html in a Python Script?
The following:
request = container.REQUEST
RESPONSE =  request.RESPONSE
if not request.has_key('next_state'):
  return container.index.html(context, request)

The . is the python object referencing notation, so you can't have a
property called 'index.html' addressable in the normal way. Use
getattr instead.
return getattr(container, 'index.html')(context, request)
It's all in the Zope documentation.
___
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] index.html in Python Script?

2005-04-21 Thread Erik Myllymaki
How do address a ZPT with a name like index.html in a Python Script?
The following:
request = container.REQUEST
RESPONSE =  request.RESPONSE
if not request.has_key('next_state'):
  return container.index.html(context, request)
returns:
Error Type: AttributeError
Error Value: index
___
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 via WebDAV

2005-04-20 Thread Erik Myllymaki
I see - I was connecting to port 8090 - the regular old HTTP port instead
of port 9090 - my configured WebDAV port.
Works just fine now.
Erik Myllymaki wrote:
I am trying to use Zope with Dreamweaver via WebDAV.
There are lots of good docs and plenty of info in the archives and I 
have one
install setup and working really well. The one that works is Zope 2.7.4 
on Win32.

An older, production install I want to configure the same way is Zope 
2.6.2 on a
RedHat 9.0 machine, but it is not working.

The trouble I am having with that one is that it downloads all ZPT files 
without their
TAL and METAL tags, and then when uploading, it overwrites the good 
ones. "Munges" them, as
I think I've seen it typed before.

Is this just due to some changes between versions, or platforms, or...?
I have tried connecting via WebDrive, directly to the zserver WebDAV 
port and via Apache proxy
with the same results.

Thanks for any info you can provide.
___
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] Zope via WebDAV

2005-04-20 Thread Erik Myllymaki
I am trying to use Zope with Dreamweaver via WebDAV.
There are lots of good docs and plenty of info in the archives and I have one
install setup and working really well. The one that works is Zope 2.7.4 on 
Win32.
An older, production install I want to configure the same way is Zope 2.6.2 on a
RedHat 9.0 machine, but it is not working.
The trouble I am having with that one is that it downloads all ZPT files 
without their
TAL and METAL tags, and then when uploading, it overwrites the good ones. 
"Munges" them, as
I think I've seen it typed before.
Is this just due to some changes between versions, or platforms, or...?
I have tried connecting via WebDrive, directly to the zserver WebDAV port and 
via Apache proxy
with the same results.
Thanks for any info you can provide.
___
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] zmxodbc error

2000-12-22 Thread Erik Myllymaki

After installing the zmxodbc package I get the following error when I try
and add a zmxodbc object from the management screen:

Error Type: NameError
Error Value: SQLDataSources

I moved the mx directory from /lib/python/shared to /lib/python.

What else needs to be done?

A previous thread asked this same question without a response.

Also there was mention of some patches to this package that were available
by request which I would be interested in checking out.

Thanks,

-- 
Erik Myllymaki
[EMAIL PROTECTED]



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




[Zope] downgrading from 2.1.x from 2.2.0 to use NTuser authentication

2000-12-20 Thread Erik Myllymaki

I would really like to use the jc/ntuserfolder products but see that they
haven't been brought up to speed with the new 2.2.x security model. Will
downgrading to 2.1.x render my site inaccessible? What will I have to change
security wise so I can use these pages from the old version?

Alternatively, I might take a stab at bring the jc/ntuserfolder up to date
with the new security model - any insight from those in the know
appreciated(am I underestimating that task?).

Thanks,

-- 
Erik Myllymaki


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




[Zope] M2Crypto problem

2000-10-24 Thread Erik Myllymaki

I'm trying to use M2Crypto to access some https pages through an external
method, but I get this error:

SSLError: SSLEAY_RAND_BYTES: PRNG not seeded

How do I seed the PRNG?

I am using the windows binary of M2Crypto-0.05-snap3

Thanks,

Erik Myllymaki
[EMAIL PROTECTED]


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




[Zope] strange problem

2000-10-17 Thread Erik Myllymaki

This is a DTML_Method I call from my standard_error_message:


To: Webmaster <>
From: ZopeServer <>
Subject: Problem at 

Error Type: 
Error Value: 
Error Msg: 


: 
 


I call it like this: 

The mail is sent appropriately including all the REQUEST items, but the page
that is calling this DTML_Method never finishes downloading.

It seems that the loop through the REQUEST items causes page rendering to
hang? After several minutes, stopping the page download brings up a
*transfer interupted* message and only then do I see the bottom of the page.

If I leave this out:


: 
 

...it works well. 

Thanks for you help.

-- 
Erik Myllymaki
[EMAIL PROTECTED]



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




[Zope] re: trouble compiling DCOracle

2000-10-14 Thread Erik Myllymaki

--- In [EMAIL PROTECTED], Ayhan Ergul <[EMAIL PROTECTED]> wrote:
> > The output from *make* had a number of errors, but compiled the
shared
> > objects:
> 
> Warnings from C compilers are always part of the fun! They say
something
> can potentially be/go wrong, but not necessarily so. Take a deep
breath
> and move on.
> 
> > Testing the created shared object files went something like this:
> >
> > [sweetrig@shamalama src]# python DCOracle_test.py
> > Traceback (innermost last):
> >   File "DCOracle_test.py", line 1, in ?
> > import Buffer, oci_, sys
> > ImportError: libclntsh.so.8.0: cannot open shared object file: No
such
> > file or directory
> 
> 
> Make sure your ORACLE_HOME environment var is properly set before
running
> the test script. You'll probably want to put it in your zope start
script
> too.
> 
> 
> Ayhan Ergul <[EMAIL PROTECTED]>


So I tried a different Setup script that I got from a post on the
zopesite:

 START SETUP Script ##

*shared*

# Setup file for Oracle 8.1.6 (Tested for Linux on Intel).
#
# Unfortunately, the libraries needed to link Oracle change from revision
# to revision.
#
# Oracle provides a make file for building "demo" programs in
# $ORACLE_HOME/rdbms/demo/demo_rdbms.mk.  I have been unable to
# use this make file to build Python extensions. Adapting it is
# not adequate, because it may change for new Oracle revs.
# My approach is to use demo_rdbms.mk to build one of the
# demo programs, look at the libraries linked, and start from there. :-(
#

ORACLE_INCLUDES=$(ORACLE_HOME)/rdbms/demo -I$(ORACLE_HOME)/rdbms/public
-I$(ORACLE_HOME)/network/public -I$(ORACLE_HOME)/plsql/public

ORACLE_L=-lJNLSLib3 -lgslsg8 -lnsslb8 -lserver8 -lJNLSTool -lgslssb8 -lntcp8
\
-lsgsl_s8 -lagent8 -lgslssf8 -lntcps8 -lskgxp8 -lgx8 -lntns8 \
-lskgxpd -lnus8 -lslax8 -lclient8 -lldapclnt8 -lnzjs8 \
-lslpm -lclntsh -lmm -locijdbc8 -lsql8 -lcommon8 -ln8 -locijdbc8_g \
-lsqlplus -lcore8 -lnbeq8 -lordim8 -lsvrmgrl -lnent8 -lordim8 \
-ltrace8 -lctx8 -lnhost8 -lordsdo8 -ltracefe8 -lctxc8 -lnjni8 -lordts8 \
-ltracept8 -lctxs8 -lordvirt8 -ldbicx8 -lnl8 -lowm2 \
-lvppdc -lgeneric8 -lnldap8 -lplc8 -lvsn8 -lgslavl8 -lnls8 -lplp8 \
-lwtc8 -lgslber_s8 -lnoname8 -lpls8 -lzx8 -lgsldb8 -lnro8 -lpsa8 -lgslr8 \
-lnsgr8 -lqsmashr

ORACLE_LIBS=$(ORACLE_HOME)/lib/ -L$(ORACLE_HOME)/rdbms/lib
$(ORACLE_HOME)/rdbms/lib/defopt.o
$(ORACLE_HOME)/lib/sscoreed.o $(ORACLE_HOME)/lib/nautab.o
$(ORACLE_HOME)/lib/naeet.o
$(ORACLE_HOME)/lib/naect.o $(ORACLE_HOME)/lib/naedhs.o $(ORACLE_L)
$(ORACLE_L)

oci_ oci_.c -I$(ORACLE_INCLUDES) -L$(ORACLE_LIBS) -DDCORACLE8

Buffer Buffer.c

 END of SETUP Script ##


This time the error is a little different:

Traceback (innermost last):
  File "DCOracle_test.py", line 1, in ?
import Buffer, oci_, sys
ImportError: ./oci_.so: undefined symbol: kpumfs


I tried the trick in the README - got a list of all symbols in the
Oracle libs and it turns out kpumfs is in four, all of which are
included in the setup file:

% grep kpumfs /var/tmp/oracle.symbols
libclient8.a[kpum.o]: kpumfs T 0140
libclntsh.so: kpumfs T 0018eb10
libclntsh.so.8.0: kpumfs T 0018eb10
libvppdc.so: kpumfs T 000e2a40

I'm at a bit of a loose end here...

Thanks again,

Erik Myllymaki


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




[Zope] trouble compiling DCOracle

2000-10-14 Thread Erik Myllymaki

I'm having some trouble compiling DCOracle on my RedHat 6.1 machine. I am
using the latest DCOracle 1.3.2 and python 1.5.2.

I used the included Setup-8.1.5 file with the addition of one library to the
*ORACLE_Includes* list:

-I$(ORACLE_HOME)/rdbms/public


The output from *make* had a number of errors, but compiled the shared
objects:

gcc -fPIC  -I/oradisk01/app/oracle/product/8.1.6/rdbms/demo
-I/oradisk01/app/oracle/product/8.1.6/rdbms/public
-I/oradisk01/app/oracle/product/8.1.6/network/public
-I/oradisk01/app/oracle/product/8.1.6/plsql/public -DDCORACLE8 -g -O2
-I/usr/include/python1.5 -I/usr/include/python1.5 -DHAVE_CONFIG_H -c
./oci_.c
In file included from ./oci_.c:566:
Buffer.h:79: warning: static declaration for `PyImport_Import' follows
non-static
./oci_.c: In function `_wrap_odescr':
./oci_.c:2599: warning: assignment from incompatible pointer type
gcc -shared  oci_.o  -L/oradisk01/app/oracle/product/8.1.6/lib/
-L/oradisk01/app/oracle/product/8.1.6/rdbms/lib
/oradisk01/app/oracle/product/8.1.6/rdbms/lib/defopt.o -o oci_.so
gcc -fPIC  -g -O2 -I/usr/include/python1.5 -I/usr/include/python1.5
-DHAVE_CONFIG_H -c ./Buffer.c
In file included from ./Buffer.c:60:
Buffer.h:79: warning: static declaration for `PyImport_Import' follows
non-static
gcc -shared  Buffer.o  -o Buffer.so

Testing the created shared object files went something like this:

[sweetrig@shamalama src]# python DCOracle_test.py
Traceback (innermost last):
  File "DCOracle_test.py", line 1, in ?
import Buffer, oci_, sys
ImportError: libclntsh.so.8.0: cannot open shared object file: No such file
or directory

I have tried a number of setup files that were on this list for Oracle 8.1.6
and all have produced errors. Any help appreciated.

-- 
Erik Myllymaki
[EMAIL PROTECTED]



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




[Zope] re: redirect to user's folder not working

2000-10-05 Thread Erik Myllymaki

To answer my own question ;-))




-- 
Erik Myllymaki
[EMAIL PROTECTED]



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




[Zope] redirect to user's folder not working

2000-10-05 Thread Erik Myllymaki

I am using this line in my index_html DTML method in the base root folder to
redirect users to their proper folder so content can be specialized for each
of them:



I get an error:

Error Type: TypeError
Error Value: illegal argument type for built-in operation

It works fine like hard-coded like this:




I can use  on the page and get the appropriate
username though?!

Any help appreciated.

-- 
Erik Myllymaki
[EMAIL PROTECTED]



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




[Zope] re:jcNTUserFolder troubles

2000-07-24 Thread Erik Myllymaki

OK, so I got in by changing the ntuserfolder.py file in my installation:

   def authenticate(self, password, request):
""" try to authenticate the user
"""
# 
return 1
# 
.
.
.

... just in case anyone follows this thread in the future with the same
problem.

Erik Myllymaki
[EMAIL PROTECTED]


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




[Zope] jcNTUserFolder troubles

2000-07-24 Thread Erik Myllymaki

I am using Zope 2.2 and jcNTUserFolder 0.0.7. I just installed a top
level NTUserFolder and now I cannot login as superuser (or any user
for that matter). First of all, how do I get back into my Zope
management pages and second, what is wrong with jcNTUserFOlder (or what
did I do wrong?)?

I am running Zope standalone. My root user is mapped to a valid
administrator of my local NT Domain.

Thanks,

Erik Myllymaki


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




[Zope] upgrade to 2.2 and zsql methods problems

2000-07-16 Thread Erik Myllymaki

Hello,

I just upgraded to 2.2 from 2.1.6 on a WinNT machine. Things went well,
except my zsql methods won't run from the site. I can manage and test them
from the management pages, but if I call them from the site I get an
*unauthorized* error. This happens even wen I log in as superuser or the
owner of that zsqlmethod object. I have tried to recreate some of the
queries from scratch and applying new ownership and wide open permissions,
but this doesn't seem to work either.

Zope is running as a service and I am using the ODBC adapter to connect to
MSSQL Server. As I say, the queries all un as expected from the management
test screens.

Any ideas?

Thanks,

Erik Myllymaki
[EMAIL PROTECTED]


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




[Zope] problems with odbc

2000-07-16 Thread Erik Myllymaki

The following code works well from the command line, but produces the
following error when run from zope as an external method:

Error Type: AttributeError
Error Value: odbc

---
def testit():
 import dbi, odbc
 s = odbc.odbc('zopeSQL/zserver/***')
 cur = s.cursor()
cur.execute('select * from DBF_Import..purchdoc')
print cur.description
for tup in cur.description:
print tup[0],
print
while 1:
rec = cur.fetchmany(10)
if not rec: break
print rec
---

Any help greatly appreciated.


Erik Myllymaki
[EMAIL PROTECTED]


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




[Zope] logout

2000-06-13 Thread Erik Myllymaki

I saw this little bit posted in the mailinglist archives:




I made a DTML method with just these two lines in it. Of course when I call
it
I get into a recursive *logout -> login and call this method again ->
logout -> login and call this method again ...* loop.

What is the cleanest way to avoid this?

Thanks,


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




[Zope] trouble with acquisition

2000-06-06 Thread Erik Myllymaki

Hello,

I am new to OOP and Zope so please forgive me if I am being a chowderhead
;-)

I have a root report folder called "ReportParent". Within this folder, I
have 47 folders called, for simplicity, "report1, report2 ... reportN".
Within each of these folders I have a ZSQL query called "query" that is a
simple select statement.

In the ReportParent folder, I have an external method called columnNames:

#---
def columnNames(self):
""" docstring """
fieldnames = []
tempList = []
res=self.query()
columns = res._schema.items()
for (name,value) in columns:
 tempList.append((value,name))
tempList.sort()
for name, value in tempList:
 fieldnames.append(value)
return fieldnames
-

This returns the column names of the batch returned by the "query" ZSQL
Method in each reports1..N folder. In each folder is also an "index_html"
DTML Doc that renders the batch returned from the ZSQL Method:

-

Created for  on
 at  


  
  
Click on column header to re-order by that
column!

  
  
  
  
 
 
 
  






SQL Source:






I can call these queries with - www.mysite.net:8080/ReportParent/reportN and
get the desired results.

I have two questions on how I would like to change things:

1. The DTML Doc "index_html" is the same in the case of 45 of the 47 reports
folders. Seems to me I should be able to move the common index_html up to
the ReportParent folder, and just leave the two specialized ones where they
are, in their report? folders and continue to call the reports the same way.
Those that have a local index_html will use that, the others will look up
the hierarchy and find the common one in ReportParent. However, when I do
this and call the reports with the same URL I get:
"Error Type: AttributeError - Error Value: query" ?
Seems the index_html DTML Doc (or columnNames extended Method) can't find
"query" below it. How do I address this properly?

2. How do I pass in the ZSQL Method object to the external method
"columnNames.py"?
I'd like to name the queries what I want and reuse this method anywhere,
without the query having to be named "query". Out of frustration, I named
all the queries with the same name and then addressed "query" explicitly in
the external method, because no matter what I tried, I couldn't get the
cloumnNames methos to accept the ZSQL Method name as a second parameter?!

Thanks for your input,

Erik Myllymaki
[EMAIL PROTECTED]


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




[Zope] jcNTUserFolder and trusted domains

2000-06-02 Thread Erik Myllymaki

I am running Zope on NT without IIS. I installed jcNTUserFolder, but I
cannot get users from a trusted domain to log in. I added these users in the
*add users from other domains screen*.

Any help appreciated.

Erik Myllymaki
[EMAIL PROTECTED]


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