Closed SuperTyrael closed 3 years ago
You need create a log file named blogin.log on the /Users/liam/Desktop/Git/Blogin/logs/ directory.
Hi, after I added that file, another error occured:
File "/Users/liam/Desktop/Git/Blogin/blogin/__init__.py", line 212, in admin
avatar='/static/img/admin/admin.jpg')
File "<string>", line 4, in __init__
File "/Users/liam/Desktop/Git/Blogin/env/lib/python3.7/site-packages/sqlalchemy/orm/state.py", line 433, in _initialize_instance
manager.dispatch.init_failure(self, args, kwargs)
File "/Users/liam/Desktop/Git/Blogin/env/lib/python3.7/site-packages/sqlalchemy/util/langhelpers.py", line 69, in __exit__
exc_value, with_traceback=exc_tb,
File "/Users/liam/Desktop/Git/Blogin/env/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
raise exception
File "/Users/liam/Desktop/Git/Blogin/env/lib/python3.7/site-packages/sqlalchemy/orm/state.py", line 430, in _initialize_instance
return manager.original_init(*mixed[1:], **kwargs)
File "/Users/liam/Desktop/Git/Blogin/blogin/models.py", line 61, in __init__
self.generate_avatar()
File "/Users/liam/Desktop/Git/Blogin/blogin/models.py", line 75, in generate_avatar
files = icon.generate(self.username)
File "/Users/liam/Desktop/Git/Blogin/env/lib/python3.7/site-packages/flask_avatars/identicon.py", line 220, in generate
self.save(image_byte_array, save_location=os.path.join(path, '%s_%s.png' % (text, suffix[size])))
File "/Users/liam/Desktop/Git/Blogin/env/lib/python3.7/site-packages/flask_avatars/identicon.py", line 82, in save
with open(save_location, 'wb') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/liam/Desktop/Git/Blogin/uploads/avatars/liam123456_s.png'
操作出现异常,退出...
@weijiang1994
I forgot to upload some necessary directories, please wait a moment and then you can manually create the directory by yourself, or re-clone the code of my repo。
OK, it runs well after I created that file. Thank you SO MUCH for sharing this project with us, that's really helpful for fresh like me.