Hi In the root i have a folder called 'xx yy' In a dtml MEthod i have the following line : <dtml-var "restrictedTraverse('xx yy').id"> I get an error : Traceback (innermost last): File D:\ZOPEFA~1\testar\lib\python\ZPublisher\Publish.py, line 150, in publish_module File D:\ZOPEFA~1\testar\lib\python\ZPublisher\Publish.py, line 114, in publish File D:\ZOPEFA~1\testar\lib\python\Zope\__init__.py, line 159, in zpublisher_exception_hook (Object: Examples) File D:\ZOPEFA~1\testar\lib\python\ZPublisher\Publish.py, line 100, in publish File D:\ZOPEFA~1\testar\lib\python\ZPublisher\HTTPResponse.py, line 259, in setBody File D:\ZOPEFA~1\testar\lib\python\ZPublisher\HTTPResponse.py, line 492, in notFoundError NotFound: (see above) WHY IS THAT ??????????? Dragos
Dragos Chirila wrote:
In the root i have a folder called 'xx yy' In a dtml MEthod i have the following line : <dtml-var "restrictedTraverse('xx yy').id">
I get an error :
Traceback (innermost last): 492, in notFoundError NotFound: (see above) WHY IS THAT ???????????
You should not use any whitespace in Zope-Ids. Think of all Zope-Objects as Python-Objects which are mapped to Urls. Python doesn't like any whitespace in attributes etc... Urls shouldn't contain any whitespace in my opinion! That's really nasty windowish-style... -maik
Hi I agree with you : urls shouldn't contain any whitespace , but why Zope accept for instance 1 whitespace for an object id ?? Or , why accepts whitespaces in objects ids ?? My problem is that I'm writing a python product and at some point, will do an 'restrictedTraverse(url)' ... So, how do I know, that the people who will use this product are not using whitespaces in ids ? :) I solved the problem by using try - except to catch the error, but this is not what I want ... Anyway, 10x for your reply dragos ----- Original Message ----- From: "Maik Jablonski" <maik.jablonski@uni-bielefeld.de> To: <zope@zope.org> Sent: Thursday, January 30, 2003 9:14 PM Subject: [Zope] Re: (un)restrictedTraverse bug
Dragos Chirila wrote:
In the root i have a folder called 'xx yy' In a dtml MEthod i have the following line : <dtml-var "restrictedTraverse('xx yy').id">
I get an error :
Traceback (innermost last): 492, in notFoundError NotFound: (see above) WHY IS THAT ???????????
You should not use any whitespace in Zope-Ids. Think of all Zope-Objects as Python-Objects which are mapped to Urls. Python doesn't like any whitespace in attributes etc... Urls shouldn't contain any whitespace in my opinion! That's really nasty windowish-style...
-maik
_______________________________________________ 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 )
Maik Jablonski wrote at 2003-1-30 20:14 +0100:
You should not use any whitespace in Zope-Ids. Think of all Zope-Objects as Python-Objects which are mapped to Urls. Python doesn't like any whitespace in attributes etc... Urls shouldn't contain any whitespace in my opinion! That's really nasty windowish-style... Moreover, the URL specification forbids whitespace in URLs because there are serious readability issues (whitespace at start/end, it is a tab or several blanks, is it one or two blanks...).
Dieter
participants (3)
-
Dieter Maurer -
Dragos Chirila -
Maik Jablonski