First of all, thanks to user tim.gerritsen for helping me on discord to fix the issue and suggesting to make this topic.
I downloaded a .ply file from here. As I tried to load model.ply with pointfilein TOP, nothing was coming out, as if every value was 0. tim.gerritsen noticed that some lines had a weird value (-2147483648) in the “green” column. Changing these to 255 fixed the file and I was able to load it normally.
The problem was with the file, but maybe it would be useful for it to display some kind of error and ignore these kind of values. I had no idea what was going on.