Opened 16 years ago
Closed 16 years ago
#3943 closed defect (wontfix)
AttributeError: 'str' object has no attribute 'rsplit'
Reported by: | Owned by: | Jeff Hammel | |
---|---|---|---|
Priority: | high | Component: | TicketSubmitPolicyPlugin |
Severity: | major | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
How to Reproduce
While doing a POST operation on /admin/ticket/policy
, Trac issued an internal error.
Steps to reproduce:
- Go to Submit Policy in Admin area (Web frontend)
- Enter name in unlabelled text box and click "Add Policy" button
- Click either of the "+" buttons on the next screen and the error is thrown.
Obviously, this makes the admin interface completely useless.
Request parameters:
{'panel_id': u'policy', 'cat_id': u'ticket', 'add_condition_policy1': u'+', '__FORM_TOKEN': u'10d9980f6a6c7dbaf9804f3d', 'path_info': None, 'policy': u'policy1', 'new-policy': u'', 'add_action_policy1': u''}
User Agent was: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_5; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1
System Information
Trac | 0.11
|
Python | 2.3.4 (#1, Dec 11 2007, 05:28:55) [GCC 3.4.6 20060404 (Red Hat 3.4.6-9)]
|
setuptools | 0.6c8
|
SQLite | 3.3.6
|
pysqlite | 1.1.7
|
Genshi | 0.5
|
Pygments | 0.9
|
Subversion | 1.1.4 (r13838)
|
jQuery: | 1.2.3
|
Python Traceback
Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/Trac-0.11-py2.3.egg/trac/web/main.py", line 423, in _dispatch_request dispatcher.dispatch(req) File "/usr/lib/python2.3/site-packages/Trac-0.11-py2.3.egg/trac/web/main.py", line 197, in dispatch resp = chosen_handler.process_request(req) File "/usr/lib/python2.3/site-packages/Trac-0.11-py2.3.egg/trac/admin/web_ui.py", line 109, in process_request path_info) File "/usr/lib/python2.3/site-packages/TicketSubmitPolicy-0.7-py2.3.egg/ticketsubmitpolicy/ticketsubmitpolicy.py", line 371, in render_admin_panel args[policy][arg.rsplit(token, 1)[0]] = value AttributeError: 'str' object has no attribute 'rsplit'
Attachments (1)
Change History (3)
comment:1 Changed 16 years ago by
comment:2 Changed 16 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
http://trac-hacks.org/attachment/ticket/3943/rsplit.diff
You can try this patch wherein I've reimplemented the rsplit functionality for python 2.3. It doesn't really make sense to put this into the TicketSubmitPolicyPlugin code base as:
- its special cased to the two instances of rsplit in ticketsubmitpolicy.py
- it is code bloat for the normal (python >= 2.4) case
I don't plan on maintaining this patch in the future, so please upgrade, but in the mean time this should work (I hope)
python 2.3 strings don't have rsplit. please upgrade your python to 2.4 I've noted this on the TicketSubmitPolicyPlugin wiki page under Getting TicketSubmitPolicyPlugin