> For the complete documentation index, see [llms.txt](https://www.opal-rt.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.opal-rt.com/docs/rt-lab/automation-api-and-scripting/rt-lab-api/error-codes.md).

# RT-LAB API Error Codes

These error codes are returned by RT-LAB API functions. When an error occurs, call the **GetLastErrMsg** function to retrieve the corresponding error description.

{% hint style="info" %}
When using the Python API, an exception is raised automatically. The exception contains both the error code and the associated error message.
{% endhint %}

| Error code                                 | Value              |
| ------------------------------------------ | ------------------ |
| EOK                                        | 0                  |
| EPERM                                      | 1                  |
| ENOENT                                     | 2                  |
| ESRCH                                      | 3                  |
| EINTR                                      | 4                  |
| EIO                                        | 5                  |
| ENXIO                                      | 6                  |
| E2BIG                                      | 7                  |
| ENOEXEC                                    | 8                  |
| EBADF                                      | 9                  |
| ECHILD                                     | 10                 |
| EAGAIN                                     | 11                 |
| ENOMEM                                     | 12                 |
| EACCES                                     | 13                 |
| EFAULT                                     | 14                 |
| EBUSY                                      | 16                 |
| EEXIST                                     | 17                 |
| EXDEV                                      | 18                 |
| ENODEV                                     | 19                 |
| ENOTDIR                                    | 20                 |
| EISDIR                                     | 21                 |
| EINVAL                                     | 22                 |
| ENFILE                                     | 23                 |
| EMFILE                                     | 24                 |
| ENOTTY                                     | 25                 |
| EFBIG                                      | 27                 |
| ENOSPC                                     | 28                 |
| ESPIPE                                     | 29                 |
| EROFS                                      | 30                 |
| EMLINK                                     | 31                 |
| EPIPE                                      | 32                 |
| EDOM                                       | 33                 |
| ERANGE                                     | 34                 |
| EDEADLK                                    | 36                 |
| ENAMETOOLONG                               | 38                 |
| ENOLCK                                     | 39                 |
| ENOSYS                                     | 40                 |
| ENOTEMPTY                                  | 41                 |
| EILSEQ                                     | 42                 |
| OP\_API\_EBAD\_CONFIG=OP\_API\_ERRNO\_BASE | 28672              |
| OP\_API\_EBAD\_MASTER\_NODE                | 28673              |
| OP\_API\_EBAD\_DEV\_ENV                    | 28674              |
| OP\_API\_EBAD\_PATH\_MAPPING               | 28675              |
| OP\_API\_ESEPARATION                       | 28676              |
| OP\_API\_ECODE\_GENERATION                 | 28677              |
| OP\_API\_EBAD\_PHYS\_NODE                  | 28678              |
| OP\_API\_EMODEL\_CHANGED                   | 28679              |
| OP\_API\_ENO\_LICENSE                      | 28680              |
| OP\_API\_ENO\_PRODUCT                      | 28681              |
| OP\_API\_ENO\_HOST\_LICENSE                | 28682 (Deprecated) |
| OP\_API\_ENO\_NODE\_LICENSE                | 28683              |
| OP\_API\_ENO\_DEVELOP\_LICENSE             | 28684              |
| OP\_API\_ENO\_EMBEDDED\_LICENSE            | 28685              |
| OP\_API\_ENO\_TARGET\_LICENSE              | 28686              |
| OP\_API\_ENO\_RTCOMM\_LICENSE              | 28687              |
| OP\_API\_ENO\_TARGET\_MULT\_LICENSE        | 28688              |
| OP\_API\_ENO\_DINAMO\_LICENSE              | 28689              |
| OP\_API\_ENO\_POLLING\_LICENSE             | 28690              |
| OP\_API\_ECREATE\_SHMEM                    | 28691              |
| OP\_API\_ECREATE\_PROCESS                  | 28692              |
| OP\_API\_ERR\_LOAD\_EMBEDDED               | 28693              |
| OP\_API\_EBAD\_TRANSFER                    | 28694              |
| OP\_API\_MODEL\_IO\_TIMEOUT                | 28695              |
| OP\_API\_MODEL\_IO\_ERROR                  | 28696              |
| OP\_API\_ERR\_LOAD\_CALC\_STEP             | 28697              |
| OP\_API\_CMD\_REJECTED                     | 28698              |
| OP\_API\_CMD\_CANCELED                     | 28699              |
| OP\_API\_EBAD\_SIGNAL                      | 28700              |
| OP\_API\_ENO\_DYN\_SIGNAL                  | 28701              |
| OP\_API\_EACQ\_MODEL\_PAUSED               | 28702              |
| OP\_API\_EMODEL\_RESPONDING                | 28703              |
| OP\_API\_UPDATE\_AVAILABLE                 | 28704              |
| OP\_API\_START\_EXEC\_FILE                 | 28705              |
| OP\_API\_WAIT\_EXEC\_FILE                  | 28706              |
| OP\_API\_STOP\_EXEC\_FILE                  | 28707              |
| OP\_API\_LICENSE\_NEAR\_EXPIRED            | 28708              |
| OP\_API\_NOT\_SUPPORTED                    | 28709              |
| OP\_API\_INVALID\_COMPILED\_VERSION        | 28710              |
| OP\_API\_MULTIPLE\_EXCEPTION               | 28711              |
| OP\_API\_ENO\_LICENSE\_SERVER              | 28712 (deprecated) |
| OP\_API\_ERRNO\_TOP                        | Must remain last   |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.opal-rt.com/docs/rt-lab/automation-api-and-scripting/rt-lab-api/error-codes.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
