# Failed to find custom component during train (Rasa X CE)

**URL:** <https://forum.rasa.com/t/failed-to-find-custom-component-during-train-rasa-x-ce/21659>\
**Category:** \[Deprecated\] Rasa X Community Edition\
**Created:** [November 25, 2019, 9:31am UTC](https://forum.rasa.com/t/failed-to-find-custom-component-during-train-rasa-x-ce/21659 "2019-11-25T09:31:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mac\_71128](https://avatars.discourse-cdn.com/v4/letter/m/bbce88/32.png) [@mac\_71128](https://forum.rasa.com/u/mac_71128)\
**Post date:** [November 25, 2019, 9:31am UTC](https://forum.rasa.com/t/failed-to-find-custom-component-during-train-rasa-x-ce/21659/1 "2019-11-25T09:31:38Z")

</div>

I followed each step of [Deploy to a Server](https://rasa.com/docs/rasa-x/deploy/) and everything seems to be ok. Then, I used [Rasa X HTTP API Documentation](https://rasa.com/docs/rasa-x/api/rasa-x-http-api/) to add my nlu data, stories, domain, and config. But I couldn’t train a model because my config file contains a custom component named `datetime_parser`.

In my local, I placed `datetime_parser.py` next to `config.yml` but there is no `config.yml` file inside any of my containers. I tried to send `datetime_parser.py` file to `/app` folder of `rasa-x`, `rasa-production` and `rasa-worker` containers but nothing changed and I still have this error. What should I do now?

RASA\_X\_VERSION= 0.22.2

RASA\_VERSION=1.4.3

Error:

```auto
ERROR:rasax.community.api.blueprints.models:500, Internal Server Error, body='b'{"version":"1.4.3","status":"failure","message":"An unexpected error occurred during training. Error: Failed to find module \'datetime_parser\'. \\nNo module named \'regex\'","reason":"TrainingError","details":{},"help":null,"code":500}''

```

Config file:

```auto

language: fa

pipeline:

- name: WhitespaceTokenizer

- name: CRFEntityExtractor

- name: EntitySynonymMapper

- name: CountVectorsFeaturizer

- name: EmbeddingIntentClassifier

- name: datetime_parser.ParserComponent

policies:

- name: KerasPolicy

- name: MemoizationPolicy

- name: FallbackPolicy

nlu_threshold: 0.3

core_threshold: 0.3

fallback_action_name: utter_not_clear_query

- name: FormPolicy

- name: MappingPolicy

```

---

<div class="post-metadata">

**Author:** ![fede](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/fede/32/7095_2.png) [@fede](https://forum.rasa.com/u/fede)\
**Post date:** [December 6, 2019, 10:59am UTC](https://forum.rasa.com/t/failed-to-find-custom-component-during-train-rasa-x-ce/21659/2 "2019-12-06T10:59:37Z")

</div>

Hey @mac_71128, it looks like your `datetime_parser.py` file is trying to import a `regex` module, which should actually be `re`. Would you mind double-checking that?

---

<div class="post-metadata">

**Author:** ![mac\_71128](https://avatars.discourse-cdn.com/v4/letter/m/bbce88/32.png) [@mac\_71128](https://forum.rasa.com/u/mac_71128)\
**Post date:** [December 17, 2019, 8:51am UTC](https://forum.rasa.com/t/failed-to-find-custom-component-during-train-rasa-x-ce/21659/3 "2019-12-17T08:51:04Z")

</div>

Hi @fede. I fixed the regex problem but I still have `datetime_parser` error.
