Description

When I search any term (in titles or in text) without hits, I get an error in my spanish-configured browser.

I get this page:

ValueError

unsupported format character 'C' (0x43) at index 121

If you want to report a bug, please save this page and attach it to your bug report.

    * Show debugging information
    * Report bug
    * Visit MoinMoin wiki

Python shows on console:

235307 ERROR    ValueError: unsupported format character 'C' (0x43) at index 141Traceback (most recent call last):
  File "/data/moin-1.6/moin-1.6/MoinMoin/request/__init__.py", line 1213, in run
    handler(self.page.page_name, self)
  File "/data/moin-1.6/moin-1.6/MoinMoin/action/fullsearch.py", line 211, in execute
    escape=0, relative=False)),
ValueError: unsupported format character 'C' (0x43) at index 141

Steps to reproduce

  1. Change the default language to spanish in your browser preferences.
  2. Go to http://test.wikiwikiweb.de

  3. Enter some strange word (like thisworddoesntexist) in the text box and press the button "Titles" (or "Text").
  4. You'll get an error page.

Example

Component selection

Details

MoinMoin Version

1.6.0alpha

OS and Version

Linux 2.6.18

Python Version

2.4.4

Server Setup

DesktopEdition

Server Details

DesktopEdition

Language you are using the wiki in (set in the browser/UserPreferences)

es

Workaround

Choose another language in your browser preferences like english.

Discussion

I can't reproduce this. Can you try it again and give more details?

True! I'm using the spanish language configured in my browser. Using english goes ok. This happens with the spanish page. It seems to be a problem with the translated message (some incorrect character, maybe?). Try now changing the default language of your browser preferences to spanish.

OK, I could reproduce it. But I am still working on finding the reason for that strange behaviour...

The language to check is Espanol :)

The reason for that bug is that we dont escape % chars in result of substituting text. e.g. always if a wikiname is substituted to its url it has escape chars for the url address. Those chars start with a % sign. Because the next char following this % sign is not defined as subsitution char we got this error.

We have on file attachment view a similiar problem: e.g. view

if we change in AttachFile.viewFile formatted to False as a workaround the problem is gone

title = _('attachment:%(filename)s of %(pagename)s', formatted=False) % {
        'filename': filename, 'pagename': pagename}

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/1.6ErrorWhenFindNoResults (last edited 2009-07-03 10:01:22 by ThomasWaldmann)