Edgewall Software
Modify

Ticket #9519 (closed defect: worksforme)

Opened 19 months ago

Last modified 4 months ago

TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Reported by: wooya510 Owned by: rblank
Priority: normal Milestone:
Component: wiki system Version: 0.11.7
Severity: normal Keywords: intertrac needinfo
Cc: lists@…, dvogels@…
Release Notes:
API Changes:

Description (last modified by cboos) (diff)

How to Reproduce

While doing a GET operation on /wiki/2010_7_23, Trac issued an internal error.

(please provide additional details here)

Request parameters:

{'format': u'pdf', 'page': u'2010_7_23'}

User Agent was: Mozilla/5.0 (Windows; U; Windows NT 6.1; ko; rv:1.9.2.7) Gecko/20100713 Firefox/3.6.7

System Information

Trac 0.11.7
Python 2.6.5 (r265:79063, Apr 16 2010, 13:28:26)
[GCC 4.4.3]
setuptools 0.6
SQLite 3.6.22
pysqlite 2.4.1
Genshi 0.5.1
mod_python 3.3.1
Pygments 1.2.2
CustomFieldAdmin? 0.2.3
Subversion 1.6.6 (r40053)
jQuery: 1.3.2

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/trac/web/main.py", line 450, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.6/dist-packages/trac/web/main.py", line 206, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.6/dist-packages/trac/wiki/web_ui.py", line 165, in process_request
    format, versioned_page.name)
  File "/usr/lib/python2.6/dist-packages/trac/mimeview/api.py", line 961, in send_converted
    content, selector)
  File "/usr/lib/python2.6/dist-packages/trac/mimeview/api.py", line 669, in convert_content
    output = converter.convert_content(req, mimetype, content, ck)
  File "/usr/local/lib/python2.6/dist-packages/TracPageToPDF-0.2-py2.6.egg/pagetopdf/pagetopdf.py", line 22, in convert_content
    page = wiki_to_html(source, self.env, req).encode(codepage, 'replace')
  File "/usr/lib/python2.6/dist-packages/trac/wiki/formatter.py", line 1142, in wiki_to_html
    Formatter(env, context).format(wikitext, out, escape_newlines)
  File "/usr/lib/python2.6/dist-packages/trac/wiki/formatter.py", line 878, in format
    result = re.sub(self.wikiparser.rules, self.replace, line)
  File "/usr/lib/python2.6/re.py", line 151, in sub
    return _compile(pattern, 0).sub(repl, string, count)
  File "/usr/lib/python2.6/dist-packages/trac/wiki/formatter.py", line 825, in replace
    replacement = self.handle_match(fullmatch)
  File "/usr/lib/python2.6/dist-packages/trac/wiki/formatter.py", line 821, in handle_match
    return internal_handler(match, fullmatch)
  File "/usr/lib/python2.6/dist-packages/trac/wiki/formatter.py", line 381, in _lhref_formatter
    label or rel, fullmatch)
  File "/usr/lib/python2.6/dist-packages/trac/wiki/formatter.py", line 412, in _make_link
    return self._make_intertrac_link(ns, target, label) or \
  File "/usr/lib/python2.6/dist-packages/trac/wiki/formatter.py", line 418, in _make_intertrac_link
    url = intertrac.get(ns+'.url')
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'


Attachments

Change History

comment:1 Changed 19 months ago by cboos

Any chance to see the wiki text for the page 2010_7_23? And your [intertrac] configuration?

comment:2 Changed 17 months ago by cboos

  • Component changed from general to wiki system
  • Keywords intertrac needinfo added

comment:3 Changed 15 months ago by Thijs Triemstra <lists@…>

  • Cc lists@… added

comment:4 Changed 12 months ago by cboos

  • Description modified (diff)
  • Resolution set to worksforme
  • Status changed from new to closed

No feedback, closing.

comment:5 Changed 12 months ago by Dallas Vogels <dvogels@…>

  • Cc dvogels@… added
  • Resolution worksforme deleted
  • Status changed from closed to reopened

I am having this same issue when accessing the timeline.

Traceback:

File "/usr/lib/python2.6/dist-packages/trac/timeline/templates/timeline.html", line 47, in <Expression u"event.render('description', context)">
  ${event.render('description', context)}
File "/usr/lib/python2.6/dist-packages/trac/timeline/web_ui.py", line 302, in <lambda>
  provider.render_timeline_event(context, field, event)
File "/usr/lib/python2.6/dist-packages/trac/versioncontrol/web_ui/changeset.py", line 887, in render_timeline_event
  markup += format_to(self.env, None, context, message)
