Python 2.7 Python 2.7发行版中的Queue.put.nowait问题
环境:使用WinPython或Anaconda Python的Windows 10 我正在使用QT4调试python 2.7代码。软件(MakeHuman)正在尝试将ipython控制台作为外壳安装。这产生了一个例外:Python 2.7 Python 2.7发行版中的Queue.put.nowait问题,python-2.7,ipython,pyqt4,anaconda,Python 2.7,Ipython,Pyqt4,Anaconda,环境:使用WinPython或Anaconda Python的Windows 10 我正在使用QT4调试python 2.7代码。软件(MakeHuman)正在尝试将ipython控制台作为外壳安装。这产生了一个例外: > Could not load 7_shell Traceback (most recent call last): File > "./core\mhmain.py", line 541, in loadPlugin > module.load(
> Could not load 7_shell Traceback (most recent call last): File
> "./core\mhmain.py", line 541, in loadPlugin
> module.load(self) File "plugins/7_shell.py", line 226, in load
> taskview = category.addTask(ShellTaskView(category)) File "plugins/7_shell.py", line 67, in __init__
> self.console = self.addTopWidget(ipythonconsole.IPythonConsoleWidget()) File
> "./lib\ipythonconsole.py", line 131, in __init__
> self.ipyConsole = _QIPythonWidget(customBanner="Welcome to MakeHuman the embedded ipython console\n") File
> "./lib\ipythonconsole.py", line 80, in __init__
> kernel_client.start_channels() File "C:\Anaconda2\envs\MakeHuman\lib\site-packages\qtconsole\kernel_mixins.py",
> line 43, in start_channels
> super(QtKernelClientMixin, self).start_channels(*args, **kw) File
> "C:\Anaconda2\envs\MakeHuman\lib\site-packages\ipykernel\inprocess\client.py",
> line 64, in start_channels
> super(InProcessKernelClient, self).start_channels() File "C:\Anaconda2\envs\MakeHuman\lib\site-packages\jupyter_client\client.py",
> line 102, in start_channels
> self.kernel_info() File "C:\Anaconda2\envs\MakeHuman\lib\site-packages\ipykernel\inprocess\client.py",
> line 137, in kernel_info
> self._dispatch_to_kernel(msg) File "C:\Anaconda2\envs\MakeHuman\lib\site-packages\ipykernel\inprocess\client.py",
> line 168, in _dispatch_to_kernel
> self.session.send(stream, msg) File "C:\Anaconda2\envs\MakeHuman\lib\site-packages\jupyter_client\session.py",
> line 684, in send
> stream.send_multipart(to_send, copy=copy) File "C:\Anaconda2\envs\MakeHuman\lib\site-packages\ipykernel\inprocess\socket.py",
> line 56, in send_multipart
> self.queue.put_nowait(msg_parts) AttributeError: 'Queue' object has no attribute 'put_nowait'
这个问题似乎是Python2.7库的内部问题,与MakeHuman代码本身无关。然而,我对WinPython和Python 2.7的Anaconda Python发行版都有同样的问题
这似乎是记录在案的标准:
似乎WinPython和Anaconda Python都没有正确处理“Queue.put_nowait”
有人能告诉我这是否是这些发行版的2.7库中的一个真正的bug吗?如果是,我如何(正确地)克服这个问题
以下是指向我在WinPython端的线程的链接:
您能否调整代码以打印出
类型(self.queue)
并查看它是什么以及从何处导入的?我想知道是否有什么东西覆盖了队列模块。您是否可以调整代码以打印出类型(self.queue)
,并查看它是什么以及从何处导入的?我想知道是否有什么东西覆盖了队列模块。