简体   繁体   English

AttributeError:'Queue'对象在python 2.7.x中没有属性'join'

[英]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.) (这不是整段代码。但我的函数只在这里给出了错误。)

multiprocessing.Queue is the wrong object. multiprocessing.Queue是错误的对象。 You want Queue.Queue , ie: 你想要Queue.Queue ,即:

import Queue
q = Queue.Queue()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Python 2.7.x中继承 - inheritance in python 2.7.x Python:AttributeError:'Point'对象没有属性'x' - Python: AttributeError: 'Point' object has no attribute 'x' Python 2.7 AttributeError:“ ResultSet”对象没有属性“ replace” - Python 2.7 AttributeError: 'ResultSet' object has no attribute 'replace' Python 2.7:AttributeError:“列表”对象没有属性“获取” - Python 2.7: AttributeError: 'list' object has no attribute 'get' Python 2.7 PyTesseract AttributeError:“ PixelAccess”对象没有属性“ split” - Python 2.7 PyTesseract AttributeError: 'PixelAccess' object has no attribute 'split' AttributeError:“模块”对象没有属性“ urlopen”(Python 2.7) - AttributeError: 'module' object has no attribute 'urlopen' (Python 2.7) Python 2.7 / Selenium 2 AttributeError:“ NoneType”对象没有属性“ group” - Python 2.7/Selenium 2 AttributeError: 'NoneType' object has no attribute 'group' python 2.7-CountVectorizer错误:AttributeError:'file'对象没有属性'lower' - python 2.7 - CountVectorizer error :AttributeError: 'file' object has no attribute 'lower' Python 2.7错误:“ AttributeError:'模块'对象没有属性'Unit'” - Python 2.7 error: “AttributeError: 'module' object has no attribute 'Unit'” 在Python 2.7.x中找到系列的总和 - Finding a sum of series in Python 2.7.x
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM