3.8
13 Dec, 2019
19.2.3
pip install virtualenv
virtualenv venv
venv\Scripts\activate
pip install -r requirements.txt
ERROR: Could not find a version that satisfies the requirement pypiwin32==220; sys_platform == "win32" and python_version >= "3.6" (from docker==3.4.0->-r requirements.txt (line 14)) (from versions: 219, 223)
ERROR: No matching distribution found for pypiwin32==220; sys_platform == "win32" and python_version >= "3.6" (from docker==3.4.0->-r requirements.txt (line 14))
Remove Line 14 to 17 from requirements.txt
docker==3.4.0
docker-compose==1.21.2
docker-pycreds==0.3.0
dockerpty==0.4.1
Created .env
file. Added the content below -
set "FLASK_ENVIRONMENT_CONFIG=dev"
set "SECRET_KEY=nice_secret"
set "SECURITY_PASSWORD_SALT=something_salty"
set "MAIL_DEFAULT_SENDER=username"
set "MAIL_SERVER=smtp.gmail.com"
set "[email protected]"
set "APP_MAIL_PASSWORD=pass"
python run.py
AttributeError: module 'time' has no attribute 'clock'
Mentioned here in the Python Docs
The function time.clock() has been removed, after having been deprecated since Python 3.3: use time.perf_counter() or time.process_time() instead, depending on your requirements, to have well-defined behavior. (Contributed by Matthias Bussonnier in bpo-36895.)
- Changed mentorship-backend\venv\lib\site-packages\sqlalchemy\util\compat.py", line 172:
-
time_func = time.clock
-
time_func = time.perf_counter
- Changed mentorship-backend\venv\lib\site-packages\flask_sqlalchemy_init_.py", line 39:
-
_timer = time.clock
-
_timer = time.perf_counter
It runs! 🎉
500 Internal server error with User created successfully. Suspect .env
file not getting read.
Changed .env
file to -
FLASK_ENVIRONMENT_CONFIG=dev
SECRET_KEY=nice_secret
SECURITY_PASSWORD_SALT=something_salty
MAIL_DEFAULT_SENDER=username
MAIL_SERVER=smtp.gmail.com
[email protected]
APP_MAIL_PASSWORD=password
Didn't Work!
Copied the entire previous .env
file into terminal, this works. Should add the following lines for making this permanent -
In File: mentorship-backend/venv/Scripts/activate Content:
set "FLASK_ENVIRONMENT_CONFIG=dev"
set "SECRET_KEY=nice_secret"
set "SECURITY_PASSWORD_SALT=something_salty"
set "MAIL_DEFAULT_SENDER=username"
set "MAIL_SERVER=smtp.gmail.com"
set "[email protected]"
set "APP_MAIL_PASSWORD=password"
This works. Life is good!
187 tests passed.
Goodnight!
(Guess who discovered he put his password in the details above. Sigh. Ctrl+C to Ctrl+V)