Python Forum
HELP! unindent does not match any outer indentation level
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HELP! unindent does not match any outer indentation level
#1
Hi everyone i'm trying to print my code, but it's telling me:
"unindent does not match any outer indentation level"


Here is my code:
#Adding user input to a dictionary # Create an empty dictionary rental_properties = {} # set a flag to indicate we taking applications rental_open = True while rental_open:	# prompt users for user name and address.	username = input("\nWhat is your name? ")	rental_properties = input("What is the address of the property that you have to rent") # store the responses in a dictionary	rental_properties[username] = rental_properties # Ask if the user know anyone else looking to rent property repeat = input("\nDo you know anyone who might like to rent out their property?") if repeat == "no": rental_open = False # adding property is complete	print("\n--- Property to rent ---") for username, rental_properties in rental_properties.items():	print(username + " has " + rental_properties + " to rent.")
Reply
#2
Always post the full traceback you get, in error tags. It show where the problem is.
The indentation of line 19 is wrong. You need to indent it 2 more spaces (for a total indentation of 2x4 spaces)
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
Thank you so much i've been going crazy all night trying to figure out why my code didn't work.
Sorry for not posting the full traceback, i will next time. Thank u again :)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Pandas Outer merge skollu826 2 1,539 Apr-20-2024, 06:28 PM
Last Post: deanhystad
  can Inner Class reference the Outer Class's static variable? raykuan 6 10,881 Jul-01-2022, 06:34 AM
Last Post: SharonDutton
  Level curves don't match after rotation schniefen 1 2,560 Dec-14-2020, 09:56 PM
Last Post: schniefen
  Unindent does not match any outer intendation level -error MaartenRo 3 3,804 Jun-28-2020, 11:46 AM
Last Post: MaartenRo
  unindent does not match any outer indentation level , How can i fix it the_fire_pharaoh 2 3,821 Jan-01-2019, 10:52 AM
Last Post: the_fire_pharaoh
  Outer loop not running ted_gress 2 4,611 Aug-25-2018, 07:56 AM
Last Post: volcano63
  unindent does not match any outer indentation level tonyk334 4 6,843 Mar-18-2018, 04:40 AM
Last Post: Larz60+

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020
This forum uses Lukasz Tkacz MyBB addons.
Forum use Krzysztof "Supryk" Supryczynski addons.