Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

#8757 closed defect (fixed)

ValueError: need more than 1 value to unpack

Reported by: anonymous Owned by: Remy Blank
Priority: normal Milestone: 0.11.6
Component: wiki system Version: 0.11.4
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

System Information

Trac 0.11.4
Python 2.5.3 (r25:51908, Apr 22 2009, 18:51:08)
[GCC 4.1.1 20061011 (Red Hat 4.1.1-30)]
setuptools 0.6c9
SQLite 3.3.6
pysqlite 2.5.5
Genshi 0.5.1
mod_python 3.3.1
jQuery: 1.2.6

Python Traceback

Traceback (most recent call last):
  File "/usr/local/lib/python2.5/site-packages/Trac-0.11.4-py2.5.egg/trac/ticket/templates/ticket.html", line 188, in <Expression u'wiki_to_html(context,ticket.description,escape_newlines=preserve_newlines)')>
  File "/usr/local/lib/python2.5/site-packages/Trac-0.11.4-py2.5.egg/trac/wiki/formatter.py", line 1114, in format_to_html
  File "/usr/local/lib/python2.5/site-packages/Trac-0.11.4-py2.5.egg/trac/wiki/formatter.py", line 1069, in generate
  File "/usr/local/lib/python2.5/site-packages/Trac-0.11.4-py2.5.egg/trac/wiki/formatter.py", line 874, in format
  File "/usr/local/lib/python2.5/re.py", line 142, in sub
  File "/usr/local/lib/python2.5/site-packages/Trac-0.11.4-py2.5.egg/trac/wiki/formatter.py", line 821, in replace
  File "/usr/local/lib/python2.5/site-packages/Trac-0.11.4-py2.5.egg/trac/wiki/formatter.py", line 814, in handle_match
  File "/usr/local/lib/python2.5/site-packages/Trac-0.11.4-py2.5.egg/trac/wiki/api.py", line 284, in wikipagename_with_label_link

ValueError: need more than 1 value to unpack

Attachments (0)

Change History (4)

comment:1 by Remy Blank, 15 years ago

Component: generalwiki system
Milestone: 0.11.6
Owner: set to Remy Blank
Version: none0.11.4

I don't see how this could happen, as the regexp ensures there's always at least one… ah… whitespace character. So if there's a tab, the regexp will match but the split will return only one item.

Could you please post a wiki snippet that triggers the issue?

comment:2 by anonymous, 15 years ago

thanks for replying.
Code fragment of file "ticket.html" line 188

<div py:if="ticket.description" class="searchable" xml:space="preserve">
 ${wiki_to_html(context, ticket.description, escape_newlines=preserve_newlines)}
</div>

Code fragment of file "formatter.py" line 1114

return HtmlFormatter(env, context, wikidom).generate(escape_newlines)

Code fragment of file "formatter.py" line 1069

Formater(self.env, self.context).format(self.wikidom, out, escape_newlines)

Code fragment of file "formatter.py" line 874

Throw a bunch of regexps on the problem
result = re.sub(self.wikiparser.rules, self.replace, line)

Code fragment of file "re.py" line 142 in sub

return _compile(pattern,0).sub(repl, string, count)

Code fragment of file "formatter.py" line 821 in replace

replacement = self.handle_match(fullmatch)

Code fragment of file "formatter.py" line 814 in handle_match

return external_handler(self, match, fullmatch)

Code fragment of file "api.py" line 284 in wikipagename_with_label_link

def wikipagename_with_label_link(formatter, match, fullmatch):
     page, label = match[1:-1].split(' ', 1)

best regards.
foamfish.

comment:3 by Remy Blank, 15 years ago

Ah, I may not have been clear, sorry. What I meant is: what is the content (in WikiFormatting syntax) of the ticket description that triggers the issue?

comment:4 by Remy Blank, 15 years ago

Resolution: fixed
Status: newclosed

Fixed in [8683]. Thanks for the bug report.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Remy Blank.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Remy Blank to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.