It seems you are passing the net argument as a None so check where net is created and that it holds a valid nn.Module object.
My guess would be that you might be using a convenient function to create the model and might have forgotten to return the model itself. E.g. this would break with the same error:
def create_model():
    net = nn.Linear(1, 1)
    # remove the '#' and it'll work
    # return net  

net = create_model()
net.parameters()
> AttributeError: 'NoneType' object has no attribute 'parameters'