id,summary,reporter,owner,description,type,status,priority,component,severity,resolution,keywords,cc,release 7078,Error when printing html,federico.belli@…,Álvaro Iradier,"Hi, i have this problem, when i print with html from administrative panel i got this error Oops… Trac detected an internal error: TypeError: html_to_printhtml() takes at least 3 non-keyword arguments (2 given) This is probably a local installation issue. Found a bug in Trac? If you think this should work and you can reproduce the problem, you should consider reporting this to the Trac team. Before you do that, though, please first try searching for similar issues, as it is quite likely that this problem has been reported before. For questions about installation and configuration of Trac, please try the mailing list instead of filing a ticket. Otherwise, please ==== How to Reproduce ==== While doing a POST operation on `/admin/wikiprint/makebook`, Trac issued an internal error. ''(please provide additional details here)'' Request parameters: {{{ {'__FORM_TOKEN': u'61d9a23ff1d8bd2e4e114c38', 'cat_id': u'wikiprint', 'create': u'Create', 'date': u'', 'format': u'printhtml', 'leftpages': u'BVS/Faq', 'panel_id': u'makebook', 'path_info': None, 'rightpages_all': u'', 'subject': u'', 'title': u'', 'version': u''} }}} User Agent was: `Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729)` ==== System Information ==== || '''Trac''' || `0.11.7` || || '''Python''' || `2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)]` || || '''setuptools''' || `0.6c11` || || '''SQLite''' || `3.5.9` || || '''pysqlite''' || `2.4.1` || || '''Genshi''' || `0.6dev-r1070` || || '''Pygments''' || `1.3.1` || || '''RPC''' || `1.0.6` || || '''jQuery:''' || `1.2.6` || ==== Python Traceback ==== {{{ Traceback (most recent call last): File ""c:\programmi\python26\lib\site-packages\trac-0.11.7-py2.6-win32.egg\trac\web\main.py"", line 450, in _dispatch_request dispatcher.dispatch(req) File ""c:\programmi\python26\lib\site-packages\trac-0.11.7-py2.6-win32.egg\trac\web\main.py"", line 206, in dispatch resp = chosen_handler.process_request(req) File ""c:\programmi\python26\lib\site-packages\trac-0.11.7-py2.6-win32.egg\trac\admin\web_ui.py"", line 114, in process_request path_info) File ""build\bdist.win32\egg\wikiprint\web_ui.py"", line 53, in render_admin_panel return self._render_book(req, cat, page, component) File ""build\bdist.win32\egg\wikiprint\web_ui.py"", line 88, in _render_book return formats[format]['provider'].process_wikiprint(req, format, title, subject, rightpages, version, date, pdfbookname) File ""build\bdist.win32\egg\wikiprint\formats.py"", line 43, in process_wikiprint out = wikiprint.html_to_printhtml(html_pages, title=title, subject=subject, version=version, date=date) TypeError: html_to_printhtml() takes at least 3 non-keyword arguments (2 given) }}} a new ticket at the Trac project site, where you can describe the problem and explain how to reproduce it. Python Traceback Most recent call last: * File ""c:\programmi\python26\lib\site-packages\trac-0.11.7-py2.6-win32.egg\trac\web\main.py"", line 450, in _dispatch_request Code fragment: 445. try: 446. if not env and env_error: 447. raise HTTPInternalError(env_error) 448. try: 449. dispatcher = RequestDispatcher(env) 450. dispatcher.dispatch(req) 451. except RequestDone: 452. pass 453. resp = req._response or [] 454. 455. except HTTPException, e: Local variables: Name Value after [u' except RequestDone:', u' pass', u' resp = ... before [u' try:', u' if not env and env_error:', u' raise ... dispatcher e TypeError('html_to_printhtml() takes at least 3 non-keyword arguments (2 ... env env_error None exc_info (, TypeError('html_to_printhtml() takes at ... filename 'c:\\programmi\\python26\\lib\\site-packages\\trac-0.11.7-py2.6-win32.egg\\ ... frames [{'function': '_dispatch_request', 'lines_before': [u' try:', u' ... has_admin True line u' dispatcher.dispatch(req)' lineno 449 message u'TypeError: html_to_printhtml() takes at least 3 non-keyword arguments (2 ... req resp [] tb tb_hide None traceback u'Traceback (most recent call last):\n File ... * File ""c:\programmi\python26\lib\site-packages\trac-0.11.7-py2.6-win32.egg\trac\web\main.py"", line 206, in dispatch Code fragment: 201. req.args.get('__FORM_TOKEN') != req.form_token: 202. raise HTTPBadRequest('Missing or invalid form token. ' 203. 'Do you have cookies enabled?') 204. 205. # Process the request and render the template 206. resp = chosen_handler.process_request(req) 207. if resp: 208. if len(resp) == 2: # Clearsilver 209. chrome.populate_hdf(req) 210. template, content_type = \ 211. self._post_process_request(req, *resp) Local variables: Name Value chosen_handler chrome ctype 'application/x-www-form-urlencoded' err (, TypeError('html_to_printhtml() takes at ... handler options {} req self * File ""c:\programmi\python26\lib\site-packages\trac-0.11.7-py2.6-win32.egg\trac\admin\web_ui.py"", line 114, in process_request Code fragment: 109. if not provider: 110. raise HTTPNotFound(_('Unknown administration panel')) 111. 112. if hasattr(provider, 'render_admin_panel'): 113. template, data = provider.render_admin_panel(req, cat_id, panel_id, 114. path_info) 115. 116. else: # support for legacy WebAdmin panels 117. data = {} 118. cstmpl, ct = provider.process_admin_request(req, cat_id, panel_id, 119. path_info) Local variables: Name Value _panel_order cat_id u'wikiprint' panel_id u'makebook' panels [('general', 'General', 'basics', 'Basic Settings'), ('general', ... path_info None provider providers {('general', 'basics'): self * File ""build\bdist.win32\egg\wikiprint\web_ui.py"", line 53, in render_admin_panel Local variables: Name Value cat u'wikiprint' component None page u'makebook' req self * File ""build\bdist.win32\egg\wikiprint\web_ui.py"", line 88, in _render_book Local variables: Name Value allpages [u'WikiNewPage', u'TracModWSGI', u'TracInstall', u'TracCgi', ... cat u'wikiprint' component None data {} date u'' format u'printhtml' formats {'pdfbook': {'name': 'PDF Book', 'provider': ... name 'HTML' page u'makebook' pdfbookname u'BVS' provider req rightpages [u''] self subject u'' title u'BVS' version u'' x '' * File ""build\bdist.win32\egg\wikiprint\formats.py"", line 43, in process_wikiprint Local variables: Name Value date u'' format u'printhtml' html_pages [] p u'' pages [u''] pdfname u'BVS' req self subject u'' title u'BVS' version u'' wikiprint File ""c:\programmi\python26\lib\site-packages\trac-0.11.7-py2.6-win32.egg\trac\web\main.py"", line 450, in _dispatch_request dispatcher.dispatch(req) File ""c:\programmi\python26\lib\site-packages\trac-0.11.7-py2.6-win32.egg\trac\web\main.py"", line 206, in dispatch resp = chosen_handler.process_request(req) File ""c:\programmi\python26\lib\site-packages\trac-0.11.7-py2.6-win32.egg\trac\admin\web_ui.py"", line 114, in process_request path_info) File ""build\bdist.win32\egg\wikiprint\web_ui.py"", line 53, in render_admin_panelFile ""build\bdist.win32\egg\wikiprint\web_ui.py"", line 88, in _render_bookFile ""build\bdist.win32\egg\wikiprint\formats.py"", line 43, in process_wikiprint System Information: User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729) Trac: 0.11.7 Python: 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)] setuptools: 0.6c11 SQLite: 3.5.9 pysqlite: 2.4.1 Genshi: 0.6dev-r1070 Pygments: 1.3.1 RPC: 1.0.6 jQuery: 1.2.6",defect,closed,normal,TracWikiPrintPlugin,normal,fixed,,,0.11