I keep getting random indentationError using OS X and Pycharm (Tried switching tabs and spaces in pycharm settings no luck). If I run the project under linux it works just fine. The below code attempts to upload the users from a csv, I've attempted to comment and different fields that dont exist in this group of users.
import csv
from django.contrib.auth import get_user_model
User = get_user_model()
members = open('Volunteers.csv', "rU")
data = csv.DictReader(members)
default_password = User.objects.make_random_password()
def generate_username(first_name, last_name):
    val = "{0}{1}".format(first_name[0], last_name[0]).lower()
    x = 0
    while True:
        if x == 0 and User.objects.filter(username=val).count() == 0:
            return val
        else:
            new_val = "{0}{1}".format(val, x)
            if User.objects.filter(username=new_val).count() == 0:
                return new_val
        x += 1
        if x > 1000000:
            raise Exception("Name is super popular!")
for row in data:
    email = row['Email']
    first_name = row['First Name'],
    last_name = row['Last Name'],
    username = generate_username(first_name, last_name)
    user = User.objects.create_user(username, email, default_password)
    user.is_staff = False
    user.volunteer = True
    user.active = row['Active']
    user.first_name = row['First Name']
    user.last_name = row['Last Name']
    user.organization = row['Organization']
    user.interview = row['Interview']
    user.house_number_street_name = row['Address']
    user.state = row['State']
    user.city = row['City']
    user.zip_code = row['Zip Code']
    user.daytime_phone = row['Daytime Phone']
    user.home_phone = row['Home Phone']
    user.cell_phone = row['Cell Phone']
    user.organization = row['Organization']
    user.emergency_contact = row['Emergency Contact']
    user.days_available = row['Days Available']
    user.food_pantry = row['Food Pantry']
    user.interview = row['Interview']
    user.bi_lingual = bool(row['Bilingual'])
    user.fund_raising = row['Fund Raising']
    user.board_member = row['Board Member']
    user.sunshine_committee = row['Sunshine Committe']
    user.solicit_donations = row['Solicit Donations']
    user.record_keeping = row['Record Keeping']
    user.truck_or_van = row['Truck or Van']
    user.pick_up_food = row['Pick up Food']
    user.deliver_food = row['Deliver Food']
    user.save()
    # user.comments = row['Comments']
    # user.drivers_licence = row['Drivers Licence Number']
    # user.unemployment = row['Unemployment']
    # user.food_stamps = row['Food Stamps']
    # user.disability = row['Disability']
    # user.salary = row['Salary']
    # user.pension = row['Pension']
    # user.ss_ssi = row['Social and Supplemental Income']
The logs
IndentationError: unexpected indent
>>>     user.record_keeping = row['Record Keeping']
  File "<console>", line 1
    user.record_keeping = row['Record Keeping']
    ^
IndentationError: unexpected indent
>>>     user.truck_or_v    user.truck_or_v    ]
  File "<console>", line 1
    user.truck_or_v    user.truck_or_v    ]
    ^
IndentationError: unexpected indent
>>>     user.pick_up_food = row['Pick up Food']
  File "<console>", line 1
    user.pick_up_food = row['Pick up Food']
    ^
IndentationError: unexpected indent
>>>     user.deliver_food = row['Deliver Food']
  File "<console>", line 1
    user.deliver_food = row['Deliver Food']
    ^
IndentationError: unexpected indent
>>>     user.save()
  File "<console>", line 1
    user.save()
    ^
Updated code that will run in reference to comment below asking to comment out lines with errors.
import csv
from django.contrib.auth import get_user_model
User = get_user_model()
members = open('Volunteers.csv', "rU")
data = csv.DictReader(members)
default_password = User.objects.make_random_password()
def generate_username(first_name, last_name):
    val = "{0}{1}".format(first_name[0], last_name[0]).lower()
    x = 0
    while True:
        if x == 0 and User.objects.filter(username=val).count() == 0:
            return val
        else:
            new_val = "{0}{1}".format(val, x)
            if User.objects.filter(username=new_val).count() == 0:
                return new_val
        x += 1
        if x > 1000000:
            raise Exception("Name is super popular!")
for row in data:
    email = row['Email']
    first_name = row['First Name'],
    last_name = row['Last Name'],
    username = generate_username(first_name, last_name)
    user = User.objects.create_user(username, email, default_password)
    user.is_staff = False
    user.volunteer = True
    user.active = row['Active']
    user.first_name = row['First Name']
    user.last_name = row['Last Name']
    user.organization = row['Organization']
    user.interview = row['Interview']
    user.house_number_street_name = row['Address']
    user.state = row['State']
    user.city = row['City']
    user.zip_code = row['Zip Code']
    user.daytime_phone = row['Daytime Phone']
    user.save()
    # user.home_phone = row['Home Phone']
    # user.cell_phone = row['Cell Phone']
    # user.organization = row['Organization']
    # user.emergency_contact = row['Emergency Contact']
    # user.days_available = row['Days Available']
    # user.food_pantry = row['Food Pantry']
    # user.interview = row['Interview']
    # user.bi_lingual = bool(row['Bilingual'])
    # user.fund_raising = row['Fund Raising']
    # user.board_member = row['Board Member']
    # user.sunshine_committee = row['Sunshine Committe']
    # user.solicit_donations = row['Solicit Donations']
    # user.record_keeping = row['Record Keeping']
    # user.truck_or_van = row['Truck or Van']
    # user.pick_up_food = row['Pick up Food']
    # user.deliver_food = row['Deliver Food']
    # user.save()
    # user.comments = row['Comments']
    # user.drivers_licence = row['Drivers Licence Number']
    # user.unemployment = row['Unemployment']
    # user.food_stamps = row['Food Stamps']
    # user.disability = row['Disability']
    # user.salary = row['Salary']
    # user.pension = row['Pension']
    # user.ss_ssi = row['Social and Supplemental Income']
