0

Here is my code:

from common.arguments import parse_args

"common" is a folder containing "arguments.py", but it's giving me "ModuleNotFoundError: No module named 'common.arguments'"

I'm sure I have the right folder and file in the directory. What did I do wrong?

wkl
  • 77,184
  • 16
  • 165
  • 176
Dan
  • 23
  • 3
  • Where are you trying to import the module and how is your project structured (I.e. please share your document tree)? – Herbert Jul 17 '22 at 21:02
  • Like @Herbert suggested, include project tree, python version details and how you are running the script (it matters where you call script from or you may be calling it as module with -m?). – bekirbakar Jul 17 '22 at 22:40
  • @Herbert@bekirbakar, project tree: VideoPose3D(run.py, common(arguments.py)). The line of code above is from run.py. I was running the script from the terminal: python run.py. The python version is 3.10.4 – Dan Jul 18 '22 at 01:07
  • The idea with module is already the correct path, I believe. Can you try to add an empty „__init__.py“ to you common folder and test it. What the init file does is described here: https://stackoverflow.com/questions/448271/what-is-init-py-for – Herbert Jul 19 '22 at 05:19

0 Answers0