Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #222 (closed defect: invalid)

Opened 13 years ago

Last modified 12 years ago

Comment on docs/wiki20/page2.html

Reported by: macgyver2@… Owned by: kevin
Priority: high Milestone:
Component: Documentation Version:
Severity: normal Keywords:
Cc:

Description

The description for the final code block on the page refers to six lines yet there are only five in the block itself. It appears line 5 (dealing with unicode) is missing.

Change History

comment:1 Changed 13 years ago by SuperJared <jared.kuolt@…>

  • Priority changed from normal to high
  • Owner changed from anonymous to kevin
  • Severity changed from minor to normal

I don't know what this should be.

comment:2 Changed 13 years ago by anonymous

Maybe the reason for trouble calling  http://localhost:8080/edit?pagename=FrontPage ,when there are umlauts within the text to edit ?

500 Internal error

Server got itself in trouble

Traceback (most recent call last):
  File "d:\python24\lib\site-packages\CherryPy-2.1.0-py2.4.egg\cherrypy\_cphttptools.py", line 271, in run
    main()
  File "d:\python24\lib\site-packages\CherryPy-2.1.0-py2.4.egg\cherrypy\_cphttptools.py", line 502, in main
    body = page_handler(*args, **cherrypy.request.paramMap)
  File "d:\python24\lib\site-packages\TurboGears-0.8a5-py2.4.egg\turbogears\controllers.py", line 122, in newfunc
    return controllers._process_output(tg_format, output, html)
  File "d:\python24\lib\site-packages\TurboGears-0.8a5-py2.4.egg\turbogears\controllers.py", line 38, in _process_output
    output = view.render(output, tg_format, template=template)
  File "d:\python24\lib\site-packages\TurboGears-0.8a5-py2.4.egg\turbogears\view.py", line 99, in render
    return t.serialize(encoding="utf-8", output=format, fragment=fragment)
  File "d:\python24\lib\site-packages\kid-0.8-py2.4.egg\kid\__init__.py", line 232, in serialize
    return serializer.serialize(self, encoding, fragment)
  File "d:\python24\lib\site-packages\kid-0.8-py2.4.egg\kid\serialization.py", line 51, in serialize
    text = list(self.generate(stream, encoding, fragment))
  File "d:\python24\lib\site-packages\kid-0.8-py2.4.egg\kid\serialization.py", line 319, in generate
    for ev, item in self.apply_filters(stream):
  File "d:\python24\lib\site-packages\kid-0.8-py2.4.egg\kid\serialization.py", line 77, in balancing_filter
    for ev, item in stream:
  File "d:\python24\lib\site-packages\kid-0.8-py2.4.egg\kid\pull.py", line 203, in _coalesce
    for ev, item in stream:
  File "d:\python24\lib\site-packages\kid-0.8-py2.4.egg\kid\filter.py", line 21, in transform_filter
    for ev, item in apply_matches(stream, template, templates, apply_func):
  File "d:\python24\lib\site-packages\kid-0.8-py2.4.egg\kid\filter.py", line 31, in apply_matches
    item = stream.expand()
  File "d:\python24\lib\site-packages\kid-0.8-py2.4.egg\kid\pull.py", line 95, in expand
    for ev, item in self._iter:
  File "d:\python24\lib\site-packages\kid-0.8-py2.4.egg\kid\pull.py", line 164, in _track
    for p in stream:
  File "d:\python24\lib\site-packages\kid-0.8-py2.4.egg\kid\pull.py", line 211, in _coalesce
    text += to_unicode(value, encoding)
  File "d:\python24\lib\site-packages\kid-0.8-py2.4.egg\kid\pull.py", line 187, in to_unicode
    return unicode(value, encoding)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 55: ordinal not in range(128)

comment:3 Changed 13 years ago by anonymous

I have the exact same error (same traceback). I would really like to know what the line dealing with unicode is.

comment:4 Changed 13 years ago by anonymous

Probably because SQLObject does something unexpected:

from sqlobject/sqlite/sqliteconnection.py:

            for col_type in "text", "char", "varchar":
                sqlite.register_converter(col_type, stop_pysqlite2_converting_strings_to_unicode)
                sqlite.register_converter(col_type.upper(), stop_pysqlite2_converting_strings_to_unicode)

This changes pysqlite2, which normally DOES return unicode strings for TEXT columns, into returning them in raw format, as utf8-strings. Needless to say, such behaviour makes KID freak out, in addition to opening up for funny stuff such as strings being encoded with utf-8 each time they are saved.. so you get (utf-8)3 etc.

I think the problem occurs when the KID template is told to use strings in attributes, since this freaks out on the edit-template of the wiki.

comment:5 Changed 13 years ago by jorge.vargas

remenber this are the old docs, is this happening with older TG versions?

comment:6 Changed 13 years ago by jorge.vargas

  • Status changed from new to closed
  • Resolution set to invalid

those docs no longer exist

Note: See TracTickets for help on using tickets.