helper_functions and constants are not recognised as modules when running start.py or tests.py
tony-had opened this issue · 1 comments
tony-had commented
tfl-api-wrapper/tfl_api/tfl_api.py
Line 9 in 1cf9964
tfl-api-wrapper/tfl_api/tfl_api.py
Line 21 in 1cf9964
Steps To Reproduce
- Clone/download the repository on a clean environment.
- Install tfl_api using setup.py.
- Run start.py or tests.py.
Actual Result
Running start.py:
$ python start.py
Traceback (most recent call last):
File "start.py", line 3, in <module>
from tfl_api import TfLAPI
File "C:\Users\tonyh\tfl-api-wrapper\tfl_api\__init__.py", line 1, in <module>
from .tfl_api import Client, TfLAPI, Response
File "C:\Users\tonyh\tfl-api-wrapper\tfl_api\tfl_api.py", line 9, in <module>
from helper_functions import merge_two_dicts, log_bulk, debug_bulk
ModuleNotFoundError: No module named 'helper_functions'
Running tests.py:
$ python tests.py
Traceback (most recent call last):
File "tests.py", line 4, in <module>
from tfl_api import TfLAPI, Client, Response
File "C:\Users\tonyh\tfl-api-wrapper\tfl_api\__init__.py", line 1, in <module>
from .tfl_api import Client, TfLAPI, Response
File "C:\Users\tonyh\tfl-api-wrapper\tfl_api\tfl_api.py", line 9, in <module>
from helper_functions import merge_two_dicts, log_bulk, debug_bulk
ModuleNotFoundError: No module named 'helper_functions'
Expected Result
start.py and tests.py execute with no errors.
Workaround
from tfl_api.helper_functions import merge_two_dicts, log_bulk, debug_bulk
from tfl_api.constants import DEBUG_DATA_LEVEL, STOP_TYPES
juan-m12i commented
Thanks for your comment, I'll check it over the weekend, it's been a while since I've put it up.