This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tim.peters
Recipients Python_dev_IL, rhettinger, tim.peters
Date 2020-03-28.20:35:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1585427734.12.0.415999313772.issue40097@roundup.psfhosted.org>
In-reply-to
Content
Raymond is talking about the cause of this error in what you showed:

AttributeError: 'Queue' object has no attribute 'Empty'

The exception you're _trying_ to catch is "queue.Empty", where "queue" is the queue _module_.  But you rebound the name "queue" to an instance of the queue.Queue class.  As the AttributeError message says, an instance of that class has no "Empty" attribute.

You need to change this line:

  queue = queue.Queue()

Pick a different name, so the _intended_ "queue.Queue" still works.
History
Date User Action Args
2020-03-28 20:35:34tim.peterssetrecipients: + tim.peters, rhettinger, Python_dev_IL
2020-03-28 20:35:34tim.peterssetmessageid: <1585427734.12.0.415999313772.issue40097@roundup.psfhosted.org>
2020-03-28 20:35:34tim.peterslinkissue40097 messages
2020-03-28 20:35:33tim.peterscreate