Modify

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#7078 closed defect (fixed)

Error when printing html

Reported by: federico.belli@… Owned by: airadier
Priority: normal Component: TracWikiPrintPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

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:
    1. try:
    2. if not env and env_error:
    3. raise HTTPInternalError(env_error)
    4. try:
    5. dispatcher = RequestDispatcher(env)
    6. dispatcher.dispatch(req)
    7. except RequestDone:
    8. pass
    9. resp = req._response or []
    10. 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 <trac.web.main.RequestDispatcher object at 0x018C4B90> e TypeError('html_to_printhtml() takes at least 3 non-keyword arguments (2 ... env <trac.env.Environment object at 0x0108AAB0> env_error None exc_info (<type 'exceptions.TypeError'>, 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 <Request "POST u'/admin/wikiprint/makebook'"> resp [] tb <traceback object at 0x0198EF58> 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:
    1. req.args.get('FORM_TOKEN') != req.form_token:
    2. raise HTTPBadRequest('Missing or invalid form token. '
    3. 'Do you have cookies enabled?')
    4. # Process the request and render the template
    5. resp = chosen_handler.process_request(req)
    6. if resp:
    7. if len(resp) == 2: # Clearsilver
    8. chrome.populate_hdf(req)
    9. template, content_type = \
    10. self._post_process_request(req, *resp)
    Local variables: Name Value chosen_handler <trac.admin.web_ui.AdminModule object at 0x018C4E50> chrome <trac.web.chrome.Chrome object at 0x01402150> ctype 'application/x-www-form-urlencoded' err (<type 'exceptions.TypeError'>, TypeError('html_to_printhtml() takes at ... handler <trac.admin.web_ui.AdminModule object at 0x018C4E50> options {} req <Request "POST u'/admin/wikiprint/makebook'"> self <trac.web.main.RequestDispatcher object at 0x018C4B90>
  • 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:
    1. if not provider:
    2. raise HTTPNotFound(_('Unknown administration panel'))
    3. if hasattr(provider, 'render_admin_panel'):
    4. template, data = provider.render_admin_panel(req, cat_id, panel_id,
    5. path_info)
    6. else: # support for legacy WebAdmin panels
    7. data = {}
    8. cstmpl, ct = provider.process_admin_request(req, cat_id, panel_id,
    9. path_info)
    Local variables: Name Value _panel_order <function _panel_order at 0x018E2F70> cat_id u'wikiprint' panel_id u'makebook' panels [('general', 'General', 'basics', 'Basic Settings'), ('general', ... path_info None provider <wikiprint.web_ui.WikiPrintAdmin object at 0x018C9210> providers {('general', 'basics'): <trac.admin.web_ui.BasicsAdminPanel object at ... req <Request "POST u'/admin/wikiprint/makebook'"> self <trac.admin.web_ui.AdminModule object at 0x018C4E50>
  • 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 <Request "POST u'/admin/wikiprint/makebook'"> self <wikiprint.web_ui.WikiPrintAdmin object at 0x018C9210>
  • 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 <wikiprint.formats.WikiPrintOutput object at 0x0191B530> req <Request "POST u'/admin/wikiprint/makebook'"> rightpages [u] self <wikiprint.web_ui.WikiPrintAdmin object at 0x018C9210> 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 [<Markup u>] p u pages [u] pdfname u'BVS' req <Request "POST u'/admin/wikiprint/makebook'"> self <wikiprint.formats.WikiPrintOutput object at 0x0191B530> subject u title u'BVS' version u wikiprint <wikiprint.wikiprint.WikiPrint object at 0x018C9250>

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

Attachments (0)

Change History (3)

comment:1 Changed 4 years ago by airadier

  • Resolution set to fixed
  • Status changed from new to closed

(In [7932]) Fixes #7078

comment:2 Changed 4 years ago by airadier

Should be fixed now.

comment:3 Changed 4 years ago by federico.belli@…

Thank you

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.