Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot set number of threads #10

Closed
GoogleCodeExporter opened this issue Mar 16, 2015 · 4 comments
Closed

Cannot set number of threads #10

GoogleCodeExporter opened this issue Mar 16, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

Issue 12 has been merged into this issue.

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

@GoogleCodeExporter
Copy link
Author

Issue 17 has been merged into this issue.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant