Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to fix the error?
#3
(Apr-04-2021, 07:42 PM)bowlofred Wrote: The indentation of line 140 does not pair up with an earlier if, but instead with the while on line 44.

It is possible for a while loop to have an else clause, but not an elif, so this is an error. Which if were you expecting it to based off?

It can be difficult to keep track of such a long block of code with so many loops. I think it would be better if you could break it into parts with different functions rather than one long block. For instance make a function to ask for username/password and validation and return the credentials. Then that section doesn't have to wrap later portions.

Thanks.
Reply


Messages In This Thread
How to fix the error? - by Adrian_L - Apr-04-2021, 07:26 PM
RE: How to fix the error? - by bowlofred - Apr-04-2021, 07:42 PM
RE: How to fix the error? - by Adrian_L - Apr-04-2021, 07:48 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020