Had this happen to a settlement of mine. I could't trade or barter with anyone. I left for a few in-game days and when I returned it was back to normal.
prid the NPC and openactorcontainer 1 to be able to access his / her inventory. You don't get any more interaction from them anyway. Otherwise what it has been said: leave the location and come back after a few days.