imp.load_source
jfigui opened this issue · 2 comments
jfigui commented
read_data_mxpol.py uses imp.load_source which is deprecated since Python 3.4
jfigui commented
Here is a discussion on an alternative:
pyinvoke/invoke#214
wolfidan commented
I added the following fix which is compatible with the current python 3.X version:
import importlib.util
spec = importlib.util.spec_from_file_location("metadata_config",
filename)
cfile = importlib.util.module_from_spec(spec)
spec.loader.exec_module(cfile)