Open nfeliccia opened 2 years ago
OSError: [Errno 22] Invalid argument: 'C:\Users\arvinder.sharma/.torch/iopath_cache\s/nau5ut6zgthunil\config.yaml?dl=1.lock'
I am getting same error. Running this on windows 10. its working in google colab but not in Jupter notebook or when run through flask.
Let me know how to resolve it.
Apologies for reviving this, but @nfeliccia and @ArvinderKumar133 did either of you manage to solve this? |
Edit -- found the (workaround) solution here: https://github.com/Layout-Parser/layout-parser/issues/15
Describe the bug A clear and concise description of what the bug is. Internally producing an invalid argument trying to load config.yaml for the model .
To Reproduce Steps to reproduce the behavior:
model = Detectron2LayoutModel('lp://PubLayNet/mask_rcnn_X_101_32x8d_FPN_3x/config', extra_config=["MODEL.ROI_HEADS.SCORE_THRESH_TEST", 0.5], label_map={0: "Text", 1: "Title", 2: "List", 3: "Table", 4: "Figure"})
File "C:\layoutparserdirty\layout_processor.py", line 3, in
model = Detectron2LayoutModel('lp://PubLayNet/mask_rcnn_X_101_32x8d_FPN_3x/config',
File "C:\layoutparserdirty\venv\lib\site-packages\layoutparser\models\detectron2\layoutmodel.py", line 91, in init
config_path = PathManager.get_local_path(config_path)
File "C:\layoutparserdirty\venv\lib\site-packages\iopath\common\file_io.py", line 1197, in get_local_path
bret = handler._get_local_path(path, force=force, kwargs)
File "C:\layoutparserdirty\venv\lib\site-packages\layoutparser\models\detectron2\catalog.py", line 136, in _get_local_path
return PathManager.get_local_path(model_url, kwargs)
File "C:\layoutparserdirty\venv\lib\site-packages\iopath\common\file_io.py", line 1197, in get_local_path
bret = handler._get_local_path(path, force=force, kwargs)
File "C:\layoutparserdirty\venv\lib\site-packages\iopath\common\file_io.py", line 794, in _get_local_path
with file_lock(cached):
File "C:\layoutparserdirty\venv\lib\site-packages\portalocker\utils.py", line 157, in enter
return self.acquire()
File "C:\layoutparserdirty\venv\lib\site-packages\portalocker\utils.py", line 239, in acquire
fh = self._get_fh()
File "C:\layoutparserdirty\venv\lib\site-packages\portalocker\utils.py", line 289, in _get_fh
return open(self.filename, self.mode, self.file_open_kwargs)
OSError: [Errno 22] Invalid argument: 'C:\Users\nfeliccia/.torch/iopath_cache\s/nau5ut6zgthunil\config.yaml?dl=1.lock'