hayabhay / frogbase

Transform audio-visual content into navigable knowledge.
https://frogbase.dev
MIT License
784 stars 94 forks source link

Unable to upload local content #62

Open akmzero opened 1 year ago

akmzero commented 1 year ago

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 _runscript 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 commented 1 year ago

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 commented 1 year ago

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