Locate and assign weights to vertices with no weights in a Mesh
I had this problem and came here so hopefully my script will save someone some time and headache looking through the blender API

# Usage: with a mesh selected, run the script. It will add a new 
# vertex group to the mesh called 'ProblemVertices'
# The script will add any vertices with a total weight != 1.0 
# to the 'ProblemVertices' group.

import bpy

print("Start script")

me = bpy.context.object.data                # the selected mesh
grps = bpy.context.object.vertex_groups     # all vertex groups in the mesh
grps.new(name="ProblemVertices")            # add a vertex group to the mesh
myvertexgroup = grps[-1]                    # the last vertex group in the mesh - our new group

# optional part which when uncommented deletes vertices 
# from groups where the vertex has weight 0 for that group.
#for vertex in me.vertices:
#    for grpelement in vertex.groups:                        # for each vertex group element in the mesh
#       if grpelement.weight == 0.0:                        # if the vertex is unweighted
#           grps[grpelement.group].remove([vertex.index])   #remove it from that group
#           print("Removed Vertex from group")
#       if len(vertex.groups) == 0:                            # if the vertex is not a member of any groups
#           myvertexgroup.add([vertex.index], 1.0, 'ADD')          # add it to the last group with weight 1
#           print("Unweighted vertex added to group")

for vertex in me.vertices:                              # for each vertex
    thisweight = 0.0                                    #keep track of total weight
    for grpelement in vertex.groups:                    # for each vertex group element in the mesh
        thisweight += grpelement.weight
    if thisweight &lt; 0.9999 or thisweight &gt; 1.0001:          # if the vertex weights don't add up to roughly 1.0
        myvertexgroup.add([vertex.index], 1.0, 'ADD')           # add the vertex to the last group with weight 1.0
        print("Vertex weight not 1.0 found")

print("Finished script")