marl / marl/pysox

ValueError: could not convert string to float: '1.41M'

Open
#119 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
540
Forks
83
PR merge metrics
No merged PRs in 30d

Description

import sox

sox.file_info.info('inputs files/input2.wav') // ValueError

Full error
Traceback (most recent call last):
File "C:/Users/USER_ARTEM/Desktop/Python/test/test2.py", line 4, in
sox.file_info.info('inputs files/input2.wav')
File "C:\Users\USER_ARTEM\AppData\Local\Programs\Python\Python37-32\lib\site-packages\sox\file_info.py", line 357, in info
'bitrate': bitrate(filepath),
File "C:\Users\USER_ARTEM\AppData\Local\Programs\Python\Python37-32\lib\site-packages\sox\file_info.py", line 64, in bitrate
return float(output[:-1])
ValueError: could not convert string to float: '1.41M'

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in sox/file_info.py at bitrate(), especially the conversion reported at line 64, then reproduce the failure with the input2.wav example from the issue. Verify that file_info.info() handles the reported bitrate format without raising ValueError and that the existing traceback scenario no longer fails.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.