Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Unable to upload local content #62

Open
akmzero opened this issue Jul 11, 2023 · 2 comments
Open

Unable to upload local content #62

akmzero opened this issue Jul 11, 2023 · 2 comments

Comments

@akmzero
Copy link

akmzero commented Jul 11, 2023

When trying to upload local content (175mb .mkv file) the following error is given. Youtube works fine.

This is running in a Ubuntu VM.

I've attempted to move the temp directory but it went missing after trying to upload.

FileNotFoundError: [Errno 2] No such file or directory: '/tmp/Filenamehere.mkv'
Traceback:

File "/usr/local/lib/python3.10/dist-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
exec(code, module.dict)
File "/home/frogbase/Desktop/frogbase/frogbase-main/ui/01_🏠_Home.py", line 103, in
fb.add(sources, **opts).transcribe(ignore_captioned=False).embed().index()
File "/home/frogbase/Desktop/frogbase/frogbase-main/frogbase/core.py", line 246, in add
self._media_buffer = self.media.add(sources, **opts)
File "/home/frogbase/Desktop/frogbase/frogbase-main/frogbase/media.py", line 504, in add
added_media += self._add_from_disk(source, **opts)
File "/home/frogbase/Desktop/frogbase/frogbase-main/frogbase/media.py", line 464, in _add_from_disk
upload_date=datetime.fromtimestamp(media_file.stat().st_ctime).strftime("%Y%m%d"),
File "/usr/lib/python3.10/pathlib.py", line 1097, in stat
return self._accessor.stat(self, follow_symlinks=follow_symlinks)

@hayabhay
Copy link
Owner

Thanks for the flag! I haven't extensively tested it with local files. Will look into it this week as I get ready for a beta release.

@D3fense
Copy link
Contributor

D3fense commented Jul 22, 2023

By default, when you use the UI, uploaded file is moved from temp dir to frogbase dir. After that, the temporary file is referenced, which causes the error.
I proposed #66

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

No branches or pull requests

3 participants