Run remix/examples/videx$ python vdissoc.py /tmp/tmp3RMWUT vdissoc.mpg # Or type in any You Tube URL instaed of /tmp/...
What is the expected output? What do you see instead?
Error:
Traceback (most recent call last):
File "vdissoc.py", line 110, in
main(inputFilename, outputFilename, variation)
File "vdissoc.py", line 88, in main
out.save(outfile)
File "/usr/local/lib/python2.7/dist-packages/echonest/video.py", line 184, in save
res = sequencetomovie(filename, self.video, audioout)
File "/usr/local/lib/python2.7/dist-packages/echonest/video.py", line 316, in sequencetomovie
cmd += " -ab %dk " % getattr(config, 'MP3_BITRATE', '64')
TypeError: %d format: a number is required, not str
What version of the product are you using? On what operating system?
Python 2.7 / Ubuntu 10.10
Please provide any additional information below.
The problem happens when pyechonest.config module does not have the MP3_BITRATE attribute set.
Then, getattr(config, 'MP3_BITRATE', '64') returns a string ('64'), instead of an int, and this (%d) fails:
ocelma: What steps will reproduce the problem?
What is the expected output? What do you see instead?
Error:
Traceback (most recent call last): File "vdissoc.py", line 110, in
main(inputFilename, outputFilename, variation)
File "vdissoc.py", line 88, in main
out.save(outfile)
File "/usr/local/lib/python2.7/dist-packages/echonest/video.py", line 184, in save
res = sequencetomovie(filename, self.video, audioout)
File "/usr/local/lib/python2.7/dist-packages/echonest/video.py", line 316, in sequencetomovie
cmd += " -ab %dk " % getattr(config, 'MP3_BITRATE', '64')
TypeError: %d format: a number is required, not str
What version of the product are you using? On what operating system?
Python 2.7 / Ubuntu 10.10
Please provide any additional information below.
The problem happens when pyechonest.config module does not have the MP3_BITRATE attribute set.
Then, getattr(config, 'MP3_BITRATE', '64') returns a string ('64'), instead of an int, and this (%d) fails:
sequencetomovie.py:316 cmd += " -ab %dk " % getattr(config, 'MP3_BITRATE', 64) #ocelma '64' -> 64
And now it works fine!