#6017 closed defect (wontfix)
When searching I get "OperationalError: Could not decode to UTF-8 column"
Reported by: | Owned by: | Jonas Borgström | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | search system | Version: | 0.10.3.1 |
Severity: | major | Keywords: | |
Cc: | daniel.beckham@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
When searching in Trac, I see the following error:
OperationalError: Could not decode to UTF-8 column
I've isolated the problem to searches that match a specific ticket in the system. Any search that would match the description in that ticket throws the error. Searches for keywords that do not exist in that ticket's description work properly.
Full Traceback:
Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 387, in dispatch_request dispatcher.dispatch(req) File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 237, in dispatch resp = chosen_handler.process_request(req) File "/usr/lib/python2.4/site-packages/trac/Search.py", line 181, in process_request results += list(source.get_search_results(req, terms, filters)) File "/usr/lib/python2.4/site-packages/trac/ticket/api.py", line 269, in get_search_results if status == 'closed': OperationalError: Could not decode to UTF-8 column 'description' with text 'We need to full explore the possibilities for the RSS feeds.
Attachments (0)
Change History (4)
comment:1 by , 17 years ago
comment:2 by , 17 years ago
Ok, final piece of the puzzle here is that I've confirmed that this particular ticket was created by a script that we ran some time ago to convert items from an old todo system to track tickets.
At this point, I think it's less of a defect and more of a needed enhancement for Trac to more gracefully handle database errors. In this particular instance, there would have been several good results that could have been displayed instead of an error page, or at least in addition to some sort of error output.
comment:3 by , 17 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Trac now handles internally all text as unicode and accepts UTF-8 text as well. If the proper APIs are used to access Trac data, this kind of issue should not happen anymore. Previous releases of Trac were more sensitive to this kind of errors.
However, managing errors due to direct Trac DB changes - bypassing the APIs - is really out-of-scope.
You need to manually edit your Trac DB file to fix up this issue, using SQL commands.
I also see the following tracback when trying to open the ticket in my browser: