Edgewall Software
Modify

Opened 7 years ago

Closed 7 years ago

#10918 closed defect (cantfix)

UnicodeEncodeError: 'latin-1' codec can't encode character u'\u2013' in position 157: ordinal not in range(256)

Reported by: jai.sharma@… Owned by:
Priority: normal Milestone:
Component: general Version:
Severity: normal Keywords: mysqldb
Cc: Branch:
Release Notes:
API Changes:

Description

How to Reproduce

While doing a POST operation on /ticket/910, Trac issued an internal error.

(please provide additional details here)

Request parameters:

{'__FORM_TOKEN': u'2bc368574778a8c1bb3d84fe',
 'action': u'leave',
 'cnum': u'43',
 'comment': u'"First, appreciate the effort of Anurag who has done a good job in this tkt!\r\n\r\nFinal PAT comments -\r\n1. Also, on the Home Page, the titles look too cramped \u2013 pls make it similar to what we have on City Pages and all the city titles that appear on the top should be aligned.\r\n2. The tag \u201cNew\u201d is not appearing according to the jpg.\r\n3. The thank you layer, after submitting the query is not aligned properly \u2013 it should have margin along the border \u2013 right it looks pretty compressed into the boundary wall. (JPG committed)\r\n4. Also, an enhancement is required \u2013 the look and feel of the button needs to be changed. JPG committed.\r\n5. The price slider should not have 199 Lacs as the label - for all values above 99 lacs should be converted to Cr with 2 significant decimal places\r\n6. In case of Goa, where there\'s just one button of "All Location" - we should not even provide this button, coz it\'s of no use.\r\n7. Similarly, in categorization where there\'s just one group called "All Locations" - it should rather be called by city name.\r\n8. In case, there\u2019s no listing attached to the NP \u2013 the layer appears broken, pls put a minimum height to it.\r\n\r\nI have updated all the above points in SRS.\r\n\r\nOnce, you are done with PAT comments, let\'s talk about the method to get this released in A/B testing mode."\r\n\r\n\r\nWith regards\r\n-Pushkar (99acres, Product team)\r\nExt: 0120-3082211 (A88, Ground Floor)\r\nM: +919711786660',
 'field_billable': u'1',
 'field_bucket': u'New Projects',
 'field_cc': u'99bugzilla@infoedge.com,deepthi.s@naukri.com,anisha.jain@naukri.com',
 'field_checkbox_billable': u'1',
 'field_component': u'Home & City Page',
 'field_dependencies': u'',
 'field_description': u'SRS at:\r\n\r\nSVN\\City Pages\\SRS New Look FP Section on City Pages.docx\r\n\r\nJPG kept at:\r\nSVN\\City Pages\\JPG',
 'field_dev_estimated_date': u'8/10/2012',
 'field_due_close': u'DD/MM/YYYY',
 'field_estimatedhours': u'0.0',
 'field_hours': u'0',
 'field_keywords': u'',
 'field_live_estimated_date': u'DD/MM/YYYY',
 'field_milestone': u'July 2012',
 'field_prd_estimated_date': u'DD/MM/YYYY',
 'field_qa_estimated_date': u'DD/MM/YYYY',
 'field_qaowner': u'',
 'field_reporter': u'psinha',
 'field_severity': u'P3',
 'field_summary': u'New look FP section on City Pages',
 'field_ticket_status': u'PAT Done',
 'field_type': u'user story',
 'field_version': u'',
 'id': u'910',
 'replyto': u'',
 'submit': u'Submit changes',
 'ts': u'2012-10-22 05:23:31+00:00'}

User Agent was: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4

System Information

Trac 0.11
Python 2.4.3 (#1, Sep 3 2009, 15:37:12)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)]
setuptools 0.6c11
MySQL server: "5.0.77-log", client: "5.0.77", thread-safe: 1
MySQLdb 1.2.4b3
Genshi 0.6
Subversion 1.4.2 (r22196)
jQuery: 1.2.3

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/Trac-0.11-py2.4.egg/trac/web/main.py", line 423, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.4/site-packages/Trac-0.11-py2.4.egg/trac/web/main.py", line 197, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.4/site-packages/Trac-0.11-py2.4.egg/trac/ticket/web_ui.py", line 152, in process_request
    return self._process_ticket_request(req)
  File "/usr/lib/python2.4/site-packages/Trac-0.11-py2.4.egg/trac/ticket/web_ui.py", line 471, in _process_ticket_request
    self._do_save(req, ticket, action)
  File "/usr/lib/python2.4/site-packages/Trac-0.11-py2.4.egg/trac/ticket/web_ui.py", line 966, in _do_save
    cnum=internal_cnum):
  File "/usr/lib/python2.4/site-packages/Trac-0.11-py2.4.egg/trac/ticket/model.py", line 270, in save_changes
    (self.id, when_ts, author, cnum, comment))
  File "/usr/lib/python2.4/site-packages/Trac-0.11-py2.4.egg/trac/db/util.py", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/usr/lib/python2.4/site-packages/Trac-0.11-py2.4.egg/trac/db/util.py", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/usr/lib/python2.4/site-packages/MySQL_python-1.2.4b3-py2.4-linux-i686.egg/MySQLdb/cursors.py", line 184, in execute
    query = query % db.literal(args)
  File "/usr/lib/python2.4/site-packages/MySQL_python-1.2.4b3-py2.4-linux-i686.egg/MySQLdb/connections.py", line 264, in literal
    return self.escape(o, self.encoders)
  File "/usr/lib/python2.4/site-packages/MySQL_python-1.2.4b3-py2.4-linux-i686.egg/MySQLdb/connections.py", line 202, in unicode_literal
    return db.literal(u.encode(unicode_literal.charset))
UnicodeEncodeError: 'latin-1' codec can't encode character u'\u2013' in position 157: ordinal not in range(256)

Attachments (0)

Change History (1)

comment:1 by Christian Boos, 7 years ago

Keywords: mysqldb added
Resolution: cantfix
Status: newclosed

InstallationIssue (check the MySqlDb page for tips).

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to as closed The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.