question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Windows] sf.write can't resolve path for wav

See original GitHub issue

There is no way i can write to a nested path in windows 10.

Context

i want to save a WAV file in data/file.0.wav. Theese is the uses cases that wont work.

Code

> # linux style
> sf.write('data/file.wav', data, sr)
{RuntimeError}Error opening 'data/file.0.wav': Format not recognised.

> # windows style as string
>  sf.write('data\\file.wav', data, sr)
{RuntimeError}Error opening 'data\\file.0.wav': Format not recognised.

> # windows style as file pointer
>sf.write(open('data\\file.0.wav', 'wb'), data, sr)
{RuntimeError}Error opening <_io.BufferedWriter name='data\\file.0.wav'>: Format not recognised.

Any work arounds?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
bastibecommented, Nov 27, 2019

OK, the docs are up to date again. I still don’t quite know why they didn’t automatically rebuild since 0.9.0. I guess I’ll have to keep an eye on that.

0reactions
Vichokocommented, Nov 27, 2019

Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

System Error when opening Wav File · Issue #227 - GitHub
This often means "File not found". Are you sure that the path is correct? 12
Read more >
Can't Play .wav file with winsound module? - Stack Overflow
Make sure the wav file you are trying to play is in the same folder as the py script is in. Otherwise you...
Read more >
How can I change the file properties for .wav files in Windows 7?
I cannot change anything on any of my .wav files in the file explorer or ... only go into WMP's library database and...
Read more >
How to play a wav file in Windows Mobile 6? - MSDN - Microsoft
under the remarks section. But I have a workaround, put an empty wav file in the same directory then call PlaySound to play...
Read more >
Error in playing .wav files - Microsoft Community
1-Right-Click on Start then click on Windows Powershell (admin) · 2- Type these commands. sfc /scannow (and press Enter) · 3- The DISM...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found