TypeError: makedirs() got an unexpected keyword argument 'exist_ok'
andresfiloso opened this issue · 1 comments
I follow the How to use instructions and a get this error:
(venv) afiloso@r518u:~/devs/flask-now-example$ flask-now -mvc
Creating extensionless flask app with mvc architecture pattern.
Installing requirements...
Freezing requirements...
Traceback (most recent call last):
File "/home/afiloso/.local/bin/flask-now", line 11, in <module>
sys.exit(main())
File "/home/afiloso/.local/lib/python2.7/site-packages/flask_now/now.py", line 12, in main
build()
File "/home/afiloso/.local/lib/python2.7/site-packages/flask_now/now.py", line 9, in build
architect.build()
File "/home/afiloso/.local/lib/python2.7/site-packages/flask_now/architect.py", line 109, in build
self.__identify()
File "/home/afiloso/.local/lib/python2.7/site-packages/flask_now/architect.py", line 14, in __identify
self.__create_mvc_architecture()
File "/home/afiloso/.local/lib/python2.7/site-packages/flask_now/architect.py", line 20, in __create_mvc_architecture
self.__create_mvc_app()
File "/home/afiloso/.local/lib/python2.7/site-packages/flask_now/architect.py", line 44, in __create_mvc_app
self.__create_config_file(filename="project/config.py")
File "/home/afiloso/.local/lib/python2.7/site-packages/flask_now/architect.py", line 30, in __create_config_file
os.makedirs(os.path.dirname(filename), exist_ok=True)
TypeError: makedirs() got an unexpected keyword argument 'exist_ok'
(venv) afiloso@r518u:~/devs/flask-now-example$
Thanks for writing this issue to me. Actually this project supports python3.x. As i see from your debug logs, you try to use python 2.7 and that's why you get this error.
Btw, this weekend i ll release a major version of this project, which will also support python 2. To quick but dirty solution for your current situation, please follow the following path:
-
Be sure that you have python 3 installed on your machine.
-
Create a virtualenvironment, there is a tutorial about it, how and why to use it
-
Than activate your virtualenvironment
-
After that you can install flask-now inside your virtualenvironment.(
pip install flask-now
) -
Than jump into usage part of documentation.
I hope it was clear for you, I'm also planning to automate virtualenvironment creation, docker deployment and so on.
Best,
Ozan