# Skip done from Python library keyword shows error in log

**URL:** <https://forum.robotframework.org/t/skip-done-from-python-library-keyword-shows-error-in-log/7347>\
**Category:** Robot Framework\
**Created:** [30 May 2024 13:07 UTC](https://forum.robotframework.org/t/skip-done-from-python-library-keyword-shows-error-in-log/7347 "2024-05-30T13:07:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vahv1](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/vahv1/32/3923_2.png) [@Vahv1](https://forum.robotframework.org/u/Vahv1)\
**Post date:** [30 May 2024 13:07 UTC](https://forum.robotframework.org/t/skip-done-from-python-library-keyword-shows-error-in-log/7347/1 "2024-05-30T13:07:11Z")

</div>

I have these test cases in a test suite  
\*\*\* Test Cases \*\*\*

```
Test Robot Skip
    Skip Skip done from .robot

Test Python Skip
    My Own Skip Skip done from .py

```

And this keyword defined in a keyword library  
class KwLibrary:

```
    @keyword
    def my_own_skip(self, msg: str):
        BuiltIn().skip(msg)

```

This results in a log file like:

 ![library_skip](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/8/8c6a83c61261a7c79b1d4388986c445305672e00.png)

Why does the skip from keyword library show error in log but not the one called directly in test suite? How could I skip test case in the library keyword without showing error in log?

---

<div class="post-metadata">

**Author:** ![falcon030](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/falcon030/32/3420_2.png) [@falcon030](https://forum.robotframework.org/u/falcon030)\
**Post date:** [30 May 2024 13:53 UTC](https://forum.robotframework.org/t/skip-done-from-python-library-keyword-shows-error-in-log/7347/2 "2024-05-30T13:53:47Z")

</div>

@Vahv1 Do you have the following import in your custom Python library?

> from robot.libraries.BuiltIn import BuiltIn

---

<div class="post-metadata">

**Author:** ![falcon030](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/falcon030/32/3420_2.png) [@falcon030](https://forum.robotframework.org/u/falcon030)\
**Post date:** [30 May 2024 14:05 UTC](https://forum.robotframework.org/t/skip-done-from-python-library-keyword-shows-error-in-log/7347/3 "2024-05-30T14:05:38Z")

</div>

The following works for me:

> from robot.api.deco import keyword  
> from robot.libraries.BuiltIn import BuiltIn
> 
> class CustomLibrary:
> 
> ```
> @keyword
> def my_own_skip(self, msg: str):
> BuiltIn().skip(msg)
> 
> ```

---

<div class="post-metadata">

**Author:** ![Vahv1](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/vahv1/32/3923_2.png) [@Vahv1](https://forum.robotframework.org/u/Vahv1)\
**Post date:** [31 May 2024 07:29 UTC](https://forum.robotframework.org/t/skip-done-from-python-library-keyword-shows-error-in-log/7347/4 "2024-05-31T07:29:56Z")

</div>

Yes, I have those exact same imports. Just to make sure, so you don’t get an error in the test run log when using that? The skip works for me too and the test case doesn’t fail. But I’d like to get rid of the unnecessary error in the log.

---

<div class="post-metadata">

**Author:** ![falcon030](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/falcon030/32/3420_2.png) [@falcon030](https://forum.robotframework.org/u/falcon030)\
**Post date:** [31 May 2024 10:21 UTC](https://forum.robotframework.org/t/skip-done-from-python-library-keyword-shows-error-in-log/7347/5 "2024-05-31T10:21:50Z")

</div>

@Vahv1 I don’t get an error: [https://robotframework.org/code/?codeProject=N4IgdghgtgpiBcIDKBLKAHANjABAUQA9os4AaEAExgGcBjAJxXQBcUB7MBEEcgMxWzUEAbVD9sAOWhxEAFRrMkAVxTMYAOnpsARm2Y8QtDmrD7EAKks4kMZqzABzajkvmAOmAAibWktimIVg4cEJCAKSVqZhwIHDUo6hU1DwAZFG16CHoAT1C8vIBhSOY2KDSMrOz1dGyPD1cceSicAohqGhdLDybogCUdPWsAayYPPKQR9BCJphwKDlxeLSgcTQHmOrAenAAFbOYAC2CZ9DHQgFlcgHkAdzBh2Yep+bBF5dWakABfUjEBGCksC4Qxg2RubHoFGomhobCU9FoZEMxhgpi4DRsdhQjmcrg83l8-mYgXY91CEj0B2xDjibBw7TgPz+kmkXCKUVK5UyOWq2QMRlMqLMICWpRwWl0zHUEHQKHUVCMODQ6Ah0RBYIhFA8opWEr06kw6W5KBo6gAQipMMwAJL3ZWqnAWgQ2sCbWiYNrOdklMpGyrwTZ5AAC6vBkLOISovBwUGyAH02Hc49RJgAKdqYXikGPUBzwenMegASgDZPyjstLtTRfUKaYqaguaL3wAuuQqIwAG4wCg7LQAKxgtDMhaUMHIeuYADUYPRqKSuAB2dQABgMk4AgvQnAhgD8QPQYABHFSHolCeDCFtfIA](https://robotframework.org/code/?codeProject=N4IgdghgtgpiBcIDKBLKAHANjABAUQA9os4AaEAExgGcBjAJxXQBcUB7MBEEcgMxWzUEAbVD9sAOWhxEAFRrMkAVxTMYAOnpsARm2Y8QtDmrD7EAKks4kMZqzABzajkvmAOmAAibWktimIVg4cEJCAKSVqZhwIHDUo6hU1DwAZFG16CHoAT1C8vIBhSOY2KDSMrOz1dGyPD1cceSicAohqGhdLDybogCUdPWsAayYPPKQR9BCJphwKDlxeLSgcTQHmOrAenAAFbOYAC2CZ9DHQgFlcgHkAdzBh2Yep+bBF5dWakABfUjEBGCksC4Qxg2RubHoFGomhobCU9FoZEMxhgpi4DRsdhQjmcrg83l8-mYgXY91CEj0B2xDjibBw7TgPz+kmkXCKUVK5UyOWq2QMRlMqLMICWpRwWl0zHUEHQKHUVCMODQ6Ah0RBYIhFA8opWEr06kw6W5KBo6gAQipMMwAJL3ZWqnAWgQ2sCbWiYNrOdklMpGyrwTZ5AAC6vBkLOISovBwUGyAH02Hc49RJgAKdqYXikGPUBzwenMegASgDZPyjstLtTRfUKaYqaguaL3wAuuQqIwAG4wCg7LQAKxgtDMhaUMHIeuYADUYPRqKSuAB2dQABgMk4AgvQnAhgD8QPQYABHFSHolCeDCFtfIA)

---

<div class="post-metadata">

**Author:** ![Vahv1](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/vahv1/32/3923_2.png) [@Vahv1](https://forum.robotframework.org/u/Vahv1)\
**Post date:** [31 May 2024 11:27 UTC](https://forum.robotframework.org/t/skip-done-from-python-library-keyword-shows-error-in-log/7347/6 "2024-05-31T11:27:36Z")

</div>

I see, should’ve thought of that. Found out that the culprit was our custom implementation of run\_keyword-method. Thanks for the help!
