Ticket #1284 (closed defect: fixed)

Opened 1 year ago

Last modified 10 months ago

[PATCH] Safari Unicode fix in controllers.py raising TypeError

Reported by: simonwittber Assigned to: 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)

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

controllers.diff (102 bytes) - added by simonwittber on 02/05/07 19:53:55.
diff file against 1.0.1 turbogears/controllers.py

Change History

02/05/07 19:53:55 changed by simonwittber

  • attachment controllers.diff added.

diff file against 1.0.1 turbogears/controllers.py

02/05/07 19:55:45 changed by simonwittber

  • owner set to anonymous.
  • version changed from 1.0 to 1.0.1.
  • component changed from unassigned to TurboGears.

02/07/07 12:31:33 changed by jorge.vargas

  • description changed.

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

02/21/07 20:57:35 changed 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:

http://groups.google.com/group/turbogears/browse_thread/thread/e32194cdfa87066a/eb9c12fb7f58a376?lnk=gst&q=tg_format&rnum=9#eb9c12fb7f58a376

05/01/07 12:56:59 changed by alberto

  • milestone changed from 1.0.2 to 1.0.3.

06/02/07 10:59:25 changed 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.

07/01/07 18:25:21 changed by faide

  • summary changed from Safari Unicode fix in controllers.py raising TypeError to [PATCH] Safari Unicode fix in controllers.py raising TypeError.

07/03/07 10:13:22 changed by faide

  • status changed from new to closed.
  • resolution set to fixed.

Applied at r3214 (1.0) and r3215 (1.1)

Thanks.