Ticket #1284 (closed defect: fixed)
[PATCH] Safari Unicode fix in controllers.py raising TypeError
| Reported by: | simonwittber | Owned by: | anonymous |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.0.3 |
| Component: | TurboGears | Version: | 1.0.1 |
| Severity: | normal | Keywords: | controllers, TypeError |
| Cc: |
Description (last modified by jorge.vargas) (diff)
File "/Users/simonwittber/Library/Python/2.4/site-packages/TurboGears-1.0.1-py2.4.egg/turbogears/controllers.py", line 100, in _process_output
output = unicodechars.sub(
TypeError: expected string or buffer
A fix is in the diff file attached.
Attachments
Change History
Changed 5 years ago by simonwittber
-
attachment
controllers.diff
added
comment:1 Changed 5 years ago by simonwittber
- Owner set to anonymous
- Version changed from 1.0 to 1.0.1
- Component changed from unassigned to TurboGears
comment:2 Changed 5 years ago by jorge.vargas
- Description modified (diff)
umm why are you getting a generator? could you provide the value of that variable?
as for the patches http://docs.turbogears.org/patching_guidelines
comment:3 Changed 5 years ago by simonwittber
Not sure why I get a generator, but i believe one is supposed to be able to return generators from cherrypy functions, which are iterated to produce strings?
It could be the same error this person was having:
comment:5 Changed 5 years ago by dazzawazza
Just a little more information: I've traced this through and to answer jorge.vargas you get a generator if you are rendering JSON. I've applied this patch and it is working for me.
Note: See
TracTickets for help on using
tickets.
diff file against 1.0.1 turbogears/controllers.py