-2

I tried creating the user-defined module for my project but my script is getting failed with an error message

ModuleNotFoundError: No module named 'Config'

The structure of my project is like this:

Project <Folder>
   |
   --- Config <Folder>
   |        |
   |        --- __init.py__
   |        --- Config.py
   --- Test cases
            |
            --- Testcase1.py

And the content of Testcase1.py is

import Config as config
print (config.main_url)
mkrieger1
  • 19,194
  • 5
  • 54
  • 65

1 Answers1

0

Your user-defined module should be in the same directory.