Open CircleCly opened 11 months ago
Hmm, this looks a bit like the issue in #12, since there seems to be an issue with my approach to temporary files on Windows. Could you try the fix mentioned in #12?
this could be it: https://stackoverflow.com/questions/23212435/permission-denied-to-write-to-my-temporary-file
looks like we're trying to open the file twice: once when NamedTemporaryFile()
is created, and another in sig.write
.
This solution from stackoverflow could work, you could give it a try!
import os
import tempfile
class CustomNamedTemporaryFile:
"""
This custom implementation is needed because of the following limitation of tempfile.NamedTemporaryFile:
> Whether the name can be used to open the file a second time, while the named temporary file is still open,
> varies across platforms (it can be so used on Unix; it cannot on Windows NT or later).
"""
def __init__(self, mode='wb', delete=True):
self._mode = mode
self._delete = delete
def __enter__(self):
# Generate a random temporary file name
file_name = os.path.join(tempfile.gettempdir(), os.urandom(24).hex())
# Ensure the file is created
open(file_name, "x").close()
# Open the file in the given mode
self._tempFile = open(file_name, self._mode)
return self._tempFile
def __exit__(self, exc_type, exc_val, exc_tb):
self._tempFile.close()
if self._delete:
os.remove(self._tempFile.name)
Hi,
I tried installing vampnet on my Windows 11 machine. I was able to launch the app using the gradio UI, but when I use the example audio file and click on "Vamp", I first see the following error message:
and then after a few seconds I see
and an error occurs on the website interface. What could be causing this issue?