[英]I am getting “module is not callable” error while trying to port Python 2.7 script to Python 3.6 (the queue module…)?
This is what I have in Python 2.7: 这是我在Python 2.7中的功能:
from Queue import Queue
self.queue = Queue()
What I'm trying so far to port to 3.6 looks like this: 到目前为止,我正在尝试移植到3.6的内容如下:
import queue as queue
self.queue = queue()
But I'm getting "module is not callable"? 但是我收到“模块不可调用”的信息吗? I am bit of noob in Python :), it's likely a simple error, thanks! 我在Python中有点菜鸟:),这可能是一个简单的错误,谢谢!
In Python3 use 在Python3中使用
from queue import Queue
self.queue = Queue()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.