【问题标题】:python manage.py runserver: AttributeError: 'module' object has no attribute 'select'python manage.py runserver:AttributeError:“模块”对象没有属性“选择”
【发布时间】:2013-01-07 12:59:00
【问题描述】:

运行命令后显示如下:

Validating models...

0 errors found

Django version 1.4.3, using settings 'app.settings'
Development server is running at localhost:8000/
Quit the server with CTRL-BREAK.
Unhandled exception in thread started by <bound method Command.inner_run of <dja
ngo.contrib.staticfiles.management.commands.runserver.Command object at 0x000000
00033BBD30>>
Traceback (most recent call last):
  File "c:\Python27\lib\site-packages\django-1.4.3-py2.7.egg\django\core\managem
ent\commands\runserver.py", line 111, in inner_run
    ipv6=self.use_ipv6, threading=threading)
  File "c:\Python27\lib\site-packages\django-1.4.3-py2.7.egg\django\core\servers
\basehttp.py", line 253, in run
    httpd.serve_forever()
  File "c:\Python27\Lib\SocketServer.py", line 225, in serve_forever
    r, w, e = select.select([self], [], [], poll_interval)
AttributeError: 'module' object has no attribute 'select'

知道问题是什么吗?

我已经尝试卸载并再次安装(setuptools、pypi、django、requests)

【问题讨论】:

  • 你的项目中有select.py吗?
  • @Wessie:很好的猜测。数不清我犯了多少次这个错误......
  • 已验证,我的项目中没有 select.py。我仍然收到错误:(我不知道它有什么问题
  • 你能贴一些代码吗?

标签: python django pypi


【解决方案1】:

我在使用 Flask 应用时遇到了这个问题。

我意识到我创建了一个名为“select.py”的脚本,所以我不得不重命名它并删除“select.pyc”。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-12-14
    • 2015-03-09
    • 2013-07-05
    • 1970-01-01
    • 1970-01-01
    • 2014-01-25
    • 2018-04-05
    • 2017-07-20
    相关资源
    最近更新 更多