Ok I have found a fix for this after about 3 days of looking through my save file when this thing happened to me as well.
First go to your save file (I used Notedpad++ to do this) and search for "name":"SLAVEMARKET"(find the first one with all caps). After that, scroll to the left til you find "slavenumber" and "slaves". Then set "slavenumber" to 0 and "slaves" to []. This will empty out all the slaves in the slavemarket and allow you to access the upgrade tab but you wont be able to hire any slaves since you basically removed all slaves on the market.
Pretty sure this glitch occurs when there's an issue with one of the slave's code which caused the game to unable to open the slave market.