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

a WindowsPath object instead of a string for the audio file name? #4

Open
Nebuluss opened this issue Jun 10, 2023 · 2 comments
Open

Comments

@Nebuluss
Copy link

Same error whatever how i write the path (directly

seewav "E:\seewav-master\seewav-master\SabouUrban.mp3" "SabouUrban.mp4"
seewav dldl.wav dldl.wav.mp4

ect.... it seems that seewav is still trying to use a WindowsPath object instead of a string for the audio file name.

(seawav) PS E:\seewav-master\seewav-master> seewav dldl.wav
Traceback (most recent call last):
File "C:\Users\Laurent.conda\envs\seawav\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\Laurent.conda\envs\seawav\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\Laurent.conda\envs\seawav\Scripts\seewav.exe_main
.py", line 7, in
File "C:\Users\Laurent.conda\envs\seawav\lib\site-packages\seewav.py", line 297, in main
size=(args.width, args.height))
File "C:\Users\Laurent.conda\envs\seawav\lib\site-packages\seewav.py", line 179, in visualize
wav, sr = read_audio(audio, seek=seek, duration=duration)
File "C:\Users\Laurent.conda\envs\seawav\lib\site-packages\seewav.py", line 85, in read_audio
proc = sp.run(command, check=True, capture_output=True)
File "C:\Users\Laurent.conda\envs\seawav\lib\subprocess.py", line 453, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Users\Laurent.conda\envs\seawav\lib\subprocess.py", line 756, in init
restore_signals, start_new_session)
File "C:\Users\Laurent.conda\envs\seawav\lib\subprocess.py", line 1100, in _execute_child
args = list2cmdline(args)
File "C:\Users\Laurent.conda\envs\seawav\lib\subprocess.py", line 511, in list2cmdline
needquote = (" " in arg) or ("\t" in arg) or not arg
TypeError: argument of type 'WindowsPath' is not iterable

@adefossez
Copy link
Owner

Interesting, what version of Python do you have ? Will try to make a fix. Or feel free to open a PR.

@Nebuluss
Copy link
Author

Nebuluss commented Jun 10, 2023

Tried on python 3.7 (and 3.9.16)

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

No branches or pull requests

2 participants