method got multiple values for keyword argument?!
Hi, in a method of my Python product I get a strange error message, stating TypeError: orderedSubPages() got multiple values for keyword argument 'viewmode' I can't understand this, since the line where the error is reported, reads for p in self.orderedSubPages(self, viewmode='admin', invisibles=1): ('viewmode' thus definitely occurring only once). The method definition is: def orderedSubPages(self, viewmode=None, invisibles=0): The complete Traceback: Module ZPublisher.Publish, line 98, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Products.AES.AESPage, line 581, in index_html Module OFS.DTMLMethod, line 126, in __call__ Module DocumentTemplate.DT_String, line 474, in __call__ Module Products.AES.AESPage, line 633, in displayComponents Module Products.AES.AESComponentContainer, line 589, in display Module OFS.DTMLMethod, line 126, in __call__ Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 705, in renderwob Module DocumentTemplate.DT_Util, line 201, in eval __traceback_info__: display Module <string>, line 2, in f Module Products.AES.AESComponentContainer, line 589, in display Module OFS.DTMLMethod, line 126, in __call__ Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_Let, line 76, in render Module DocumentTemplate.DT_Try, line 140, in render Module DocumentTemplate.DT_Try, line 174, in render_try_except Module Products.AES.AESSite, line 210, in admin_getAllSubPages Zope/Python: Zope 2.6.1 (binary release, python 2.1, win32-x86), python 2.1.3, win32 Any ideas? Zope bug? Thanks in advance, Tobias -- (please ignore the unfriendly and silly footer...) Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das un- erlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
THerp@apriori.de wrote:
I can't understand this, since the line where the error is reported, reads
for p in self.orderedSubPages(self, viewmode='admin', invisibles=1):
that 'self' shouldn't be there ;-) What you'are doing is the same as: self.orderedSubPages(viewmode=self, viewmode='admin', invisibles=1) cheers, Chris
participants (2)
-
Chris Withers -
THerp@apriori.de