r/learnpython • u/First-Ad6991 • 4d ago
i got UnboundLocalError: local variable 'queue' referenced before assignment, how to fix please
def main(ips, users, passwords, ThreadNumber):
queue = queue.Queue(maxsize=20000)
for t in range(ThreadNumber):
try:
t = Apophis(queue)
t.daemon = True
t.start()
except Exception as e:
break
2
Upvotes
View all comments
Show parent comment
2
u/First-Ad6991 4d ago
it worked, thanks.