Opened 5 years ago

Closed 3 years ago

Last modified 3 years ago

#10032 closed defect (fixed)

TypeError: coercing to Unicode: need string or buffer, Element found

Reported by: cpatzer Owned by: Steffen Hoffmann
Priority: normal Component: TagsPlugin
Severity: normal Keywords: error formatting
Cc: Steffen Hoffmann Trac Release: 0.11


How to Reproduce

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

(please provide additional details here)

Request parameters:

{'action': u'edit', 'page': u'WikiStart'}

User agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20100101 Firefox/11.0

System Information

Trac 0.12.2
Babel 0.9.6 (translations unavailable)
CustomFieldAdmin 0.2.2
Docutils 0.7
Genshi 0.6
mod_wsgi 3.3 (WSGIProcessGroup WSGIApplicationGroup %{GLOBAL})
Pygments 1.4
pysqlite 2.6.0
Python 2.7.2+ (default, Oct 4 2011, 20:29:37)
[GCC 4.6.1]
pytz 2010b
setuptools 0.6c11
SQLite 3.7.7
Subversion 1.6.12 (r955767)
jQuery 1.4.2

Enabled Plugins

TracAccountManager 0.2.1dev
TracCustomFieldAdmin 0.2.2
TracTags 0.7dev
TracWysiwyg 0.2

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/trac/web/", line 511, in _dispatch_request
  File "/usr/lib/python2.7/dist-packages/trac/web/", line 258, in dispatch
  File "/usr/lib/python2.7/dist-packages/trac/web/", line 840, in render_template
    stream |= self._filter_stream(req, method, filename, stream, data)
  File "/usr/lib/python2.7/dist-packages/genshi/", line 132, in __or__
    return Stream(_ensure(function(self)), serializer=self.serializer)
  File "/usr/lib/python2.7/dist-packages/trac/web/", line 991, in inner
  File "/usr/lib/pymodules/python2.7/tractags/", line 57, in filter_stream
    return self._wiki_edit(req, stream)
  File "/usr/lib/pymodules/python2.7/tractags/", line 141, in _wiki_edit
    tag_("Tag under") + ": (" + tags_link + ")",
TypeError: coercing to Unicode: need string or buffer, Element found

Attachments (0)

Change History (10)

comment:1 Changed 5 years ago by Ryan J Ollos

Cc: Steffen Hoffmann added; anonymous removed
Component: SELECT A HACKTagsPlugin
Resolution: duplicate
Status: newclosed

I believe this was fixed in [10481] (#8995). Please update the TagsPlugin on your installation.

comment:2 Changed 5 years ago by anonymous

Resolution: duplicate
Status: closedreopened

Yes, disabling the trac tags plugin did work. However, I don't have the same code on that line number. Doesn't really resemble much...

insert = tag.ul(class_='tags')("Tags"), class_='header'), li)

This is the same in both:




Last edited 3 years ago by Ryan J Ollos (previous) (diff)

comment:3 Changed 5 years ago by Steffen Hoffmann

Keywords: error formatting added

If line numbers in error and code don't match, than the only valid conclusion is, that what you see in your code is not what you're actually running.

These are effects of multiple concurrent installs, maybe not intended but effectively nasty anyway. Sorry to say, but only a clean install can save you. There's nothing we could do here, because the reported code is not part of current plugin source, just as Ryan already hinted to you.

OT: Please, please with a cherry on top, get rid of that obsolete AccountManager revision. It causes real pain to see 0.2.1dev still in use, even more in production? Don't do that, if you care only a bit about your system. We're close to 0.4 right now, featuring a well of fixes, improvements and new features like account locking etc.

comment:4 in reply to:  2 Changed 5 years ago by Ryan J Ollos

Replying to anonymous:

Yes, disabling the trac tags plugin did work.

Who suggested you disable the TagsPlugin? It was only suggested that you upgrade to the latest plugin source because the issue reported in your traceback has been resolved.

comment:5 Changed 5 years ago by anonymous

I'm sorry maybe I didn't understand you correctly the first time. Are you suggesting I download the source code for the TagsPlugin and compile it? I'm going off of a fresh install as of today.

comment:6 Changed 5 years ago by Steffen Hoffmann

Yes, and make sure you don't install plugins globally, that is in pythonx.y/site-packages, but in the Trac env directory, or a common plugin folder, that you inherit from multiple env's, see t:wiki:TracIni#inherit-section.

comment:7 Changed 4 years ago by Steffen Hoffmann

Owner: changed from anonymous to Steffen Hoffmann
Status: reopenednew

Its reasonable to consider this issue as resolved after more than 6 months after 'will try' comment and no more complaints, right?

So I'll mark this accordingly on release time of tags-0.7. Explicit positive feedback would still be appreciated.

comment:8 Changed 3 years ago by Ryan J Ollos

I think this could simply be re-closed as a duplicate of #8995. #8995 could be re-opened if you plan to keep tickets open until the 0.7 release.

comment:9 Changed 3 years ago by Steffen Hoffmann

Resolution: fixed
Status: newclosed

Thanks for the hint on #8995. I wouldn't have reminded that one immediately. But since we already tracked that ticket in the change log, none of these tickets needs to be kept open any longer.

comment:10 Changed 3 years ago by Steffen Hoffmann

In 13815:

TagsPlugin: Completing preparation for v0.7 release.

Availability of that code as stable, tagged release
closes #2429, #3359, #3610, #3624, #3677, #3754, #3864, #3947, #3983, #4078, #4277, #4503, #4799, #5523, #7787, #7857, #8638, #9057, #9058, #9059, #9060, #9061, #9062, #9063, #9149, #9210, #9521, #9630, #9636, #10032, #10416, #10636, #11096, #11147, #11152, #11274, #11302, #11658 and #11659.

Additionally there are some issues and enhancement requests showing progress,
but known to require more work to resolve them satisfactorily, specifically
refs #2804, #4200, #8747 and #9064.

Thanks to all contributors and followers, that enabled and encouraged a good
portion of this development work.

Modify Ticket

as closed The owner will remain Steffen Hoffmann.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

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

Note: See TracTickets for help on using tickets.