[GH-ISSUE #4] a WindowsPath object instead of a string for the audio file name? #2

Open
opened 2026-03-01 14:33:46 +03:00 by kerem · 2 comments
Owner

Originally created by @Nebuluss on GitHub (Jun 10, 2023).
Original GitHub issue: https://github.com/adefossez/seewav/issues/4

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

Originally created by @Nebuluss on GitHub (Jun 10, 2023). Original GitHub issue: https://github.com/adefossez/seewav/issues/4 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 <module> 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
Author
Owner

@adefossez commented on GitHub (Jun 10, 2023):

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

<!-- gh-comment-id:1585616089 --> @adefossez commented on GitHub (Jun 10, 2023): Interesting, what version of Python do you have ? Will try to make a fix. Or feel free to open a PR.
Author
Owner

@Nebuluss commented on GitHub (Jun 10, 2023):

Tried on python 3.7 (and 3.9.16)

<!-- gh-comment-id:1585628071 --> @Nebuluss commented on GitHub (Jun 10, 2023): Tried on python 3.7 (and 3.9.16)
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/seewav#2
No description provided.