Django项目 进入数据库迁移的时候出现 TypeError: argument of type ‘WindowsPath’ is not iterable

Django项目 进入数据库迁移的时候出现 TypeError: argument of type ‘WindowsPath’ is not iterable

问题描述——TypeError: argument of type ‘WindowsPath’ is not iterable

Django项目 进入数据库迁移的时候出现 TypeError: argument of type ‘WindowsPath’ is not iterable_第1张图片

问题原因

错误分析:是这个路径不能在win系统上面运行时候被识别为winowsPath的路径

解决方法

找到Django目录下的settings配置文件,在该文件中有一个叫DATABASES的部分,DATABASES由字典构成,将内部一个键名为’NAME’的值,用str()包裹。更改后重新进行数据库的迁移命令

修改前:

你可能感兴趣的:(1024程序员节)