Why do I get this error? What does this error mean?

Isaac Guillen

I am working on a login system in python as practice and I keep on getting this error when I try to make a for loop..."Non-iterable value SignUp is used in an iterating context"

from SignUp import SignUp

userName = input("Enter a username: ")
userPass = input("Enter a password: ")

sign_up = SignUp(userName, userPass)

for user in SignUp:
    newData = open("data.txt", "a")
    newData.write(userName, userPass)
    newData.close()

What does this error mean and how can I solve it?

sri

You will need to make SignUp class iterable. Depending on what SignUp class is meant for, you will need to implement __iter__() function inside your class. This link gives some examples of how to implement the same. for loop internally uses the iterator protocol and hence we need to use an object that is iterable.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Why do I get a 'None" Response for this? What does this mean exactly?

What does "error: '.class' expected" mean and how do I fix it

What does this error mean that I get when trying to start an emulator?

Why does the JUnit not work and why do I get an error?

What does this error mean?

"local variable 'e' referenced before assignment" what does this error mean? How do I fix this error?

What does Any mean in this context? Why does adding `:Any` get rid of the compiler error?

Why do I get this error when working with selenium ?? And what is the solution?

What does this python2 error mean, and what should I do about it?

What does this error mean? and why does it keep appearing?

Why do i get question mark in console instead of a double value / NaN and what does it mean?

Error: No value given for one or more required parameters. What does this mean? How do I fix?

'No module named 'deploy' : What does this error mean and how do I fix it?

What does this error mean Unsupported class file major version 56 and how do I fix it?

What does this error mean when I use `os.walk` to get the files path on python 3?

What does this C pointer error mean? Why is it happening this way

Why do I get syntax error but in same cmd if I remove else block it does not give syntax error?

Error 57 - what does it mean?

What does this error message mean?

What does this dtrace error mean?

What does _("write error") mean?

What does this Java error mean?

What does this valgrind error mean?

What does this linking error mean?

What does this Flow error mean?

What does EADDRINUSE error mean?

What does this error mean with StratifiedShuffleSplit?

What does this ansible error mean?

What does ?? () in segfault error mean?