Unknown Syntax Error in Code
You got pretty close TheMinecraftMan757, i've seen many people struggle with that tutorial over the last 3 or 4 years. I think even some of the function calls have been changed. 

as Gandalf points out:


  to scale_apply() on line 24 should be transform_apply(scale=True)


At the time the tutorial was written, the function call was scale_apply(), but it was changed to a more general apply function that can apply not just scale, but rotation and location. You would never have figured that out in a million years without a bit of googling or more familiarity with bpy. 

here's my minimized interpretation of that code.

import bpy

rows = 5
columns = 5

def spiral(X, Y):
    scn = bpy.context.scene  # an alias, lets you use scn shorthand
    x = y = 0
    dx = 0
    dy = -1
    for i in range(max(X, Y)**2):
        if (-X/2 &lt; x &lt;= X/2) and (-Y/2 &lt; y &lt;= Y/2):
            bpy.ops.mesh.primitive_cube_add(location = (x, y, 1))
            obj = bpy.context.active_object

            scn.cursor_location = obj.location
            scn.cursor_location.z -= 1
            bpy.ops.object.origin_set(type="ORIGIN_CURSOR")
            obj.scale = (0.5, 0.5, 7)

            bpy.ops.object.transform_apply(scale=True)
            bpy.ops.anim.keyframe_insert_menu(type='Scaling')

            action = obj.animation_data.action
            action.fcurves[0].lock = True
            action.fcurves[1].lock = True

            bpy.context.area.type = 'GRAPH_EDITOR'

            step = 20000 / (rows * columns)
            fp = r"C:\Gannon\Blender\Sounds\Music\Batty McFadden.mp3"
            bpy.ops.graph.sound_bake(filepath=fp, low=i*step, high=i*step+step)
            action.fcurves[2].lock = True

        if x == y or (x &lt; 0 and x == -y) or (x &gt; 0 and x == 1-y):
            dx, dy = -dy, dx
        x, y = x+dx, y+dy

spiral(rows, columns)


If you don't set the path to a valid one, then you can get errors like

RuntimeError: Error: Unsupported audio format


remarks:


On windows use r'C:\your\file\destination.mp3', the r turns the quoted string that follows it into a raw string literal, this is perfect for filepaths. 
On linux you should really know how to compose a path, but if you're new to it, it might be something like: '/homes/your_user_name/music/some_tune.mp3'
This code can take a long time to bake each graph. Even with a 5*5 grid, it will bake the entire graph 25 times. Here's a version which places a print statement just before it starts baking each iteration, you will need to have the terminal/cmd-prompt open before running the command.




a simple script to test your mp3 filepath, but it is really worth your time to read the python docs about paths

import os

# on windows, string prefix r is used to avoid the need for double backslashes
# filepath = 'C:\\Gannon\\Blender\\Sounds\\Music\\Batty McFadden.mp3'
filepath = r'C:\Gannon\Blender\Sounds\Music\Batty McFadden.mp3'

# on POSIX systems (linux, osx)
# filepath = '/home/zeffii/cookoo_22may_2011.mp3'

found = os.path.exists(filepath)
if found:
    print('yes, this file was found')
else:
    print('nope, the path does not exist')