[Zope-Coders] Zope tests: 8 OK

2005-09-06 Thread Zope tests summarizer
Summary of messages to the zope-tests list.
Period Mon Sep  5 11:01:02 2005 UTC to Tue Sep  6 11:01:02 2005 UTC.
There were 8 messages: 8 from Zope Unit Tests.


Tests passed OK
---

Subject: OK : Zope-2_6-branch Python-2.1.3 : Linux
From: Zope Unit Tests
Date: Mon Sep  5 22:22:44 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-September/003015.html

Subject: OK : Zope-2_6-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Mon Sep  5 22:24:15 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-September/003016.html

Subject: OK : Zope-2_7-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Mon Sep  5 22:25:45 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-September/003017.html

Subject: OK : Zope-2_7-branch Python-2.4.1 : Linux
From: Zope Unit Tests
Date: Mon Sep  5 22:27:15 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-September/003018.html

Subject: OK : Zope-2_8-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Mon Sep  5 22:28:45 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-September/003019.html

Subject: OK : Zope-2_8-branch Python-2.4.1 : Linux
From: Zope Unit Tests
Date: Mon Sep  5 22:30:15 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-September/003020.html

Subject: OK : Zope-trunk Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Mon Sep  5 22:31:45 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-September/003021.html

Subject: OK : Zope-trunk Python-2.4.1 : Linux
From: Zope Unit Tests
Date: Mon Sep  5 22:33:15 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-September/003022.html

___
Zope-Coders mailing list
Zope-Coders@zope.org
http://mail.zope.org/mailman/listinfo/zope-coders


Re: [Zope] Re: (1 conflicts since startup at 2005-08-04T14:45:39)

2005-09-06 Thread Chris Withers

No, but I have in the past.

You don't have CMF Member installed by any chance do you?

cheers,

Chris

Tom Hallam wrote:
So on a development site with one person accessing it occasionally you 
wouldn't expect to see any?!


Tom

Chris Withers wrote:

It's when Zope's optimistic concurrency model encounters a conflict 
but where it managed to resolve it by retrying the request.


So, this is only a problem if you see LOTS of them, as it'll mean 
you're taking a big performance hit and you should think about what's 
causing the conflicts...


A google for Conflict Error Zope will give you LOTS of information ;-)

cheers,

Chris

Tom Hallam wrote:


I get it to.  Any ideas what it is?

Tom

Garito wrote:


Hi all!
We have:

Zope Version
(Zope 2.7.4-0, python 2.3.4, linux2)
Python Version
2.3.4 (#1, May 19 2005, 17:40:30) [GCC 3.3.5-20050130 (Gentoo 
3.3.5.20050130-r1, ssp-3.3.5.20050130-1, pie-8.7.7.

System Platform
linux2


and
Archetypes 1.3.2-final
CMF 1.4.7
Epoz 0.9.0

Our problem is we create some archetypes and in some parts of our 
structure if we try to create some object the computer cpu grows to 
100% and raises


2005-08-04T15:01:02 INFO(0) ZODB conflict error at 
/VirtualHostBase/the url to the object/createObject (1 conflicts 
since startup at 2005-08-04T14:45:39)


Has someone any idea to solve these issue?

On development time nothing of these occurs and when we go to 
production time these problem begins (for that these question is, 
for us, urgent)


Thank you very much



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





--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
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] Truncating strings with DTML

2005-09-06 Thread Chris Withers

Peter Bengtsson wrote:

easy:
dtml-let strDirPath='/'.join(strDirPath.split('/')[:-1])
You don't need to use _.string.legacy() functions. Just put your
python expression inside the quotation marks. If you're new to python,
don't let DTML be your place to learn python. Use a nice editor like
IDLE.


Just to emphasise what Peter is saying: do this in ZPT and put the logic 
in a python script. You'll suffer a lot less in the long run as a result ;-)


cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
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] Defining and creating a temporary storage for each user

2005-09-06 Thread Chris Withers

Marco Bizzarri wrote:
You mean mantaining just in the memory... uhmmm I should double check 
with the fact that the object in memory should mantain some reference to an 
object on the ZODB... which should be no problem at all.


Yeah, you'll have to be careful with references. If it were me, I'd just 
use zodb paths as references from your memory-only objects to your ZODB 
object and only resolve them when absolutely necessary...


cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
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] attributes on a file

2005-09-06 Thread Michael
hi, thanks for the help with my last (permissions) problem, i covered it
by replacing the code with known to work code think it was being
caused by a gettattrs call.

could someone please tell me how I would modify the file library
example to store an attribute with the file? (like the guest_name in
message book)

Thanks!!

mike.


___
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] Multilingual content class with LocalPropertyManager

2005-09-06 Thread Dragos Chirila

Hi

I want to build a multilingual content class with LocalPropertyManager 
from the Localizer product. Also, my class extends the File class, 
something like:



class MClass(LocalPropertyManager, File):

title = LocalProperty('title')
description = LocalProperty('description')

def __init__(self, id, title, description, file, precondition, 
content_type, lang):
File.__dict__['__init__'](self, id, title, file, content_type, 
precondition)

self._setLocalPropValue('title', lang, title)
self._setLocalPropValue('description', lang, description)


The problem is that everytime I call the title property it doesn't 
return the LocalProperty 'title', but instead it returns the value 
entered when the object was created.


From a ZPT, if lang is the current selected language and is 'en':

	span tal:replace=here/title / - don't get the correct value for the 
selected language


	span tal:replace=python:here.getLocalProperty('title', lang) / - 
correct value


Not event after editing the object properties, the 'title' value remains 
the same: the value entered when the object was created.


I tried not to call the File constructor, but it doesn't work also. My 
LocalProperty 'title' is somehow 'hidden'.


Could you please give me some indications about what am I doing wrong? 
Is there another way to have a class like MClass?


Thanks a lot,
Dragos
___
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: Defining and creating a temporary storage for each user

2005-09-06 Thread Marco Bizzarri
Florent, thanks for your suggestion.

Could you point me on more detailed information about this topic (i.e. how object stored in ZODB are actually managed)?

Is this more a ZODB mailing list question than Zope? Should I directly point to ZODB documentaiton?

Regards
MarcoOn 9/5/05, Florent Guillaume [EMAIL PROTECTED] wrote:
Marco Bizzarri wrote: You mean mantaining just in the memory... uhmmm I should double check with the fact that the object in memory should mantain some reference to an object on the ZODB... which should be no problem at all.
Beware, an object stored in the ZODB cannot be used by another connection tothe database. That means, by another thread, in the most common case. Exceptif you're very sure about what you're doing, the only kinds of references to
persistent objects you should have in memory are their paths.Florent--Florent Guillaume, Nuxeo (Paris, France) CTO, Director of RD+33 1 40 33 71 59 http://nuxeo.com
 [EMAIL PROTECTED]-- Icube Srlhttp://www.icube.it/
___
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: Defining and creating a temporary storage for each user

2005-09-06 Thread Florent Guillaume

Marco Bizzarri wrote:

Florent, thanks for your suggestion.

Could you point me on more detailed information about this topic (i.e. how 
object stored in ZODB are actually managed)?


I don't know of any document explaining that.

Is this more a ZODB mailing list question than Zope? Should I directly point 
to ZODB documentaiton?


It's definitely for the ZODB mailing-list, yes.

Florent

--
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of RD
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]
___
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 scalabilty and problems

2005-09-06 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dieter Maurer wrote:
 Florent Guillaume wrote at 2005-9-5 16:49 +0200:
 
...

It is just that the CMF is unable to fix a year long bug

It's not CMF's fault, it's only the responsibility of Windows developers 
running CMF. I for one couldn't care less.
 
 
 Really?
 
That the CMF makes an hierarchical filesystem scan for
each access to a filesystem directory view
should be the responsibility of the Windows developers running CMF?

There are no bugs: if you meat one, it proves that you
use the wrong system...
 
 
...

  then each access to a filesystem directory view triggers
  a hierarchical file system scan.

  The result is a slowdown by several orders of magnitude.

I believe Tres has now fixed this.
 
 It was not yet fixed when I made an svn checkout of the CMF 1.5 branch
 about 2 weeks ago.

The patch I merged for the CMF 1.5.2 release (back in late July), did
not completely remove the 'os.pathwalk':  it merely made the exclusion
of the .svn directory work cleanly.  The better fix would be to use the
Win32 APIs for file monitoring;  Mark Hammond volunteered to look into that.


Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDHXCv+gerLs4ltQ4RAgShAKCuvxwdqHpYGUQMLIxTUT1YGXbbqwCguFIH
KANLJ4XcxzwPMnhcYI6raE8=
=94l4
-END PGP SIGNATURE-

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


