FileNotFoundError: [Errno 2] No such file or directory: './outputs/save_video.json'

#9
by Hungpham2611 - opened

I tried running your project locally and they got errors like this, can you share with me how to fix it?
cd ./SMPLer-X/ && python app.py --video_folder_path ../outputs/tmpvideo/ --data_save_path ../outputs/tmpdata/ --json_save_path ../outputs/save_video.json && cd ..
Traceback (most recent call last):
File "H:\Swap\TANGO\create_graph.py", line 477, in
graph = create_graph(json_path, smplx_model)
File "H:\Swap\TANGO\create_graph.py", line 129, in create_graph
data_meta = json.load(open(json_path, "r"))
FileNotFoundError: [Errno 2] No such file or directory: './outputs/save_video.json'
Traceback (most recent call last):
File "H:\Swap\TANGO\app.py", line 769, in
demo = make_demo()
File "H:\Swap\TANGO\app.py", line 754, in make_demo
gr.Examples(
File "H:\Swap\TANGO\env\lib\site-packages\gradio\helpers.py", line 81, in create_examples
examples_obj.create()
File "H:\Swap\TANGO\env\lib\site-packages\gradio\helpers.py", line 340, in create
self._start_caching()
File "H:\Swap\TANGO\env\lib\site-packages\gradio\helpers.py", line 391, in _start_caching
client_utils.synchronize_async(self.cache)
File "H:\Swap\TANGO\env\lib\site-packages\gradio_client\utils.py", line 855, in synchronize_async
return fsspec.asyn.sync(fsspec.asyn.get_loop(), func, *args, **kwargs) # type: ignore
File "H:\Swap\TANGO\env\lib\site-packages\fsspec\asyn.py", line 103, in sync
raise return_result
File "H:\Swap\TANGO\env\lib\site-packages\fsspec\asyn.py", line 56, in _runner
result[0] = await coro
File "H:\Swap\TANGO\env\lib\site-packages\gradio\helpers.py", line 517, in cache
prediction = await Context.root_block.process_api(
File "H:\Swap\TANGO\env\lib\site-packages\gradio\blocks.py", line 1935, in process_api
result = await self.call_function(
File "H:\Swap\TANGO\env\lib\site-packages\gradio\blocks.py", line 1520, in call_function
prediction = await anyio.to_thread.run_sync( # type: ignore
File "H:\Swap\TANGO\env\lib\site-packages\anyio\to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
File "H:\Swap\TANGO\env\lib\site-packages\anyio_backends_asyncio.py", line 2441, in run_sync_in_worker_thread
return await future
File "H:\Swap\TANGO\env\lib\site-packages\anyio_backends_asyncio.py", line 943, in run
result = context.run(func, *args)
File "H:\Swap\TANGO\env\lib\site-packages\gradio\utils.py", line 826, in wrapper
response = f(*args, **kwargs)
File "H:\Swap\TANGO\app.py", line 592, in tango
result = test_fn(model, device, 0, cfg.data.test_meta_paths, test_path, cfg, audio_path, create_graph=create_graph)
File "H:\Swap\TANGO\app.py", line 186, in test_fn
graph = igraph.Graph.Read_Pickle(fname=pool_path)
File "H:\Swap\TANGO\env\lib\site-packages\igraph\io\files.py", line 223, in _construct_graph_from_pickle_file
raise IOError(
OSError: Cannot load file. If fname is a file name, that filename may be incorrect.

Yup I'm also getting the same error , could you please check this
@H-Liu1997 ?

I figured it out after few hit and trials , basically there are 2 issues first is mmcv library is highly sensitive to cuda and torch version so install it using this command instead - https://github.com/open-mmlab/mmdetection/issues/4291#issuecomment-946909608. Secondly there is a fix in a package that is being applied directly inside environment, SMPLER-X app.py (line 21)- os.system('cp -rf ./assets/conversions.py /opt/conda/envs/tango/lib/python3.9/site-packages/torchgeometry/core/conversions.py')
change this based on your python env

@H-Liu1997 It would be helpful if you add a small installation guide

hi bro,I encountered the same problem, the author said:
I recommand python 3.9.20, torch 2.0.0, cu117 for it

I took a closer look at the requirements.txt file, and I re-executed pip install -r req.... txt
But the problem is still the same, I tried reinstalling mmcv again.

Here is what worked for me

  1. Create a new environment
  2. remove mmcv from requirements and run pip install -r requirements.txt
  3. install mmcv using this command pip install mmcv==2.1.0 -f https://download.openmmlab.com/mmcv/dist/cu117/torch2.0/index.html
  4. Update the line 21 of SMPLER-X/app.py to yoru environment

I guess this problem is coming because the we are running this command from inside the script (cd ./SMPLer-X/ && python app.py --video_folder_path ../outputs/tmpvideo/ --data_save_path ../outputs/tmpdata/ --json_save_path ../outputs/save_video.json && cd .. ) and the SMPLer-X/app.pt script throws an error , So we move ahead without actually creating the .json file which is expected from SMPLer-X/app.py. Ideally above changes should solve the issue ig

Sign up or log in to comment