keras-faster-rcnn
keras-faster-rcnn copied to clipboard
UnboundLocalError: local variable 'code' referenced before assignment
After executing following line :
from data import pascal_voc_parser as p
getting error:
importing Jupyter notebook from /home/nd/keras-faster-rcnn-master/data/pascal_voc_parser.ipynb
UnboundLocalErrorTraceback (most recent call last)
<ipython-input-9-6e3d7e764de9> in <module>()
----> 1 from data import pascal_voc_parser as p
/home/nd/anaconda3/lib/python3.6/importlib/_bootstrap.py in _find_and_load(name, import_)
/home/nd/anaconda3/lib/python3.6/importlib/_bootstrap.py in _find_and_load_unlocked(name, import_)
/home/nd/anaconda3/lib/python3.6/importlib/_bootstrap.py in _load_unlocked(spec)
/home/nd/anaconda3/lib/python3.6/importlib/_bootstrap.py in _load_backward_compatible(spec)
<ipython-input-5-928f04d1cf08> in load_module(self, fullname)
38 code = self.shell.input_transformer_manager.transform_cell(cell.source)
39 # run the code in themodule
---> 40 exec(code, mod.__dict__)
41 finally:
42 self.shell.user_ns = save_user_ns
UnboundLocalError: local variable 'code' referenced before assignment
Waiting for response
@hiteshnitetc, I think I know what it is happening. And it has to do with how the jupyter notebook is being imported. I have a script here that does the import for me and I have placed it one of my personal projects (https://github.com/andersy005/themachine/blob/master/themachine/nbfinder.py).
Copy that script to your project working directory and getting back to me if it doesn't work and I will see what I can do to help.
wait, I just inspected the error and I think something else is going on. I will take a look at it and I will get back to you.
Have to got solution
You Got solution?