Description
WikiSync has a problem with <lambda>() got an unexpected keyword argument 'formatted' --> -->
TypeError
<lambda>() got an unexpected keyword argument 'formatted'
If you want to report a bug, please save this page and attach it to your bug report.
Traceback
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
/home/workspace/moin-1.6.test/MoinMoin/request/__init__.py in run (self=<MoinMoin.request.request_standalone.Request object at 0x844abac>)
- 1281 self.page.send_page(msg=msg)
- 1282 else:
- 1283 handler(self.page.page_name, self)
- 1284
- 1285 # every action that didn't use to raise MoinMoinNoFooter must call this now:
- handler = <function execute at 0x86465dc>
- self = <MoinMoin.request.request_standalone.Request object at 0x844abac>
- self.page = <MoinMoin.Page.Page object at 0x82bf28c>
- self.page.page_name = u'SyncExample'
/home/workspace/moin-1.6.test/MoinMoin/action/SyncPages.py in execute (pagename=u'SyncExample', request=<MoinMoin.request.request_standalone.Request object at 0x844abac>)
- 496
- 497
- 498 def execute(pagename, request):
- 499 ActionClass(pagename, request).render()
- 500
- global ActionClass = <class 'MoinMoin.action.SyncPages.ActionClass'>
- pagename = u'SyncExample'
- request = <MoinMoin.request.request_standalone.Request object at 0x844abac>
- ).render undefined
/home/workspace/moin-1.6.test/MoinMoin/action/SyncPages.py in render (self=<MoinMoin.action.SyncPages.ActionClass object at 0x82bfa6c>)
- 206 try:
- 207 try:
- 208 self.sync(params, local, remote)
- 209 except Exception, e:
- 210 temp_file = StringIO.StringIO()
- self = <MoinMoin.action.SyncPages.ActionClass object at 0x82bfa6c>
- self.sync = <bound method ActionClass.sync of <MoinMoin.action.SyncPages.ActionClass object at 0x82bfa6c>>
- params = {'direction': 2, 'groupList': None, 'localPrefix': '', 'pageList': [u'TestSeite1'], 'pageMatch': <_sre.SRE_Pattern object at 0x8424aa0>, 'password': None, 'remotePrefix': '', 'remoteWiki': u'TestWiki', 'user': None}
- local = <MoinLocalWiki>
- remote = <MoinRemoteWiki wiki_url=u'http://localhost:8080' valid=True>
/home/workspace/moin-1.6.test/MoinMoin/action/SyncPages.py in sync (self=<MoinMoin.action.SyncPages.ActionClass object at 0x82bfa6c>, params={'direction': 2, 'groupList': None, 'localPrefix': '', 'pageList': [u'TestSeite1'], 'pageMatch': <_sre.SRE_Pattern object at 0x8424aa0>, 'password': None, 'remotePrefix': '', 'remoteWiki': u'TestWiki', 'user': None}, local=<MoinLocalWiki>, remote=<MoinRemoteWiki wiki_url=u'http://localhost:8080' valid=True>)
- 262 remote_full_iwid = packLine([remote.get_iwid(), remote.get_interwiki_name()])
- 263
- 264 self.log_status(self.INFO, _("Synchronisation started -", formatted=False), raw_suffix=" <<DateTime(%s)>>" % self.page._get_local_timestamp())
- 265
- 266 l_pages = local.get_pages()
- self = <MoinMoin.action.SyncPages.ActionClass object at 0x82bfa6c>
- self.log_status = <bound method ActionClass.log_status of <MoinMoin.action.SyncPages.ActionClass object at 0x82bfa6c>>
- self.INFO = (0, '')
- _ = <function <lambda> at 0x86897d4>
- formatted undefined
- builtin False = False
- raw_suffix undefined
- self.page = <MoinMoin.PageEditor.PageEditor object at 0x82bf9ec>
- self.page._get_local_timestamp = <bound method PageEditor._get_local_timestamp of...nMoin.PageEditor.PageEditor object at 0x82bf9ec>>
TypeError
<lambda>() got an unexpected keyword argument 'formatted'
- args = ("<lambda>() got an unexpected keyword argument 'formatted'",)
- message = "<lambda>() got an unexpected keyword argument 'formatted'"
System Details
- Date: Mon, 24 Dec 2007 06:12:48 +0000
- Platform: Linux nonanme 2.6.20-16-generic #2 SMP Sun Sep 23 19:50:39 UTC 2007 i686
- Python: Python 2.5.1 (/usr/bin/python)
- MoinMoin: Release 1.6.0rc2 (release)
Steps to reproduce
- do this...
Example
Component selection
- general
Details
MoinMoin Version |
1.6 rc2 |
OS and Version |
|
Python Version |
|
Server Setup |
|
Server Details |
|
Language you are using the wiki in (set in the browser/UserPreferences) |
|
Workaround
Discussion
--- a/MoinMoin/action/SyncPages.py Sun Dec 23 23:00:51 2007 +0100 +++ b/MoinMoin/action/SyncPages.py Mon Dec 24 11:07:03 2007 +0100 @@ -250,7 +250,7 @@ class ActionClass(object): | | on the remote side? ----------+----------+------------------------------- """ - _ = lambda x: x # we will translate it later + _ = self.request.getText direction = params["direction"] if direction == BOTH:
- This patch defeats the way this function works. _ must return untranslated unchanged strings and ignore all kwargs. It seems more sensible to remove all kwargs again.
Plan
- Priority:
- Assigned to:
- Status: fixed in 1.6 2475:27b3877c1f4c by removing all kwargs again.