class_docstr: Raised when an artifact is in an invalid state for the requested operation.
class_docstr_tok: ["Raised","when","an","artifact","is","in","an","invalid","state","for","the","requested","operation","."]
code: def __init__(
      self,
      artifact: Optional["Artifact"] = None,
      attr: Optional[str] = None,
      msg: str = "Artifact is in an invalid state for the requested operation.",
  ):
      object_name = (
          artifact.__class__.__name__ if artifact else "Artifact"
      )
      method_id = f"{object_name}.{attr}" if attr else object_name
      super().__init__(
          msg.format(artifact=artifact, attr=attr, method_id=method_id)
      )
      # Follow the same pattern as AttributeError.
      self.obj = artifact
      self.name = attr or ""
  
file_path: wandb/wandb/sdk/artifacts/exceptions.py
imports: from typing import TYPE_CHECKING, Optional
  from wandb import errors
label_desc: Use image node_id 1 to create a new ArtifactStatusError object from inherited base classes: AttributeError with example: obj = ArtifactStatusError(artifact, attr, msg)