# Library Custom Keyword with underscore in name and embedded param not supported

**URL:** <https://forum.robotframework.org/t/library-custom-keyword-with-underscore-in-name-and-embedded-param-not-supported/7842>\
**Category:** Robot Framework\
**Created:** [26 September 2024 04:37 UTC](https://forum.robotframework.org/t/library-custom-keyword-with-underscore-in-name-and-embedded-param-not-supported/7842 "2024-09-26T04:37:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Espingo](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/espingo/32/4255_2.png) [@Espingo](https://forum.robotframework.org/u/Espingo)\
**Post date:** [26 September 2024 04:37 UTC](https://forum.robotframework.org/t/library-custom-keyword-with-underscore-in-name-and-embedded-param-not-supported/7842/1 "2024-09-26T04:37:13Z")

</div>

I try to define a custom keywords with embedded parameter and an underscore in the custom name but robotframwork raises an “No Keyword …” error at runtime

- My custom keyword implementation:

- My robot file  
TEST Of Custom Keyword  
MY\_KEYWORD with param 42 is not supported

- My Execution

- Info  
If I remove the “\_” =\> it’s work  
If I remove the embedded argument =\> its’s work

I try to find similar issue discussion on forums/web, I don’t find anything.

- Context:

- Python 3.11
- RobotFramework 7.1

---

<div class="post-metadata">

**Author:** ![robinmackaij](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/robinmackaij/32/126_2.png) [@robinmackaij](https://forum.robotframework.org/u/robinmackaij)\
**Post date:** [29 September 2024 19:52 UTC](https://forum.robotframework.org/t/library-custom-keyword-with-underscore-in-name-and-embedded-param-not-supported/7842/2 "2024-09-29T19:52:59Z")

</div>

@pekkaklarck This seems weird…any ideas?

---

<div class="post-metadata">

**Author:** ![\_daryl](https://avatars.discourse-cdn.com/v4/letter/_/45deac/32.png) [@\_daryl](https://forum.robotframework.org/u/_daryl)\
**Post date:** [29 September 2024 20:40 UTC](https://forum.robotframework.org/t/library-custom-keyword-with-underscore-in-name-and-embedded-param-not-supported/7842/3 "2024-09-29T20:40:04Z")

</div>

Do you have another keyword with the same name without the underscore or even with in another reference or same file, just it’s asking you did you mean this resource/library.keyword. Which looks like it can’t quite figure it out.

Feels very much importing related or possible another keyword with the same name

---

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [30 September 2024 02:02 UTC](https://forum.robotframework.org/t/library-custom-keyword-with-underscore-in-name-and-embedded-param-not-supported/7842/4 "2024-09-30T02:02:46Z")

</div>

Hi @Espingo,

Something I only learned myself a few days ago from the slack chat is mentioned here ([Keyword names](https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#keyword-names)) in the documentation:

> Name comparison is case-insensitive, and also spaces and underscores are ignored.

This is also a similar statement in [Using variables](https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#using-variables) and various other areas of the documentation

So the error message seems to be telling you not to use the underscore in the keyword name:

```python
No keyword with name ‘MY_KEYWORD with param 42 is not supported’ found. Did you mean:
MyLib.MY KEYWORD With Param ${param1} Is Not Supported

```

In your robot file try changing this:

```python
TEST Of Custom Keyword
    MY_KEYWORD with param 42 is not supported

```

to this:

```python
TEST Of Custom Keyword
    MY KEYWORD with param 42 is not supported

```

Hopefully that will work,

Dave.

---

<div class="post-metadata">

**Author:** ![Espingo](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/espingo/32/4255_2.png) [@Espingo](https://forum.robotframework.org/u/Espingo)\
**Post date:** [1 October 2024 05:00 UTC](https://forum.robotframework.org/t/library-custom-keyword-with-underscore-in-name-and-embedded-param-not-supported/7842/5 "2024-10-01T05:00:33Z")

</div>

Thanks [damies13](https://forum.robotframework.org/u/damies13) for your proposition but it doesn’t work too if I replace “MY\_KEYWORD” by “MY KEYWORD”.  
Moreover using the underscore in the “name” of my test has a real interest from end-user point of view in my use-case.
