Modify

Opened 11 years ago

Last modified 11 years ago

#11327 new defect

TypeError: %d format: a number is required, not unicode

Reported by: admin Owned by: Andrea Tomasini
Priority: normal Component: AgiloForTracPlugin
Severity: normal Keywords:
Cc: Trac Release:

Description

How to Reproduce

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

(please provide additional details here)

Request parameters:

{'__FORM_TOKEN': u'5cfc2baeef35b95030ea74de',
 'source_url': u'/trac/ticket/5368',
 'startwork': u'Start Work',
 'ticket': u'5368'}

User agent: Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Firefox/24.0

System Information

Trac 1.0.1
Agilo 0.9.11
Genshi 0.6 (without speedups)
MySQL server: "5.1.66-0+squeeze1", client: "5.1.66", thread-safe: 1
MySQLdb 1.2.4
Python 2.6.6 (r266:84292, Dec 27 2010, 00:02:40)
[GCC 4.4.5]
setuptools 1.1.6
jQuery 1.7.2

Enabled Plugins

agilo 0.9.11
timingandestimationplugin 1.3.7
TracAccountManager 0.4.3
TracAutoComplete 0.1
TracUserManagerPlugin 0.5dev-r12293
TracWysiwyg 0.12.0.5-r13296
worklog 0.3dev-r12358

Python Traceback

Traceback (most recent call last):
  File "build/bdist.linux-i686/egg/trac/web/main.py", line 497, in _dispatch_request
    dispatcher.dispatch(req)
  File "build/bdist.linux-i686/egg/trac/web/main.py", line 214, in dispatch
    resp = chosen_handler.process_request(req)
  File "build/bdist.linux-i686/egg/worklog/webui.py", line 126, in process_request
    if not mgr.start_work(req.args['ticket']):
  File "build/bdist.linux-i686/egg/worklog/manager.py", line 127, in start_work
    self.save_ticket(tckt, 'Automatically reassigning in order to start work.')
  File "build/bdist.linux-i686/egg/worklog/manager.py", line 81, in save_ticket
    tckt.save_changes(self.authname, msg, nowdt, cnum=str(cnum+1))
  File "/usr/local/lib/python2.6/dist-packages/agilo-0.9.11-py2.6.egg/agilo/ticket/model.py", line 849, in save_changes
    self._check_business_rules()
  File "/usr/local/lib/python2.6/dist-packages/agilo-0.9.11-py2.6.egg/agilo/ticket/model.py", line 833, in _check_business_rules
    RuleEngine(self.env).validate_rules(self)
  File "/usr/local/lib/python2.6/dist-packages/agilo-0.9.11-py2.6.egg/agilo/scrum/workflow/api.py", line 61, in validate_rules
    debug(self, "Called validate_rules(%s)" % ticket)
  File "/usr/local/lib/python2.6/dist-packages/agilo-0.9.11-py2.6.egg/agilo/ticket/model.py", line 321, in __str__
    repr(self.get_type()))
TypeError: %d format: a number is required, not unicode

Attachments (0)

Change History (10)

comment:1 Changed 11 years ago by anonymous

Hello ,

We have facing same error while click on "Star Work".

Getting following error.

=============================================================================
File "build/bdist.linux-i686/egg/worklog/manager.py", line 135, in start_work
=============================================================================
Code fragment:
Line	
130	tckt = Ticket(self.env, ticket)
131	 
132	 
133	if 'accepted' != tckt['status']:
134	tckt['status'] = 'accepted'
135	self.save_ticket(tckt, 'Automatically accepting in order to start work.')
136	 
137	# There is a chance the user may be working on another ticket at the moment
138	# depending on config options
139	if self.config.getbool('worklog', 'autostopstart'):
140	# Don't care if this fails, as with these arguments the only failure
=============================================================================
Local variables:
=============================================================================
Name	Value
self 	<worklog.manager.WorkLogManager instance at 0x9f2d50c>
tckt 	<agilo.ticket.model.AgiloTicket object at 0xB2D3816C (repr() error: ...
ticket 	u'5381'

=============================================================================
 File "build/bdist.linux-i686/egg/worklog/manager.py", line 81, in save_ticket
File "/usr/local/lib/python2.6/dist-packages/agilo-0.9.11-py2.6.egg/agilo/ticket/model.py", line 849, in save_changes
=============================================================================

Code fragment:
Line	
844	return super(AgiloTicket, self).save_changes(author, comment,
845	when=when, db=db, cnum=cnum, replyto=replyto)
846	else:
847	return super(AgiloTicket, self).save_changes(author, comment,
848	when=when, db=db, cnum=cnum)
849	self._check_business_rules()
850	 
851	if AgiloTicketSystem.is_trac_1_0():
852	for f in self.fields:
853	if f.get(Key.CUSTOM, False):
854	self.custom_fields.append(f['name'])
Local variables:
Name	Value
author 	u'admin'
cnum 	'1'
comment 	'Automatically accepting in order to start work.'
db 	None
replyto 	''
self 	<agilo.ticket.model.AgiloTicket object at 0xB2D3816C (repr() error: ...
when 	datetime.datetime(2013, 9, 19, 18, 0, 2, tzinfo=<LocalTimezone "IST" ...
Last edited 11 years ago by Ryan J Ollos (previous) (diff)

comment:2 Changed 11 years ago by Ryan J Ollos

Component: SELECT A HACKWorkLogPlugin
Owner: changed from anonymous to Colin Guthrie

comment:3 Changed 11 years ago by Jun Omae

Component: WorkLogPluginAgiloForTracPlugin
Owner: changed from Colin Guthrie to Andrea Tomasini

That is a AgiloForTracPlugin issue.

The tkt_id parameter of Ticket constructor is converted to int in trac.ticket.model.Ticket.__init__. However, agilo.ticket.model.AgiloTicket doesn't. See trac:source:branches/0.12-stable/trac/ticket/model.py@11355:60-61#L58.

comment:4 Changed 11 years ago by anonymous

Hello ,

Is there any update on this Ticket. How to resolve it. We are waiting for your reply.

comment:5 Changed 11 years ago by Ryan J Ollos

I'm not sure if the Agilo guys track tickets here. See t:AgiloForScrum for info on how to report a bug to them.

comment:6 Changed 11 years ago by anonymous

This bug has been fixed already, the release is going to come out soon, there are more things in the package. Latest on Friday :-)

comment:7 Changed 11 years ago by anonymous

Hello,

Thank you very much ....... Agilo Team :-)

comment:8 Changed 11 years ago by anonymous

Hello,

Please, Let me know when Updated package will be releasing.

Thanks,

comment:9 Changed 11 years ago by Stefano Rago

Hi,

You can follow updates on Agilo for Trac here: http://www.agilosoftware.com/blog

comment:10 Changed 11 years ago by anonymous

Hello,

Issue Has been resolved. If any other are facing same issue while click on start work you need to follow the given step's.

  1. Click on ticket.
  2. Select radio button of this option () " accept The owner will be changed from rahulb to bhairavdhanwade. Next status will be 'accepted'."

(Accept the ticket ownership first )

  1. Now you can click on "Start Work". It will you are able to start work smoothly.

Thanks,

Bhairav S. Dhanwade

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain Andrea Tomasini.

Add Comment


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

 
Note: See TracTickets for help on using tickets.