-2
  File "actions2.py", line 527
    if path.exists('Server/www/index.html'):
                                           ^
IndentationError: unindent does not match any outer indentation level

i keep getting that error, here my script btw, ive tried many things still kept getting this error please help me im about to die

def instagrambar():# It puts instagram (instagram.png) file name in inception-bar script we added in index page
                system("cp WebPages/INCEPTION-BAR/instagram.png /Server/www/ && cp WebPages/INCEPTION-BAR/background-bar.png /Serve$
        if path.exists('Server/www/index.html'):
         with open('Server/www/index.html') as f:
             read_data = f.read()
         c = read_data.replace('''<INCEPTION>''', '''instagram''')
         f = open('Server/www/index.html', 'w')
         f.write(c)
         f.close()
         print(_("\n{0}[{1}#{0}]INSTAGRAM INCEPTION-BAR{0} ADDED !!!").format(RED, DEFAULT)) 
         sleep(2)
1

1 Answer 1

1

Give it a try: You have given extra tabs for the data inside the function

def instagrambar():# It puts instagram (instagram.png) file name in inception-bar script we added in index page
    system("cp WebPages/INCEPTION-BAR/instagram.png /Server/www/ && cp WebPages/INCEPTION-BAR/background-bar.png /Serve$")
    if path.exists('Server/www/index.html'):
        with open('Server/www/index.html') as f:
            read_data = f.read()
        c = read_data.replace('''<INCEPTION>''', '''instagram''')
        f = open('Server/www/index.html', 'w')
        f.write(c)
        f.close()
        print(_("\n{0}[{1}#{0}]INSTAGRAM INCEPTION-BAR{0} ADDED !!!").format(RED, DEFAULT)) 
        sleep(2)
Sign up to request clarification or add additional context in comments.

6 Comments

File "actions2.py", line 557 else: ^ IndentationError: unindent does not match any outer indentation level
File "actions2.py", line 557 else: ^ IndentationError: unindent does not match any outer indentation level
Code?????? Where is the code you are getting error in bro. I can't help you if i don't know where and what is the problem exactly so plz share a anippet of code
paste your code here textb.org/t/rocky full code i mean the complete function
i did it go check it
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.