Re: [Zope] attributes on a file

2005-09-06 Thread Chris Withers

Michael wrote:

could someone please tell me how I would modify the file library
example to store an attribute with the file? (like the guest_name in
message book)


well, I don't have the example to hand, but my guess would be that 
you're looking to do something like:


from AccessControl import getSecurityManager

myfile.manage_addProperty('guest_name',
  getSecurityManager().getUser().getId()
  'string')

...where myfile is your file object.

That said, try just doing:

myfile.getOwner(), it may do what you want already...

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
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] Import Problem with the zexp-File

2005-09-06 Thread Birgit Dippelreiter








Hi!



I want to import a file to my Zope Server (version
2.7.4). The *.zexp is from a Zope Server with version 2.8.0. Should it be
possible to import the zexp  File from a newer Zope version to an older
one?



Because, when I try to import the File, I always get
the following error: 

Errortype: ImportError

Error value: No module named FileDocument



With best regards,

Birgit










___
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 startup error: Archetypes: IndexError: list index out of range

2005-09-06 Thread Paul Sue
Chris Withers wrote:

| OK ... But surely, there must be some way to get Zope/Plone working on 
Solaris!
| 
| I think we have Windows Server 2003 box I can try :)
|
|I'd suggest that is a better option than Solaris, there are more people doing 
it in the real world, and so you're more |likely to get help if something DOES 
go wrong...

Fair enough, but surely there must be SOMEONE on this list that is running 
Zope/Plone on Solaris???

|Your best bet though, if to get a commodity linux box, which that
|Win2003 box could easily be turned into ;-)

I agree and am scavenging for one ;-)

Paul
___
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: Import Problem with the zexp-File

2005-09-06 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Birgit Dippelreiter wrote:

 I want to import a file to my Zope Server (version 2.7.4). The *.zexp is
 from a Zope Server with version 2.8.0. Should it be possible to import the
 zexp - File from a newer Zope version to an older one?

It is possible, but not supported:  the case we try to support is
forward-compatible data, meaning that newer software can read data
created by older software.

 Because, when I try to import the File, I always get the following error: 
 
 Errortype: ImportError
 
 Error value: No module named FileDocument

That seems as though you have a different set of products installed in
the 2.7.4 instance than your 2.8.0 instance:  there is no
'FileDocument.py' in *any* standard Zope install (do you have the
NuxCPSDocuments product installed in both places?).


Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDHb3++gerLs4ltQ4RAgOgAKDM1foSyDTBZSVatBJvVbifMsAqVQCg0kxm
GBT12aUEG79rPD3uL6xIGmo=
=ceRX
-END PGP SIGNATURE-

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


Re: [Zope] DateTime and TimeZone

2005-09-06 Thread Mark Gibson
It seems that since the Pacific timezone is in daylight savings time,
the correct offset is -7.

So nevermind.

On Tue, 2005-09-06 at 00:53, Mark Gibson wrote:
 I installed zope 2.7.6 on a windows 2000 machine.   This machine is set
 to the pacific timezone.
 
 When I run python from the command line, and check DateTime, I get: 
 
  from DateTime import DateTime
  DateTime()
 DateTime('2005/09/06 23:55:29.620 GMT-7')
 
 The 'GMT-7' is the Mountain timezone.  The actual time should read
  DateTime('2005/09/06 23:55:29.620 GMT-8') for the Pacific timezone.
 
 What controls the default timezone behavior of DateTime on Windows?  How
 can I get this working correctly?
 
 Thanks,
 Mark
-- 
Mark Gibson [EMAIL PROTECTED]

___
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] DateTime and TimeZone

2005-09-06 Thread Dieter Maurer
Mark Gibson wrote at 2005-9-6 00:53 -0600:
 ...
 from DateTime import DateTime
 ...
What controls the default timezone behavior of DateTime on Windows?

DateTime gets it from Python and Python gets it from the operating
system (its C runtime library).

Under *nix, the environment variable TZ can be used to control
the timezone.

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


Re: [Zope] Import Problem with the zexp-File

