TypeError: argument of type ‘WindowsPath‘ is not iterable 问题处理

问题描述: 修改python代码后,项目报错提示信息为:TypeError: argument of type 'WindowsPath' is not iterable

处理办法:

修改代码目录中settings.py文件。使用str(),包裹 BASE_DIR / 'db.sqlite3'

修改前:

 修改后

重启项目,再次修改项目中的代码,会自动加载,项目不会报错。

猜你喜欢

转载自blog.csdn.net/lee_yanyi/article/details/124886841
今日推荐