[Zope] Error Value: 'File' object has no attribute 'manage_fixupOwnershipAfterAdd'

Roman Klesel roman_plonemail at lotuseyes.de
Thu Feb 16 08:19:09 EST 2006


Stefan H. Holek schrieb:
> Please learn to read and to provide the *complete* traceback. The  error
> text alone is not enough most of the time.

Ok, shure, I can do that, I just thought I'll clean out the parts that are not neccesary...

> 
> Your error *may* mean that 'system' is not yet wrapped. Are your 
> positive that 'system' is a folder that already exists in the ZODB, 
> i.e. has already been _setObject'ed?

As far as I can tell: Yes!

First I have a loop that creates and _setObject the folders, then the next loop is supposed
to loop over the folders and create files in them.

The code looks like this:

for id in self.manage_targets.keys():									
	title = self.manage_targets[id]['name']								
	self.tgt_folder=Folder()											
	self._setObject(id,self.tgt_folder)									
		
grinder_home = self.manage_targets['gr_sys']['grinder_home']			
host_name = self.getHostname(grinder_home)								

self.lt_time=self.getLttime('%s/script/log/out_%s-0.log' % (grinder_home,host_name))
self.title = self.lt_time[0].split(' ')[0]								
self.order = ''.join(self.title.split('/'))								
self.version = "unknown"												

f_time=self.lt_time[0].split(' ')[1]									
l_time=self.lt_time[1].split(' ')[1]									
for id in self.objectIds('Folder'):										
	location_sar = self.manage_targets[id]['location_sar']				
	phy_mem = self.manage_targets[id]['phy_mem']						
	system = self.__getitem__(id)										

	cpu_load = self.getCpuLoad(id,location_sar,f_time,l_time)			
	fid='cpu_load'														
	try:																
		system.manage_addProduct['OFSP'].manage_addFile(fid,			
						title='',
						file=cpu_load[0],
						content_type='text/plain',						
						precondition='')								
	except:																
		raise KeyError, 'id: %s object: %s self: %s' % (id, system, self)



And the error:
2006-02-16 14:11:16 ERROR Zope.SiteErrorLog http://last1.wz.qsu.nb:8080/asdf/test3/cnt/newLasttest
Traceback (most recent call last):
  File "/opt/zope-2.9/lib/python/ZPublisher/Publish.py", line 113, in publish
    request, bind=1)
  File "/opt/zope-2.9/lib/python/ZPublisher/mapply.py", line 88, in mapply
    if debug is not None: return debug(object,args,context)
  File "/opt/zope-2.9/lib/python/ZPublisher/Publish.py", line 40, in call_object
    result=apply(object,args) # Type s<cr> to step into published object.
  File "/usr/local/share/zope/zlast/Products/ZLTMS/Controller.py", line 43, in newLasttest
    lt.importData()
  File "/usr/local/share/zope/zlast/Products/ZLTMS/LTimport.py", line 63, in importData
    raise KeyError, 'id: %s object: %s self: %s' % (id, system, self)
KeyError: 'id: gr_sys object: <Folder at > self: <Lasttest at lasttest7816>'


Greetings Roman



More information about the Zope mailing list