2005-09-06 Thread Dieter Maurer
Birgit Dippelreiter wrote at 2005-9-6 13:33 +0200:
I want to import a file to my Zope Server (version 2.7.4). The *.zexp is
from a Zope Server with version 2.8.0. Should it be possible to import the
zexp - File from a newer Zope version to an older one?

 

Because, when I try to import the File, I always get the following error: 

Errortype: ImportError

Error value: No module named FileDocument

Your zexp reference an object defined in a module FileDocument.

The installation, you try to import the zexp does not have such
a module. It will not import until you make such a module
available (with acceptable content).

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


RE: [Zope] Zope startup error: Archetypes: IndexError: list index out of range

2005-09-06 Thread Dieter Maurer
Paul Sue wrote at 2005-9-6 08:39 -0700:
 ...
Fair enough, but surely there must be SOMEONE on this list that is running 
Zope/Plone on Solaris???

We did (but do no more because PC hardware is *much* faster at a lower
price). We had few Solaris related problems (none apart from
occational impossible error code returns).

Colleagues of mine are very fond of Solaris (which I cannot understand,
personally). They plan to test Solaris again now that Solaris
runs on PC hardware.


As I already told you (but you apparently decided to ignore it),
the problem you have observed has nothing to do with Solaris.
I saw it on Linux as well. It is a rare Python bug, triggered
when *.pyc files got an unfortunate source name.


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


[Zope] php header() equivalent in zope, translation please

2005-09-06 Thread Ed Colmar

I'm working on a website to be viewed in the eve-online in-game browser.

This browser has a feature called trusted site that allows the server 
to extract information about the game character that is viewing the 
page... Once the website is trusted all of the variables are 
transferred over in the header section of the http request... My 
question relates to how to request this trusted status...


They have provided a sample php script that has this behaviour, but I am 
very unfamiliar with php, and would be interested to see what the 
zope/python equivalent would be...


Could anyone give me a translation for this line  
header(eve.trustme: ...


TIA!

-e-


|?
ini_alter(session.use_cookies,1);
ob_start();
?
HTML
HEAD
TITLETestpage/TITLE
/HEAD
BODY
?
if (!(strpos($HTTP_USER_AGENT,EVE-minibrowser)===false))
{
if ($HTTP_SERVER_VARS[HTTP_EVE_TRUSTED]==no)
{
header(|eve.trustme:|http://www.mywebsite.net/::please| allow me to 
access your pilot information.|);

}
else
{
?
bPilot:/b
? echo |$HTTP_SERVER_VARS[“|HTTP_EVE_CHARNAME”]; ?
bLocation:/b
? echo |$HTTP_SERVER_VARS[“|HTTP_EVE_REGIONNAME”]; ?/?
echo $|HTTP_SERVER_VARS[“|HTTP_EVE_CONSTELLATIONNAME”]; ?/?
echo |$HTTP_SERVER_VARS[“|HTTP_EVE_SOLARSYSTEMNAME”]; ?BR
?
if (|$HTTP_SERVER_VARS[“|HTTP_EVE_STATIONNAME”] != None)
{
?
bStation:/b ? echo |$HTTP_SERVER_VARS[“|HTTP_EVE_STATIONNAME”]; ?br
?
}
}
}
?
/BODY
/HTML
?
ob_end_flush();
?|
___
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] unbound method failures

2005-09-06 Thread garry saddington
I am using Zope 2.8.1 and adding an xslt method produces the following
error:
Module ZPublisher.Publish, line 113, in publish
  * Module ZPublisher.mapply, line 88, in mapply
  * Module ZPublisher.Publish, line 40, in call_object
  * Module Shared.DC.Scripts.Bindings, line 311, in __call__
  * Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
  * Module Products.PageTemplates.PageTemplateFile, line 110, in
_exec
  * Module Products.PageTemplates.PageTemplate, line 102, in
pt_render
PageTemplateFile at /create
  * Module TAL.TALInterpreter, line 206, in __call__
  * Module TAL.TALInterpreter, line 250, in interpret
  * Module TAL.TALInterpreter, line 649, in do_loop_tal
  * Module Products.PageTemplates.TALES, line 206, in setRepeat
  * Module Products.PageTemplates.TALES, line 221, in evaluate
