How to fix indentation errors? : <p>I am getting an indentation error. I have already tried converting all tabs to spaces with my code editor and using autopep8</p>

<p>I am getting the following error: </p>

<pre><code>return (imgstring)
    ^
IndentationError: unexpected indent
</code></pre>

<p>Below is the code:</p>

<pre><code>def Barchart(id, title, data):

    bar_chart = pygal.Bar()
    bar_chart.title = title

    data_cols = data.split(':')
    for x in range(0, len(data_cols)):
        data_num = []
        data_cols_split = data_cols[x].split(',')

        for y in range(1, len(data_cols_split)):
            print(data_cols_split[y])
            data_num.append(int(data_cols_split[y]))

        bar_chart.add(str(data_cols_split[0]), data_num)

    bar_chart.render_to_png('barchart.png')


s3 = session.resource('s3')
data = open('barchart.png', 'rb')
amazonname = str(id) + '.png'
s3.Bucket(bucket).put_object(Key=amazonname, Body=data)
data.close()
with open("barchart.png", "rb") as imageFile:
  imgstring = base64.b64encode(imageFile.read())



 return (imgstring)
</code></pre>
