# How to create a new custom action and create a new checkpoint with the same custom action

**URL:** <https://discourse.greatexpectations.io/t/how-to-create-a-new-custom-action-and-create-a-new-checkpoint-with-the-same-custom-action/1560>\
**Category:** GX Core Support\
**Created:** [January 9, 2024, 2:41pm UTC](https://discourse.greatexpectations.io/t/how-to-create-a-new-custom-action-and-create-a-new-checkpoint-with-the-same-custom-action/1560 "2024-01-09T14:41:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mg2000](https://avatars.discourse-cdn.com/v4/letter/m/f07891/32.png) [@mg2000](https://discourse.greatexpectations.io/u/mg2000)\
**Post date:** [January 9, 2024, 2:41pm UTC](https://discourse.greatexpectations.io/t/how-to-create-a-new-custom-action-and-create-a-new-checkpoint-with-the-same-custom-action/1560/1 "2024-01-09T14:41:38Z")

</div>

Hey Guys,  
I am creating a new custom action and with this custom action I am creating new checkpoint.  
I am able to create custom action but I am getting “file not found” error whenever I m creating new checkpoint with the same action.

Code snippet for creating custom action

```auto

import logging
from typing import Union, Optional

from great_expectations.checkpoint import ValidationAction
from great_expectations.core import ExpectationSuiteValidationResult
from great_expectations.core._docs_decorators import public_api
from great_expectations.data_context import AbstractDataContext
from great_expectations.data_context.types.refs import GXCloudResourceRef
from great_expectations.data_context.types.resource_identifiers import ValidationResultIdentifier, GXCloudIdentifier
from typing_extensions import override

@public_api
class CustomAction(ValidationAction):
    def __init__ (self):
        super(). __init__ ()

    @override
    def _run( # type: ignore[override] # signature does not match parent # noqa: PLR0913
            self,
            validation_result_suite: ExpectationSuiteValidationResult,
            validation_result_suite_identifier: Union[
                ValidationResultIdentifier, GXCloudIdentifier
            ],
            data_asset,
            payload=None,
            expectation_suite_identifier=None,
            checkpoint_identifier: Optional[GXCloudIdentifier] = None,
    ):
        logging.Logger.info("custom action")

```

checkpoint creation code

```auto

checkpoint = context.add_or_update_checkpoint(
    name="my_taxi_dataframe_checkpoint-v4",
    batch_request=batch_request,
    expectation_suite_name="my_expectation_suite",
    action_list=[{
        "name": "custom_action",
        "action":{
            "class_name": "CustomAction"
        }
    }]
)

```

Error I am getting

**The module: `great_expectations.validation_operators` does not contain the class: `CustomAction`.**  
\*\* - Please verify that the class named `CustomAction` exists.\*\*

Any kind help would be appreciated!!  
Thanks in advance!!
