That's not the error you are after. Keep going. (You get this
because you have epg installed, whereas I don't.)
FYI, the melpa issue is fixed. But evaluating the below in "emacs -Q" recreates the same "end of file" error.
(progn
(call-interactively #'list-packages))