Tony Stark
Tony Stark

Reputation: 35

AttributeError: 'Queue' object has no attribute 'join' in python 2.7.x

import multiprocessing
q = multiprocessing.Queue() 

def create_jobs():
    for link in file_to_set(QUEUE_FILE):
        q.put(link)
    q.join() **#here i'm getting Attribute Error**
    crawl()

(this is not whole snippet of code. but my function gives error only here.)

Upvotes: 3

Views: 4699

Answers (1)

Alex Hall
Alex Hall

Reputation: 36033

multiprocessing.Queue is the wrong object. You want Queue.Queue, i.e.:

import Queue
q = Queue.Queue()

Upvotes: 5

Related Questions