class_docstr: Credentials class.
docstr: Load from toml file.
docstr_tok: ["Load","from","toml","file","."]
code: def load(self, auto_resolve=False) -> None:
      """Load from toml file."""
      if self.activation is not None:
          LOGGER.error(
              "Credentials already loaded. Not rereading file."
          )
          return
  
      try:
          with open(self._conf_file, "r") as f:
              data = toml.load(f).get("general")
          if data is None:
              raise Exception
          self.activation = _verify_email(data.get("email"))
      except FileNotFoundError:
          if auto_resolve:
              self.activate(show_instructions=not auto_resolve)
              return
          raise RuntimeError(
              'Credentials not found. Please run "streamlit activate".'
          )
      except Exception:
          if auto_resolve:
              self.reset()
              self.activate(show_instructions=not auto_resolve)
              return
          raise Exception(
              textwrap.dedent(
                  """
                  Unable to load credentials from %s.
                  Run "streamlit reset" and try again.
                  """
              )
              % (self._conf_file)
          )
  
imports: import json
  import os
  import sys
  import textwrap
  from collections import namedtuple
  from datetime import datetime
  from typing import Optional
  from uuid import uuid4
  import click
  import toml
  from streamlit import env_util, file_util, util
  from streamlit.logger import get_logger
label_desc: Use image node_id 4 for calling the Credentials obj's underlying member method code with example usage: obj.load(auto_resolve) without return types