[issue40097] Queue.Empty issue - Python3.8

2020-03-28 Thread Guy Kogan
Guy Kogan added the comment: Thanks Tim Peters and Raymond Hettinger, the issue has been resolved. Have a nice day! -- resolution: -> works for me stage: -> resolved status: open -> closed ___ Python tracker

[issue40097] Queue.Empty issue - Python3.8

2020-03-28 Thread Tim Peters
Tim Peters added the comment: > ... so the _intended_ "queue.Queue" still works. Oops. Of course that should have said: > ... so the _intended_ "queue.Empty" still works. -- ___ Python tracker

[issue40097] Queue.Empty issue - Python3.8

2020-03-28 Thread Tim Peters
Tim Peters added the comment: 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

[issue40097] Queue.Empty issue - Python3.8

2020-03-28 Thread Guy Kogan
Guy Kogan added the comment: I still dont understand what do you mean? Can you please elaborate? -- ___ Python tracker ___ ___

[issue40097] Queue.Empty issue - Python3.8

2020-03-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: There's an error in your code: import queue # loads the standard library queue module ... queue = queue.Queue() # reassign queue to an instance of Queue ... except queue.Empty: # expects "queue" the module, not the

[issue40097] Queue.Empty issue - Python3.8

2020-03-28 Thread Guy Kogan
New submission from Guy Kogan : Python 3.8 Queue module is unable to handle the expection: error: Exception in thread Thread-5: Traceback (most recent call last): File "FTP_multithreading.py", line 17, in run new_connection = self.queue.get(timeout=2) File