Pycharm报错 TypeError: argument of type ‘WindowsPath‘ is not iterable 问题处理【转】

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

Pycharm报错 TypeError: argument of type ‘WindowsPath‘ is not iterable 问题处理【转】

处理办法:

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

修改前:

Pycharm报错 TypeError: argument of type ‘WindowsPath‘ is not iterable 问题处理【转】

修改后

Pycharm报错 TypeError: argument of type ‘WindowsPath‘ is not iterable 问题处理【转】

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

转自
版权声明:本文为CSDN博主「lee_yanyi」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/lee_yanyi/article/details/124886841

Original: https://www.cnblogs.com/paul8339/p/16469276.html
Author: paul_hch
Title: Pycharm报错 TypeError: argument of type ‘WindowsPath‘ is not iterable 问题处理【转】

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/552976/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球