Ever since i'v started to load variables from separate file I encountered failure during running python programs with batch files with selenium webdriver.
lets say i have:
project/
│
│── project/
│ ├── schedule.py
│ └── database/
| └── config.py
inside scheudle.py i got this lines:
from database.config import *
driver = Chrome(options=c_options)
driver.get(url)
password_field = driver.find_element_by_id('password')
password_field.clear()
password_field.send_keys(password)
and inside config.py i got this lines:
password = keyring.get_password(...)
the error i get:
password_field.send_keys(password)
{'text': "".join(keys_to_typing(value)),
for i in range(len(val)):
TypeError: object of type 'NoneType' has no len()
But note this, after i'm opening the python file itself in PyCharm, everything works fine, the batch and all, even if i close PyCharm, its like its loading the vars or something...
I would love to know how to fix this problem, Thanks.
import *, makes everything ambiguous. Consider readingPEPguidelines python.org/dev/peps/pep-0008