MCP23017: 16x2 LCD showing black boxes
Quite often such situation occurs when the display does not reset properly (the reset from the IDE does not necessarily reset the display!). 

So, once the sktech has been uploaded to the board, I would first try to do a reset on the Uno board (using the RESET button). If that doesn't do the trick, I would recommend to make the contrast adjustable (all my LDC displays showed "black boxes in the upper row" on delivery and I had to ajust the contrast).

If that also has not the desired effect, there is no alternative to debugging your code. Without the code itself, we cannot guess what might be wrong.