File "/usr/lib/python2.6/dist-packages/trac/wiki/formatter.py", line 1109, in format_to
  return format_to_oneliner(env, context, wikidom, **options)
File "/usr/lib/python2.6/dist-packages/trac/wiki/formatter.py", line 1125, in format_to_oneliner
  return InlineHtmlFormatter(env, context, wikidom).generate(shorten)
File "/usr/lib/python2.6/dist-packages/trac/wiki/formatter.py", line 1101, in generate
  shorten)
File "/usr/lib/python2.6/dist-packages/trac/wiki/formatter.py", line 972, in format
  result = re.sub(self.wikiparser.rules, self.replace, result)
File "/usr/lib/python2.6/re.py", line 151, in sub
  return _compile(pattern, 0).sub(repl, string, count)
File "/usr/lib/python2.6/dist-packages/trac/wiki/formatter.py", line 825, in replace
  replacement = self.handle_match(fullmatch)
File "/usr/lib/python2.6/dist-packages/trac/wiki/formatter.py", line 821, in handle_match
  return internal_handler(match, fullmatch)
File "/usr/lib/python2.6/dist-packages/trac/wiki/formatter.py", line 381, in _lhref_formatter
  label or rel, fullmatch)
File "/usr/lib/python2.6/dist-packages/trac/wiki/formatter.py", line 412, in _make_link
  return self._make_intertrac_link(ns, target, label) or \
File "/usr/lib/python2.6/dist-packages/trac/wiki/formatter.py", line 418, in _make_intertrac_link
  url = intertrac.get(ns+'.url')

System Info:

Trac:0.11.7
Python:2.6.5 (r265:79063, Apr 16 2010, 13:28:26) [GCC 4.4.3]
setuptools:0.6
SQLite:3.6.22
pysqlite:2.5.5
Genshi:0.5.1
mod_python:3.3.1
Pygments:1.2.2
Subversion:1.6.6 (r40053)
RPC:1.1.0-r7971
CustomFieldAdmin:0.2.2

Note that I do not have a [intertrac] configuration in my trac.ini.

comment:6 follow-up: Changed 12 months ago by rblank

Same as comment:1, any chance of getting the content of the page that generated the error?

comment:7 in reply to: ↑ 6 ; follow-up: Changed 12 months ago by Dallas Vogels <dvogels@…>

Replying to rblank:

Same as comment:1, any chance of getting the content of the page that generated the error?

I have no idea as to what the contents are as it is the timeline.

Is there another way to grab the contents of the timeline?

comment:8 in reply to: ↑ 7 Changed 12 months ago by cboos

Replying to Dallas Vogels <dvogels@…>:

Is there another way to grab the contents of the timeline?

As TRAC_ADMIN, append ?hdfdump=1 to the timeline URL.

comment:9 Changed 11 months ago by Dallas Vogels <dvogels@…>

I have traced the issue down to a subversion commit with the title "domain.com backed up database" (without quotes).

comment:10 Changed 11 months ago by Dallas Vogels <dvogels@…>

correction to previous comment: the commit message is:

[./backupDatabase.sh: domain.com] backed up database

The issue only happens when viewing changesets.

comment:11 Changed 11 months ago by rblank

  • Milestone set to 0.12.3
  • Owner set to rblank
  • Status changed from reopened to new

That should be enough to reproduce the issue, thanks. I'll take a look.

comment:12 Changed 11 months ago by rblank

  • Milestone 0.12.3 deleted
  • Resolution set to worksforme
  • Status changed from new to closed

I can reproduce this on 0.11-stable, but not on 0.12-stable, so this must have been fixed sometime along the way. I wasn't able to find the exact changeset, though.

comment:13 follow-up: Changed 4 months ago by anonymous

  • Resolution worksforme deleted
  • Status changed from closed to reopened
Trac detected an internal error:
TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType'

I have this issue with trac 0.12.2

Trac says:

The action that triggered the error was:

GET: /changeset/47bf5a433c73103f7c86c1d412742980c4fb2893

comment:14 in reply to: ↑ 13 Changed 4 months ago by cboos

  • Resolution set to worksforme
  • Status changed from reopened to closed

Replying to anonymous:

Trac detected an internal error:
TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType'

I have this issue with trac 0.12.2

Trac says:

The action that triggered the error was:

GET: /changeset/47bf5a433c73103f7c86c1d412742980c4fb2893

Sorry, but this is completely unrelated to this ticket... look in your Trac log for the full backtrace and then create a new ticket with that information (or better, reproduce the error as TRAC_ADMIN and then use the semi-automated bug report facility i.e. the form you'll see in the error page).

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from rblank. Next status will be 'closed'
Author


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

 
Note: See TracTickets for help on using tickets.