Audio Visualizer Script Error I knows lots of people have been having problems with this tutorial but I haven't found anyone with the specific problem that I have (I've been looking for a while).

The script I have so far:

import bpy


rows = 5
columns = 5

r = 0
c = 0

for i in range(0, rows*columns):
    if c == columns:
        r += 1
        c = 0

    bpy.ops.mesh.primitive_cube_add(location = (r, c, 0))
    bpy.context.scene.cursor_location = bpy.context.active_object.location
    bpy.context.scene.cursor_location.z -= 1
    bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
    bpy.ops.object.transform_apply(scale=True)

    bpy.context.active_object.scale.x = 0.5
    bpy.context.active_object.scale.y = 0.5
    bpy.context.active_object.scale.z = 5

    bpy.ops.anim.keyframe_insert_menu(type='Scaling')

    bpy.context.active_object.animation_data.action.fcurves[0]. lock = True

    bpy.context.active_object.animation_data.action.fcurves[1]. lock = True

    bpy.context.area.type = 'GRAPH_EDITOR'

    step = 100000/ (rows*columns)

    bpy.ops.graph.sound_bake(filepath="C:\Users\Stephen\Music\Arcade Blaster - Reboot.wav", low=i*step, high=i*step + step)

    bpy.context.active_object.animation_data.action.fcurves[2]. lock = true

    c += 1




I don't understand any of the error.

Can someone help solve/explain the error?

Thanks!
is it because your filepath is not a valid filepath?

Either use a prefix r to make the path raw, or use forward slashes. Backslashes have special meaning in programming languages like python. valid paths are

   # windows
   filepath = "C:\\some\\folder\\file.mp3"
   filepath = r"C:\some\folder\file.mp3"
   filepath = "C:/some/folder/file.mp3"

   # posix style (linux, osx)
   filepath = "/home/folder/file.mp3"


This bug is fixed as of today: this error will now return 'File not found', which is better:
https://developer.blender.org/rB39b85e452faae543d10831e4fa66fdffbc22e0a1