【问题标题】:Undefined Variable 'os' pylint(undefined-variable) [57,18]未定义变量 'os' pylint(undefined-variable) [57,18]
【发布时间】:2020-08-09 18:20:15
【问题描述】:

我卡在这里,不知道为什么会出现这个错误。enter image description here

【问题讨论】:

  • 你需要导入操作系统
  • 欢迎来到 StackOverflow。请参阅这篇文章,了解为什么不认为发布代码图片是好的做法:meta.stackoverflow.com/questions/285551/…
  • 我也有同样的问题。 'import os' 帮助了我。我不知道为什么这个问题被否决...

标签: python django visual-studio-code pylint


【解决方案1】:

import os 添加到您的settings.py

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-02-17
    • 1970-01-01
    • 2011-01-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多