Edgewall Software

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#6329 closed defect (fixed)

InterTrac request for page named with national character fail — at Version 3

Reported by: tonal@… Owned by: Christian Boos
Priority: high Milestone: 0.11
Component: general Version: devel
Severity: minor Keywords:
Cc: Branch:
Release Notes:
API Changes:

Description (last modified by Christian Boos)

InterTrac request for page named with national character fail. Error report:

Oops… Trac detected an internal error:

TypeError: extract_link() takes exactly 3 arguments (2 given)

If you think this should work 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 GET operation on /intertrac/wiki:ЮрДок, Trac issued an internal error. (please provide additional details here) Request parameters: {'link': u'wiki:\u042e\u0440\u0414\u043e\u043a'}

System Information

Trac 0.11dev-r6139
Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)]
setuptools 0.6c7
SQLite 3.4.2
pysqlite 2.3.4
Genshi 0.5dev-r766
Subversion 1.4.4 (r25188)

Python Traceback

Traceback (most recent call last): 
File "/usr/lib/python2.5/site-packages/Trac-0.11dev_r6139-py2.5.egg/trac/web/main.py", line 386, in dispatch_request dispatcher.dispatch(req) 
File "/usr/lib/python2.5/site-packages/Trac-0.11dev_r6139-py2.5.egg/trac/web/main.py", line 195, in dispatch resp = chosen_handler.process_request(req) 
File "/usr/lib/python2.5/site-packages/Trac-0.11dev_r6139-py2.5.egg/trac/wiki/intertrac.py", line 45, in process_request link_elt = extract_link(Context(self.env, req), link) 
TypeError: extract_link() takes exactly 3 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 "/usr/lib/python2.5/site-packages/Trac-0.11dev_r6139-py2.5.egg/trac/web/main.py", line 386, in dispatch_request
      Code fragment:
       381. try:
       382. if not env and env_error:
       383. raise HTTPInternalError(env_error)
       384. try:
       385. dispatcher = RequestDispatcher(env)
       386. dispatcher.dispatch(req)
       387. except RequestDone:
       388. pass
       389. resp = req._response or []
       390.  
       391. except HTTPException, e:
      Local variables:
      Name	Value
      after 	[' except RequestDone:', ' pass', ' resp = ...
      before 	[' try:', ' if not env and env_error:', ' raise ...
      dispatcher 	<trac.web.main.RequestDispatcher object at 0x8cbbcac>
      e 	TypeError('extract_link() takes exactly 3 arguments (2 given)',)
      env 	<trac.env.Environment object at 0x8c8584c>
      env_error 	None
      env_name 	'mun-obr'
      env_parent_dir 	'/home/dk/trac'
      env_path 	'/home/dk/trac/mun-obr'
      env_paths 	None
      environ 	{'HTTP_AUTHORIZATION': 'Digest username="tonal", realm="promsoft.ru", ...
      exc_info 	(<type 'exceptions.TypeError'>, TypeError('extract_link() takes exactly 3 ...
      filename 	'/usr/lib/python2.5/site-packages/Trac-0.11dev_r6139-py2.5.egg/trac/web/mai ...
      frames 	[{'function': 'dispatch_request', 'lines_before': [' try:', ' if ...
      has_admin 	True
      line 	' dispatcher.dispatch(req)'
      lineno 	385
      message 	u'TypeError: extract_link() takes exactly 3 arguments (2 given)'
      path_info 	['intertrac', 'wiki:\xd0\xae\xd1\x80\xd0\x94\xd0\xbe\xd0\xba']
      req 	<Request "GET u'/intertrac/wiki:\u042e\u0440\u0414\u043e\u043a'">
      resp 	[]
      run_once 	False
      script_url 	None
      start_response 	<bound method WSGIServerGateway._start_response of ...
      tb 	<traceback object at 0x8d5ab1c>
      tb_hide 	None
      traceback 	'Traceback (most recent call last):\n File ...
    * File "/usr/lib/python2.5/site-packages/Trac-0.11dev_r6139-py2.5.egg/trac/web/main.py", line 195, in dispatch
      Code fragment:
       190. req.args.get('__FORM_TOKEN') != req.form_token:
       191. raise HTTPBadRequest('Missing or invalid form token. '
       192. 'Do you have cookies enabled?')
       193.  
       194. # Process the request and render the template
       195. resp = chosen_handler.process_request(req)
       196. if resp:
       197. if len(resp) == 2: # Clearsilver
       198. chrome.populate_hdf(req)
       199. template, content_type = \
       200. self._post_process_request(req, *resp)
      Local variables:
      Name	Value
      chosen_handler 	<trac.wiki.intertrac.InterTracDispatcher object at 0x8cb320c>
      chrome 	<trac.web.chrome.Chrome object at 0x8cbb18c>
      err 	(<type 'exceptions.TypeError'>, TypeError('extract_link() takes exactly 3 ...
      handler 	<trac.wiki.intertrac.InterTracDispatcher object at 0x8cb320c>
      req 	<Request "GET u'/intertrac/wiki:\u042e\u0440\u0414\u043e\u043a'">
      self 	<trac.web.main.RequestDispatcher object at 0x8cbbcac>
    * File "/usr/lib/python2.5/site-packages/Trac-0.11dev_r6139-py2.5.egg/trac/wiki/intertrac.py", line 45, in process_request
      Code fragment:
        40. req.args['link'] = match.group(1)
        41. return True
        42.  
        43. def process_request(self, req):
        44. link = req.args.get('link', '')
        45. link_elt = extract_link(Context(self.env, req), link)
        46. if isinstance(link_elt, Element):
        47. href = link_elt.attrib.get('href')
        48. else:
        49. href = req.href(link)
        50. req.redirect(href)
      Local variables:
      Name	Value
      link 	u'wiki:\u042e\u0440\u0414\u043e\u043a'
      req 	<Request "GET u'/intertrac/wiki:\u042e\u0440\u0414\u043e\u043a'">
      self 	<trac.wiki.intertrac.InterTracDispatcher object at 0x8cb320c>

File "/usr/lib/python2.5/site-packages/Trac-0.11dev_r6139-py2.5.egg/trac/web/main.py", line 386, in dispatch_request
  dispatcher.dispatch(req)
File "/usr/lib/python2.5/site-packages/Trac-0.11dev_r6139-py2.5.egg/trac/web/main.py", line 195, in dispatch
  resp = chosen_handler.process_request(req)
File "/usr/lib/python2.5/site-packages/Trac-0.11dev_r6139-py2.5.egg/trac/wiki/intertrac.py", line 45, in process_request
  link_elt = extract_link(Context(self.env, req), link)

System Information:

User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9
Trac: 	0.11dev-r6139
Python: 	2.5.1 (r251:54863, Oct 5 2007, 13:36:32) [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)]
setuptools: 	0.6c7
SQLite: 	3.4.2
pysqlite: 	2.3.4
Genshi: 	0.5dev-r766
Subversion: 	1.4.4 (r25188)
jQuery:	1.1.3.1

Change History (3)

comment:1 by Emmanuel Blot, 12 years ago

Description: modified (diff)
Version: devel

Fixing the traceback (semi-automatic trace report did not help…)

comment:2 by Christian Boos, 12 years ago

Milestone: 0.11
Owner: changed from Jonas Borgström to Christian Boos
Priority: normalhigh
Severity: normaltrivial

Hm, that was an old style extract_link call.

I'll also check the semi-automatic bug reporting feature.

comment:3 by Christian Boos, 12 years ago

Description: modified (diff)
Resolution: fixed
Status: newclosed
Summary: IterTrac request for page named with national character failInterTrac request for page named with national character fail

Fixed in [6143].

Note: See TracTickets for help on using tickets.