in compat.py you are importing the Class Queue from the module Queue
from queue import Queue as Queue
in
you are looking for the exception
Queue.Empty from the module
Queue not the Class
Queue
This will give the exception AttributeError: type object 'Queue' has no attribute 'Empty'. Did you mean: 'empty'?