URL: create
Line 70, Column 6
Expression: standard:'here/availableProcessors'
Names:
{'container': App.ProductContext.__FactoryDispatcher__ object at 
0x414b478c,
 'context': App.ProductContext.__FactoryDispatcher__ object at 
0x414b478c,
 'default': Products.PageTemplates.TALES.Default instance at 
0x40be970c,
 'here': App.ProductContext.__FactoryDispatcher__ object at 
0x414b478c,
 'loop': Products.PageTemplates.TALES.SafeMapping object at 
0x414c13ec,
 'modules': Products.PageTemplates.ZRPythonExpr._SecureModuleImporter 
instance at 0x40bfa5ac,
 'nothing': None,
 'options': {'args': ()},
 'repeat': Products.PageTemplates.TALES.SafeMapping object at 
0x414c13ec,
 'request': HTTPRequest, 
URL=http://localhost:8080/manage_addProduct/ZopeXMLMethods/create,
 'root': Application at ,
 'template': PageTemplateFile at /create,
 'traverse_subpath': [],
 'user': garry}
  * Module Products.PageTemplates.Expressions, line 183, in __call__
  * Module Products.PageTemplates.Expressions, line 178, in _eval
  * Module Products.PageTemplates.Expressions, line 85, in render
TypeError: unbound method availableProcessors() must be called with
XSLTMethod instance as first argument (got nothing instead)

I have a Zope 2.7 on the same machine where xslt methods works fine.
Does anyone know what could be wrong here?
regards
Garry

ps. since I posted this I have tried to view my Plone site in 2.8.1 and get the 
following error:


An error was encountered while publishing this resource. 

TypeError

Sorry, a site error occurred.

Traceback (innermost last):

  * Module ZPublisher.Publish, line 187, in publish_module_standard
  * Module Products.PlacelessTranslationService.PatchStringIO, line
51, in new_publish
  * Module ZPublisher.Publish, line 144, in publish
  * Module Zope2.App.startup, line 199, in zpublisher_exception_hook
  * Module ZPublisher.Publish, line 113, in publish
  * Module ZPublisher.mapply, line 88, in mapply
  * Module ZPublisher.Publish, line 40, in call_object
  * Module Products.CMFCore.PortalContent, line 116, in __call__
  * Module Shared.DC.Scripts.Bindings, line 311, in __call__
  * Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
  * Module Products.CMFCore.FSPageTemplate, line 191, in _exec
  * Module Products.CMFCore.FSPageTemplate, line 124, in pt_render
  * Module Products.PageTemplates.PageTemplate, line 96, in
pt_render
FSPageTemplate at /sp/document_view used for /sp/index_html
TypeError: unbound method pt_getContext() must be called with
ZopePageTemplate instance as first argument (got nothing instead) (Also,
an error occurred while attempting to render the standard error
message.) 



Is this a bug?
regards
Garry

___
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: unbound method failures

2005-09-06 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

garry saddington wrote:
 I am using Zope 2.8.1 and adding an xslt method produces the following
 error:
 Module ZPublisher.Publish, line 113, in publish
   * Module ZPublisher.mapply, line 88, in mapply
   * Module ZPublisher.Publish, line 40, in call_object
   * Module Shared.DC.Scripts.Bindings, line 311, in __call__
   * Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
   * Module Products.PageTemplates.PageTemplateFile, line 110, in
 _exec
   * Module Products.PageTemplates.PageTemplate, line 102, in
 pt_render
 PageTemplateFile at /create
   * Module TAL.TALInterpreter, line 206, in __call__
   * Module TAL.TALInterpreter, line 250, in interpret
   * Module TAL.TALInterpreter, line 649, in do_loop_tal
   * Module Products.PageTemplates.TALES, line 206, in setRepeat
   * Module Products.PageTemplates.TALES, line 221, in evaluate
 URL: create
 Line 70, Column 6
 Expression: standard:'here/availableProcessors'
 Names:
 {'container': App.ProductContext.__FactoryDispatcher__ object at 
 0x414b478c,
  'context': App.ProductContext.__FactoryDispatcher__ object at 
 0x414b478c,
  'default': Products.PageTemplates.TALES.Default instance at 
 0x40be970c,
  'here': App.ProductContext.__FactoryDispatcher__ object at 
 0x414b478c,
  'loop': Products.PageTemplates.TALES.SafeMapping object at 
 0x414c13ec,
  'modules': 
 Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at 
 0x40bfa5ac,
  'nothing': None,
  'options': {'args': ()},
  'repeat': Products.PageTemplates.TALES.SafeMapping object at 
 0x414c13ec,
  'request': HTTPRequest, 
 URL=http://localhost:8080/manage_addProduct/ZopeXMLMethods/create,
  'root': Application at ,
  'template': PageTemplateFile at /create,
  'traverse_subpath': [],
  'user': garry}
   * Module Products.PageTemplates.Expressions, line 183, in __call__
   * Module Products.PageTemplates.Expressions, line 178, in _eval
   * Module Products.PageTemplates.Expressions, line 85, in render
 TypeError: unbound method availableProcessors() must be called with
 XSLTMethod instance as first argument (got nothing instead)

 I have a Zope 2.7 on the same machine where xslt methods works fine.
 Does anyone know what could be wrong here?

