Bug 744939

Summary: [abrt] picard-0.15.1-1.fc14: script.py:310:func_num:ValueError: invalid literal for int() with base 10: '.2'
Product: [Fedora] Fedora Reporter: dpw818
Component: picardAssignee: Alex Lancaster <alex>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 14CC: alex
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Unspecified   
Whiteboard: abrt_hash:88b7190f
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 19:29:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
File: backtrace none

Description dpw818 2011-10-10 21:20:16 UTC
abrt version: 1.1.18
architecture: i686
cmdline: /usr/bin/python /usr/bin/picard
component: picard
executable: /usr/bin/picard
kernel: 2.6.35.14-96.fc14.i686.PAE
package: picard-0.15.1-1.fc14
reason: script.py:310:func_num:ValueError: invalid literal for int() with base 10: '.2'
release: Fedora release 14 (Laughlin)
How to reproduce: Trying to change how files are named from tags ("file naming"), under options.  I was typing in different values and got this crash report (though the prog is still running).
time: 1318281551
uid: 500

backtrace
-----
script.py:310:func_num:ValueError: invalid literal for int() with base 10: '.2'

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/picard/ui/options/renaming.py", line 71, in check_formats
    self.update_examples()
  File "/usr/lib/python2.7/site-packages/picard/ui/options/renaming.py", line 98, in update_examples
    example1 = self._example_to_filename(self.example_1())
  File "/usr/lib/python2.7/site-packages/picard/ui/options/renaming.py", line 89, in _example_to_filename
    filename = file._make_filename(file.filename, file.metadata, settings)
  File "/usr/lib/python2.7/site-packages/picard/file.py", line 234, in _make_filename
    new_filename = self._script_to_filename(format, metadata, settings)
  File "/usr/lib/python2.7/site-packages/picard/file.py", line 207, in _script_to_filename
    filename = ScriptParser().eval(format, metadata, self)
  File "/usr/lib/python2.7/site-packages/picard/script.py", line 237, in eval
    return ScriptParser._cache[key].eval(self)
  File "/usr/lib/python2.7/site-packages/picard/script.py", line 80, in eval
    result.append(item.eval(state))
  File "/usr/lib/python2.7/site-packages/picard/script.py", line 70, in eval
    return function(parser, *args)
  File "/usr/lib/python2.7/site-packages/picard/script.py", line 310, in func_num
    format = "%%0%dd" % int(length)
ValueError: invalid literal for int() with base 10: '.2'

Local variables in innermost frame:
text: '7'
length: u'.2'
parser: <picard.script.ScriptParser object at 0x8831cac>

Comment 1 dpw818 2011-10-10 21:20:18 UTC
Created attachment 527330 [details]
File: backtrace

Comment 2 Alex Lancaster 2012-05-08 18:56:27 UTC
If it's a problem with a particular file, can you post a link to the file (or an
extract)?

Comment 3 Fedora Update System 2012-06-04 19:24:04 UTC
picard-1.0-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/picard-1.0-1.fc17

Comment 4 Fedora Update System 2012-06-04 19:53:07 UTC
picard-1.0-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/picard-1.0-1.fc16

Comment 5 Fedora Update System 2012-06-07 02:38:20 UTC
Package picard-1.0-1.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing picard-1.0-1.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-8916/picard-1.0-1.fc17
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2012-06-20 19:29:01 UTC
picard-1.0-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2012-06-20 19:30:33 UTC
picard-1.0-1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.