file: api_information.py
`import requests
def OpenProfile():`
file: Connect_selenium.py
from Api.api_automation import OpenProfile
However after running I get the error message:
** from Api.api_automation import OpenProfile
ModuleNotFoundError: No module named ‘Api’**
How should I fix it?
>Solution :
If you’re running Connect_selenium.py while in the Auto_Selenium directory it will not be able to find the Api directory to use as a module. To solve this, you can call Connect_selenium.py outside the directory with:
$ python3 Auto_Selenium/Connect_selenium.py
Also, add an __init__.py file to the Api directory.