Modify

Opened 4 years ago

Closed 9 months ago

#11033 closed defect (fixed)

[patch] AttributeError: 'int' object has no attribute 'rsplit'

Reported by: Matt Hess Owned by: Ryan J Ollos
Priority: high Component: ValuePropagationPlugin
Severity: critical Keywords:
Cc: Trac Release: 1.0

Description

Receiving error when tickets are created or updated.

Python Traceback

Most recent call last:
File "/usr/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/web/main.py", line 497, in _dispatch_request
File "/usr/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/web/main.py", line 214, in dispatch
File "/usr/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/ticket/web_ui.py", line 180, in process_request
File "/usr/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/ticket/web_ui.py", line 465, in _process_newticket_request
File "/usr/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/ticket/web_ui.py", line 1289, in _do_create
File "/usr/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/ticket/model.py", line 256, in insert
File "/usr/lib/python2.6/site-packages/ValuePropagation-0.2-py2.6.egg/valuepropagation/valuepropagation.py", line 361, in ticket_created
File "/usr/lib/python2.6/site-packages/ValuePropagation-0.2-py2.6.egg/valuepropagation/valuepropagation.py", line 373, in ticket_changed
File "/usr/lib/python2.6/site-packages/ValuePropagation-0.2-py2.6.egg/valuepropagation/valuepropagation.py", line 262, in _handle_link
File "/usr/lib/python2.6/site-packages/ValuePropagation-0.2-py2.6.egg/valuepropagation/valuepropagation.py", line 352, in _propagate
File "/usr/lib/python2.6/site-packages/ValuePropagation-0.2-py2.6.egg/valuepropagation/valuepropagation.py", line 345, in _update_ticket
File "/usr/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/ticket/model.py", line 366, in save_changes

Attachments (0)

Change History (4)

comment:1 Changed 4 years ago by Matt Hess

# svn diff valuepropagation.py

Index: valuepropagation.py
===================================================================
--- valuepropagation.py (revision 13003)
+++ valuepropagation.py (working copy)
@@ -20,7 +20,7 @@
 """
 ValuePropagation Plugin
 author: Chris Nelson <Chris.Nelson@SIXNET.com>
-version: 0.1
+version: 0.1.001
 
 Update values in other tickets based on ticket changes.  For example,
 with Subtickets plugin and Timing and Estimation plugin in place, a
@@ -342,7 +342,7 @@
                 # FIXME - Put something in the message?
                 # FIXME - the ticket_changed method gets an author, should
                 # this say "value propagation on behalf of <author>"?
-                ticket.save_changes('value propagation', '', when, db, cnum+1)
+                ticket.save_changes('value propagation', '', when, db, cnum=str(cnum+1))
 
             # All the propagation is done, save the new values
             when = datetime.datetime.now()

comment:2 Changed 4 years ago by Chris Nelson

Status: newassigned
Summary: AttributeError: 'int' object has no attribute 'rsplit'[patch] AttributeError: 'int' object has no attribute 'rsplit'

Thanks for the patch. I'll be sure to apply it next time I come back around to working on this plugin.

comment:3 Changed 9 months ago by Ryan J Ollos

Owner: changed from Chris Nelson to Ryan J Ollos
Status: assignedaccepted

comment:4 Changed 9 months ago by Ryan J Ollos

Resolution: fixed
Status: acceptedclosed

In 16190:

1.2.0dev: Adapt to Trac 1.2 API

  • Fix variable referenced before assigned, fixes #12084
  • Fix attribute error due to int cnum, fixes #11033

Fixes #13038.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.