# Uuid can only be autoloaded

**URL:** <https://swi-prolog.discourse.group/t/uuid-can-only-be-autoloaded/9371>\
**Category:** General\
**Created:** [November 6, 2025, 5:47pm UTC](https://swi-prolog.discourse.group/t/uuid-can-only-be-autoloaded/9371 "2025-11-06T17:47:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![patham9](https://avatars.discourse-cdn.com/v4/letter/p/f08c70/32.png) [@patham9](https://swi-prolog.discourse.group/u/patham9)\
**Post date:** [November 6, 2025, 5:47pm UTC](https://swi-prolog.discourse.group/t/uuid-can-only-be-autoloaded/9371/1 "2025-11-06T17:47:21Z")

</div>

set\_prolog\_flag(autoload, false).

use\_module(library(uuid)).

uuid(X).

=\> ERROR: Unknown procedure: uuid:ossp\_uuid/2

This workaround works but is odd: (not in interpreter shell but in pl file):

autoload(library(uuid)).  
set\_prolog\_flag(autoload, false).

then executing

uuid(X)

is fine.

Why is that?

Best regards,

Patrick

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [November 6, 2025, 6:47pm UTC](https://swi-prolog.discourse.group/t/uuid-can-only-be-autoloaded/9371/2 "2025-11-06T18:47:38Z")

</div>

> [@patham9](#):
>
> Why is that?

Because choosing between the foreign OSSP UUID implementation and a limited pure Prolog implementation depended on autoloading … Pushed a fix.

---

<div class="post-metadata">

**Author:** ![patham9](https://avatars.discourse-cdn.com/v4/letter/p/f08c70/32.png) [@patham9](https://swi-prolog.discourse.group/u/patham9)\
**Post date:** [November 6, 2025, 9:30pm UTC](https://swi-prolog.discourse.group/t/uuid-can-only-be-autoloaded/9371/3 "2025-11-06T21:30:11Z")

</div>

Thank you, that was quick!

Best regards,

Patrick
