Loading resnet pretrained model

I want to use resnet50 pretrained model using PyTorch and I am using the following code for loading it:

    import torch
    model = torch.hub.load("pytorch/vision", "resnet50", weights="IMAGENET1K_V2")

Although I upgrade the torchvision but I receive the following error:

Any idea?

Which version are you using, as it seems to be already fixed as described here?