Re: [Zope-dev] Recursive Folder creation error

2000-10-17 Thread Chris Withers

Jason Spisak wrote:
> 
> Zopists,
> 
> I tried the example given by Kapil Thangavelu.
> 
> from OFS import Folder

try replacing the above with:

from OFS.FOlder import Folder

cheers,

Chris

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




[Zope-dev] Recursive Folder creation error

2000-10-17 Thread Jason Spisak

Zopists,

I tried the example given by Kapil Thangavelu.

from OFS import Folder
def create_folders(self, number):
''' create a set of recursive folders with depth equal to number'''
parent = self
for index in xrange(number):
folder = Folder()
folder.id = str(number)
parent._setObject(folder, str(number))
parent = folder

But I get this error:

Error Type: TypeError
Error Value: call of non-function (type module)



 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 HTML source for this page. 

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




Traceback (innermost last):
  File /home/jason/Zope-2.2.0/lib/python/ZPublisher/Publish.py, line
222, in publish_module
  File /home/jason/Zope-2.2.0/lib/python/ZPublisher/Publish.py, line
187, in publish
  File /home/jason/Zope-2.2.0/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
(Object: ElementWithAttributes)
  File /home/jason/Zope-2.2.0/lib/python/ZPublisher/Publish.py, line
171, in publish
  File /home/jason/Zope-2.2.0/lib/python/ZPublisher/mapply.py, line 160,
in mapply
(Object: create)
  File /home/jason/Zope-2.2.0/lib/python/ZPublisher/Publish.py, line
112, in call_object
(Object: create)
  File
/home/jason/Zope-2.2.0/lib/python/Products/ExternalMethod/ExternalMethod.py,
line 263, in __call__
(Object: create)
(Info: ((, 10), {}, (10,)))
  File /home/jason/Zope-2.2.0/Extensions/Creator.py, line 7, in
create_folders
(Object: ElementWithAttributes)
TypeError: (see above)


Line 7 contains folder = Folder()
Does anyone know what is askew here?

All my best,

Jason Spisak
[EMAIL PROTECTED]

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