old_contents: """
  Functions for interacting with the database server.
  """
  from server_common.utilities import dehex_and_decompress, print_and_log
  from server_common.channel_access import ChannelAccess
  from server_common.pv_names import DatabasePVNames
  import json
  import traceback
  
  
  def get_iocs(prefix):
      """
      Get the list of available IOCs from DatabaseServer.
  
      Args:
          prefix : The PV prefix for this instrument.
  
      Returns:
          A list of the names of available IOCs.
      """
      #
      try:
          rawjson = dehex_and_decompress(bytes(ChannelAccess.caget(prefix + DatabasePVNames.IOCS), encoding="utf-8"))
          return json.loads(rawjson).keys()
      except Exception:
          print_and_log(f"Could not retrieve IOC list: {traceback.format_exc()}", "MAJOR")
          return []
  
new_contents: """
  Functions for interacting with the database server.
  """
  from server_common.utilities import dehex_and_decompress, print_and_log
  from server_common.channel_access import ChannelAccess
  from server_common.pv_names import DatabasePVNames
  import json
  import traceback
  
  
  def get_iocs(prefix):
      """
      Get the list of available IOCs from DatabaseServer.
  
      Args:
          prefix : The PV prefix for this instrument.
  
      Returns:
          A list of the names of available IOCs.
      """
      #
      try:
          rawjson = dehex_and_decompress(bytes(ChannelAccess.caget(prefix + DatabasePVNames.IOCS), encoding="utf-8")).decode("utf-8")
          return json.loads(rawjson).keys()
      except Exception:
          print_and_log(f"Could not retrieve IOC list: {traceback.format_exc()}", "MAJOR")
          return []
  
subject: fix for ioc list not working