GoogleCodeArchives / flac2all

Automatically exported from code.google.com/p/flac2all
0 stars 0 forks source link

Cannot set number of threads #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am trying to use less parallel threads than the reported number of 
hyperthreads on my computer. Therefore, I call flac2all like this:

>python ~/Downloads/flac2all_v3.38.py vorbis . --outdir=../ogg --threads=3

My python version is 2.7 (Ubuntu 12.04). The command crashes and the output is:

==========
Flac2all python script, v3 . Copyright 2006-2012 Ziva-Vatra.com.
Licensed under the GPLv2 (http://www.ziva-vatra.com).
Project website: http://code.google.com/p/flac2all/

There are 4048 files, of which 4004 are convertable FLAC files
Traceback (most recent call last):
  File "~/Downloads/flac2all_v3.38.py", line 758, in <module>
    print "We are running %d simultaneous transcodes" % (opts['threads'])
TypeError: %d format: a number is required, not str
==========

I replaced "%d" by "%s" and it works now. But I am not a python person, so I 
can't suggest a real fix.

Original issue reported on code.google.com by guido.ka...@gmail.com on 2 Feb 2014 at 7:28

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
No, what you did is correct. While refactoring the code I moved that line above 
the cast to int, resulting in the error. 

Fix made, and pushed, and a note to myself to start some proper unit testing 
before publishing. 

Revision 41 has your fix. 

Original comment by i...@ziva-vatra.com on 4 Feb 2014 at 9:40

GoogleCodeExporter commented 9 years ago
Issue 12 has been merged into this issue.

Original comment by i...@ziva-vatra.com on 23 Feb 2014 at 7:22

GoogleCodeExporter commented 9 years ago
Issue 17 has been merged into this issue.

Original comment by i...@ziva-vatra.com on 13 Jan 2015 at 3:33