On Fri, Aug 23, 2013 at 03:51:40PM -0700, Iain Duncan wrote:
> Hey folks, hoping someone has some idea of what this means, cause I don't!
> 
> When I upgraded an app from webob 1.1 to 1.2.3, I got the following
> traceback:
> 2010   File
> "/home/SD37_2012/trunk/SD37/framework_src/xornot.cms/xornot/cms/fields/__init__.py",
> line 300, in get_subform_tmpl_dict
> 2011     fake_req.GET['_revision'] = revision.id
> 2012   File
> "/home/SD37_2012/trunk/SD37/eggs/WebOb-1.2.3-py2.6.egg/webob/multidict.py",
> line 300, in __setitem__
> 2013     self.on_change()
> 2014   File
> "/home/SD37_2012/trunk/SD37/eggs/WebOb-1.2.3-py2.6.egg/webob/multidict.py",
> line 294, in on_change
> 2015     data = [(e(k), e(v)) for k,v in self.items()]
> 2016   File
> "/home/SD37_2012/trunk/SD37/eggs/WebOb-1.2.3-py2.6.egg/webob/multidict.py",
> line 293, in <lambda>
> 2017     e = lambda t: t.encode('utf8')
> 2018 AttributeError: 'long' object has no attribute 'encode'
> 
> 
> The above was fine with 1.1. Anyone have any idea of what I should be
> looking at or why this would become an issue?

Just looking at the traceback I think you would be better off changing
xornot/cms/fields/__init__.py (line 300) to convert numbers to strings before
stuffing them into the request:

           fake_req.GET['_revision'] = unicode(revision.id)

Marius Gedminas
-- 
The primary purpose of the DATA statement is to give names to constants;
instead of referring to PI as 3.141592653589797, at every appearance,
the variable PI can be given that value with a DATA statement, and
used instead of the longer form of the constant. This also simplifies
modifying the program, should the value of PI change.
                -- Fortran manual for Xerox computers

Attachment: signature.asc
Description: Digital signature

Reply via email to