# tf.errors.OperatorNotAllowedInGraphError

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.7.4/tensorflow/python/framework/errors_impl.py#L38-L45) |

An error is raised for unsupported operator in Graph execution.

    tf.errors.OperatorNotAllowedInGraphError(
        *args, **kwargs
    )

For example, using a [`tf.Tensor`](https://www.tensorflow.org/versions/r2.7/api_docs/python/tf/Tensor) as a Python `bool` in Graph execution
is not allowed.