soap117 / DeepRule

BSD 3-Clause "New" or "Revised" License
129 stars 45 forks source link

Type Error: TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType #6

Open ushna27 opened 3 years ago

ushna27 commented 3 years ago

Hi,

I tried to run the code by downloading the dataset of only Line Chart. I was able to make all the files. When I try to get the result using test_pipe_type_cloud.py, I get the below error -

loading parameters at iteration: 50000 Traceback (most recent call last): File "test_pipe_type_cloud.py", line 240, in methods = Pre_load_nets(args.type, 0, args.data_dir, args.cache_path) File "test_pipe_type_cloud.py", line 82, in Pre_load_nets db_line, nnet_line = load_net(50000, "CornerNetLine", data_dir, cache_dir, File "test_pipe_type_cloud.py", line 57, in load_net db = datasets[dataset](configs["db"], split) File "C:\Users\RoyAnshu\AppData\Local\Programs\Python\Python38\Scripts\Master thesis\source code\DeepRule-master\db\coco.py", line 446, in init cache_dir = system_configs.cache_dir File "C:\Users\RoyAnshu\AppData\Local\Programs\Python\Python38\Scripts\Master thesis\source code\DeepRule-master\config.py", line 175, in cache_dir if not os.path.exists(self._configs["cache_dir"]): File "C:\Users\RoyAnshu\AppData\Local\Programs\Python\Python38\lib\genericpath.py", line 19, in exists os.stat(path) TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

Any solution?

ZubairShovan commented 3 years ago

@soap117 could you please have a look into this. I am facing the same here. Thanks

soap117 commented 3 years ago

Maybe you should try adding parameters to the --cache_path.

ZubairShovan commented 3 years ago

yeah. that was the reason. thanks. maybe this issue can be closed

ushna27 commented 3 years ago

It works for me as well.

I have now run into a driver issue. What version of CUDA toolkit and torch version are you using? Will Cuda 9.1, 9.2 work?

john-aws commented 2 years ago

If --cache_path is a required parameter, then ideally the software would indicate this with required=True, as follows:

parser.add_argument('--cache_path', dest="cache_path", type=str, required=True)