facebookresearch / fvcore

Collection of common code that's shared among different research projects in FAIR computer vision team.
Apache License 2.0
2.04k stars 229 forks source link

Error while running Detectron2 code through spyder #35

Open ghost opened 4 years ago

ghost commented 4 years ago

I am able to execute the Detectron2 script once but the next time I try to run it I get this error. It works once after I restart the kernel.

File "/home/user/anaconda3/lib/python3.7/site-packages/spyder_kernels/customize/spydercustomize.py", line 827, in runfile
    execfile(filename, namespace)

  File "/home/user/anaconda3/lib/python3.7/site-packages/spyder_kernels/customize/spydercustomize.py", line 110, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)

  File "/home/user/Table_Structure_Extract/Detectron2/detectron2/detectron2/Scripts/Table_Instance1.py", line 23, in <module>
    from detectron2.engine import DefaultTrainer

  File "/home/user/Prateek_Data/Table_Structure_Extract/Detectron2/detectron2/detectron2/engine/__init__.py", line 12, in <module>
    from .defaults import *

  File "/home/user/Table_Structure_Extract/Detectron2/detectron2/detectron2/engine/defaults.py", line 23, in <module>
    from detectron2.checkpoint import DetectionCheckpointer

  File "/home/user/Table_Structure_Extract/Detectron2/detectron2/detectron2/checkpoint/__init__.py", line 6, in <module>
    from . import catalog as _UNUSED  # register the handler

  File "/home/user/Table_Structure_Extract/Detectron2/detectron2/detectron2/checkpoint/catalog.py", line 133, in <module>
    PathManager.register_handler(ModelCatalogHandler())

  File "/home/user/anaconda3/lib/python3.7/site-packages/fvcore/common/file_io.py", line 768, in register_handler
    assert prefix not in PathManager._PATH_HANDLERS

AssertionError
dips4717 commented 4 years ago

@stepovr , are you able to solve this issue? I have a similar issue. It works but every time I need to restart kernel in Spyder.