0

Please help! I have been looking through all of the many similar questions with no solution. I believe it is something simple that I am overlooking. I use zip() in multiple places in my code with no problem. However in this one function it keeps returning an unbound error. for whatever reason zip() is being treated as a variable rather than a function. I have tried changing the whitespace, moving the order of where it is called, calling with and without iterators and the list function. If I just call list() it will print a list. If I call zip() it gives the error.

po=request.form.getlist('org_ID')
it_or=request.form.getlist('it_or')
hl_or=request.form.getlist('hl_or')
promo=list(zip(po,it_or))
print(promo)

Again if I call promo=list(po) it works. Please save me

jesseCampeez
  • 97
  • 10

1 Answers1

2

You most likely have a variable named zip somewhere in your code. You answered your own question by saying zip is being treated as a variable.
Double check your code and change that variable name.
For future reference, do not use common module names as variable names. That is bad practice and leaders into issues like this one

Kasem Alsharaa
  • 892
  • 1
  • 6
  • 15