Django启动时提示AttributeError: ‘WindowsPath’ object has no attribute ‘rstrip’ 真是烦,每次环境不同,一运行Django项目就提示该错误,真他妈的烦死个人 不使用BASE_DIR = Path(file).resolve().parent.parent,使用之前版本的创建方式:BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(file)))