简体   繁体   中英

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:

from Queue import Queue
self.queue = Queue()

What I'm trying so far to port to 3.6 looks like this:

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!

In Python3 use

from queue import Queue
self.queue = Queue()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM