KeyError / frozen importlib._bootstrap error on second library import in spyder
问题 I receive a File " <frozen importlib._bootstrap_external> ", line 978, in _get_parent_path KeyError: 'python_library' error when I import a library from a subfolder the second time in spyder, but the first time (after restarting spyder) or outside of spyder it works fine. The code is: from python_library.tools.test_lib import test_func test_func() where test_lib.py is simply def test_func(): print('Hello!') And the output is: runfile('/home/user/Desktop/test.py', wdir='/home/user/Desktop')