#24744 closed defect (invalid)

ValueError: invalid literal for int() with base 10: '$24207'

Reported by: cypherpunks Owned by: qbi
Priority: Medium Milestone:
Component: Internal Services/Service - trac Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

How to Reproduce

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

(please provide additional details here)

Request parameters:

{u'__FORM_TOKEN': u'6ed886568305dff9d4e16c75',
 u'action': u'leave',
 u'comment': u'',
 u'field_actualpoints': u'',
 u'field_component': u'Applications/Tor Browser',
 u'field_keywords': u'tbb-crash, TorBrowserTeam201712',
 u'field_milestone': u'',
 u'field_parent': u'$24207',
 u'field_points': u'',
 u'field_priority': u'High',
 u'field_reviewer': u'',
 u'field_severity': u'Major',
 u'field_sponsor': u'',
 u'field_summary': u'TorBrowser crashes at riot.im/app',
 u'field_type': u'defect',
 u'field_version': u'',
 'id': u'24040',
 u'preview': u'Preview',
 u'replyto': u'',
 u'sfp_email': u'',
 u'sfph_mail': u'',
 u'start_time': u'1512985891144518',
 u'view_time': u'1512985891144518'}

User agent: Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0

System Information

System information not available

Enabled Plugins

Plugin information not available

Interface Customization

Interface customization information not available

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/trac/web/main.py", line 613, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.7/dist-packages/trac/web/main.py", line 253, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.7/dist-packages/trac/ticket/web_ui.py", line 177, in process_request
    return self._process_ticket_request(req)
  File "/usr/lib/python2.7/dist-packages/trac/ticket/web_ui.py", line 661, in _process_ticket_request
    valid = self._validate_ticket(req, ticket, not valid) and valid
  File "/usr/lib/python2.7/dist-packages/trac/ticket/web_ui.py", line 1378, in _validate_ticket
    for field, message in manipulator.validate_ticket(req, ticket):
  File "build/bdist.linux-x86_64/egg/childtickets/childtickets.py", line 69, in validate_ticket
    pid = int(ticket.values.get('parent').lstrip('#'))
ValueError: invalid literal for int() with base 10: '$24207'

Child Tickets

Change History (2)

comment:1 Changed 20 months ago by randolf

pid = int(ticket.values.get('parent').lstrip('#'))

The above one is showing error because, it can't strip the left character with '#' as parameter, but it would work if it is like below

pid = int(ticket.values.get('parent').lstrip('$'))

comment:2 Changed 20 months ago by qbi

Resolution: invalid
Status: newclosed

I made a bug report. See https://trac-hacks.org/ticket/13361

Note: See TracTickets for help on using tickets.