DRKG icon indicating copy to clipboard operation
DRKG copied to clipboard

ModuleNotFoundError: No module named 'utils'

Open jdauvill opened this issue 3 years ago • 3 comments

Hi - When I try running this notebook, the 'utils' module is not found. (I have the CWD set to the directory where I downloaded the DRKG) Where should this 'utils' module be ?


ModuleNotFoundError Traceback (most recent call last) in 4 import sys 5 sys.path.insert(1, '../utils') ----> 6 from utils import download_and_extract 7 download_and_extract() 8 drkg_file = '../data/drkg/drkg.tsv'

ModuleNotFoundError: No module named 'utils'

jdauvill avatar Oct 21 '20 11:10 jdauvill

By "the directory where I downloaded the DRKG", do you mean the DRKG repo is in the CWD or the CWD is DRKG/?

mufeili avatar Oct 21 '20 18:10 mufeili

the CWD is DRKG/ -------- Message d'origine --------De : Mufei Li [email protected] Date : 21.10.20 20:25 (GMT+01:00) À : gnn4dr/DRKG [email protected] Cc : jdauvill [email protected], Author [email protected] Objet : {Disarmed} Re: [gnn4dr/DRKG] ModuleNotFoundError: No module named 'utils' (#19) By "the directory where I downloaded the DRKG", do you mean the DRKG repo is in the CWD or the CWD is DRKG/?

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.

jdauvill avatar Oct 21 '20 19:10 jdauvill

I think you can simply do

In [1]: pwd
Out[1]: '/Users/mufei/DRKG'

In [2]: from utils.utils import download_and_extract

mufeili avatar Oct 22 '20 09:10 mufeili