The XSLTMethod product followed standard practice in pre-2.8
ExtensionClass derivatives, borrowing an unbound method from one class
and sticking it directly into the class dict of another.  This practice
used to work, due to implementation details of the old ExtensionClass,
but now breaks, because EC is now a new-style class.  The cure is
simple:  find the spot where the method is being borrowed, and strip
off the UnboundMethod wrapper.  E.g., instead of:

  class Foo(Base):
  some_method = Bar.some_method

make it

   class Foo(Base):
  some_method = Bar.some_method.im_func

 ps. since I posted this I have tried to view my Plone site in 2.8.1 and get 
 the following error:
 
 
 An error was encountered while publishing this resource. 
 
 TypeError
 
 Sorry, a site error occurred.
 
 Traceback (innermost last):
 
   * Module ZPublisher.Publish, line 187, in publish_module_standard
   * Module Products.PlacelessTranslationService.PatchStringIO, line
 51, in new_publish
   * Module ZPublisher.Publish, line 144, in publish
   * Module Zope2.App.startup, line 199, in zpublisher_exception_hook
   * Module ZPublisher.Publish, line 113, in publish
   * Module ZPublisher.mapply, line 88, in mapply
   * Module ZPublisher.Publish, line 40, in call_object
   * Module Products.CMFCore.PortalContent, line 116, in __call__
   * Module Shared.DC.Scripts.Bindings, line 311, in __call__
   * Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
   * Module Products.CMFCore.FSPageTemplate, line 191, in _exec
   * Module Products.CMFCore.FSPageTemplate, line 124, in pt_render
   * Module Products.PageTemplates.PageTemplate, line 96, in
 pt_render
 FSPageTemplate at /sp/document_view used for /sp/index_html
 TypeError: unbound method pt_getContext() must be called with
 ZopePageTemplate instance as first argument (got nothing instead) (Also,
 an error occurred while attempting to render the standard error
 message.) 

You likely need to upgrade Plone to a version which has been made
compatible with Zope 2.8.


Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org


[Zope] StructuredDocument size limit reduced after 2.5.1 to 2.7.5 upgrade

2005-09-06 Thread John Schinnerer
Aloha,

 did you use POST or GET? If yoou use GET, use POST. If you use POST,
 then I dont know.

Using POST, and I don't know either...

Anyone else have any ideas?

To recap, my server was upgraded from zope 2.5.1 to 2.7.5 and now
StructuredDocument objects in a product I have built have a rather
small limit (about 4-6K) on how much content can be put into them.
The content is being put into them from content in a web form text area
using a call like

self.some-structured-document-object.manage_edit(REQUEST.stx-content,
'Name of Content')

Nothing in the product was touched/changed, just the zope upgrade.

The error message now returned in the browser window when I try and
update a structured document with more than ~4-6K of content via web
form is this:

--

Site Error

An error was encountered while publishing this resource.

Error Type: ValueError
Error Value: Maximum content length exceeded

Troubleshooting Suggestions

* The URL may be incorrect.
* The parameters passed to this resource may be incorrect.
* A resource that this resource relies on may be encountering an
error.

For more detailed information about the error, please refer to the
error log.

If the error persists please contact the site maintainer. Thank you for
your patience. 

--

This error is *not* showing up in the error log viewable from the root
of the zope instance.

thanks,
John S.







__
Click here to donate to the Hurricane Katrina relief effort.
http://store.yahoo.com/redcross-donate3/
___
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 )