在Azure应用程序服务上的Django应用程序中获取错误

发布于 2025-02-02 17:07:59 字数 154 浏览 2 评论 0原文

从昨天开始,我从昨天起就开始努力工作,早期的升级效果

很好

错误:模块'键入'没有属性'_classvar'

我的python env是3.7和django版本2.1.3

I am getting since yesterday on appliction from yesterday it's working fine early some upgradtion on cloud breaks the application

This is the error

Error : module 'typing' has no attribute '_ClassVar'

My python env is 3.7 and Django version 2.1.3

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

桃扇骨 2025-02-09 17:08:00

请检查以下步骤是否有助于解决该问题:

  • 尝试将Python版本降低到3.6并进行检查。
  • 另外,在使用Python版本3.7时,运行此命令pip卸载dataclasses
  • 如Charlie V所说,

在您的应用服务中查看Python的版本与您使用的版本。检查需求文件并将其与您的开发进行比较。

Please check the below steps if that helps to fix the issue:

  • Try downgrading the Python version to 3.6 and check.
  • Also, run this command pip uninstall dataclasses when using the Python Version 3.7
  • As Charlie V Said,

Check the version of the Python in your App Service versus the version you use to develop. Check the requirements file and compare that with your development.

请止步禁区 2025-02-09 17:08:00

我过去遇到了类似的问题。第一件事是确定您的应用程序是否实际使用此模块。如果是,请确保您根据自己的要求有它。如果否,请参阅日志以了解哪个Python文件正在引用它并删除其参考。

I had a similar problem in the past. The first thing is determine if your application is actually using this module. If yes, make sure you have it at your requirements.txt. If no, refer to the logs to understand which python file is referencing it and remove the reference for it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文