They've been socialist for years. When the price of oil declined, they lacked the money to pay for the socialist state.
And the current dictator has been reacting by ever greater state control, jailing business owners, taking over factories, solving lines by banning them from starting too soon and arresting people for taking pictures of shortages.
The old joke that in socialist nations people wait in line for bread while in capitalist nations food is lined up for customers is not a joke. Just in Venezuela, they have lines for corn flour instead of bread.