Converting a .gen file in r to a genind object

Error in dimnames(x) <- dn :
length of 'dimnames' [1] not equal to array extent

This is the message I get when I try to convert Genepop .gen file data to a genind object. I am using the package Adegenet.

This was my command:

fox1 <- read.genepop ("myfile.gen",)

The full result:

File description: S1_304696

Error in dimnames(x) <- dn :
length of 'dimnames' [1] not equal to array extent

In addition:

Warning message:
In matrix(unlist(strsplit(vec.genot, "[[:space:]]+")), ncol = nloc, :
data length [16039568] is not a sub-multiple or multiple of the number of rows [437]

Do I have to add any more commands?

Thanks