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 #1627 (closed defect: duplicate)

Opened 12 years ago

Last modified 12 years ago

encode_utf8 visit/api.py error - 'list' object has no attribute 'encode'

Reported by: mosi Owned by: anonymous
Priority: high Milestone: 1.0.4
Component: TurboGears Version: 1.0.4b3
Severity: critical Keywords: api.py visit identity bug error list attribute encode encode_utf8


Error in visit identity, this is what you get in TG ver. 1.0.4b3 File "/usr/lib/python2.5/site-packages/TurboGears-1.0.4b3-py2.5.egg/turbogears/visit/api.py", line 187, in encode_utf8

res[k] = v.encode('utf-8')

AttributeError?: 'list' object has no attribute 'encode'

I have no time and knowledge to change it, but it`s here> tg/visit/api.py :: Line 187

        def encode_utf8(params):
            will recursively encode to utf-8 all values in a dictionnary
            res = dict()
            for k, v in params.items():
                if type(v) is dict:
                    res[k] = encode_utf8(v)

                    res[k] = v.encode('utf-8')

            return res

Maybe except? or checking for more types ?

Change History

comment:1 Changed 12 years ago by Chris Arndt

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

Duplicate for #1622

Note: See TracTickets for help on using tickets.