TWS is not always available during the weekend. Availability depends on whether IB is doing software and/or hardware maintenance. TWS should be up and running again by the time the markets open.