Play MP3s from Windows

Tim Harig usernet at ilthio.net
Fri Jun 19 19:27:10 EDT 2009


On 2009-06-19, Arlie <arlie.c at gmail.com> wrote:
> Hi,
>
> Newbie here. I copied and pasted the code below. But when I ran it I
> got this error:
>
> D:\>python mp3.py
> Duree du fichier :  298919  millisecondes
> Traceback (most recent call last):
>   File "mp3.py", line 37, in <module>
>     time.sleep(int(buf)/1000)
> ValueError: invalid literal for int() with base 10: ''

Did you mean time.sleep(int(buf/1000)) which will guarantee that the value
sent to sleep is an integer rather then a float if buf is not evenly
divisible by 1000 (even after it has been rounded to an integer)?



More information about the Python-list mailing list