# Help!

**URL:** https://swi-prolog.discourse.group/c/help/6.md

[Latest](https://swi-prolog.discourse.group/latest.md) · [Categories](https://swi-prolog.discourse.group/categories.md) · [Tags](https://swi-prolog.discourse.group/tags.md)

---

## [About the Help! category](https://swi-prolog.discourse.group/t/about-the-help-category/28)

<div class="topic-metadata">

**Author:** [@jamesnvc](https://swi-prolog.discourse.group/u/jamesnvc)\
**Replies:** 1\
**Last updated:** [December 9, 2019, 12:44am UTC](https://swi-prolog.discourse.group/t/about-the-help-category/28 "2019-12-09T00:44:07Z")

</div>

Having a problem writing or understanding some Prolog code? Ask it in this category :smile:

---

## [How to generate full doc files of a project?](https://swi-prolog.discourse.group/t/how-to-generate-full-doc-files-of-a-project/9831)

<div class="topic-metadata">

**Author:** [@andrii](https://swi-prolog.discourse.group/u/andrii)\
**Replies:** 1\
**Last updated:** [September 21, 2026, 6:36pm UTC](https://swi-prolog.discourse.group/t/how-to-generate-full-doc-files-of-a-project/9831 "2026-09-21T18:36:35Z")

</div>

I tried using doc\_save(., \[\]), but it does not generate separate pages for predicates, while still generating the respective hrefs in index.html. Suppose I have a prolog file test.pl I want to have a documentation for, …

---

## [A new bug in my old code?](https://swi-prolog.discourse.group/t/a-new-bug-in-my-old-code/9804)

<div class="topic-metadata">

**Author:** [@Marc](https://swi-prolog.discourse.group/u/Marc)\
**Replies:** 10\
**Last updated:** [September 2, 2026, 6:12pm UTC](https://swi-prolog.discourse.group/t/a-new-bug-in-my-old-code/9804 "2026-09-02T18:12:18Z")

</div>

I’m using: SWI-Prolog version 10.0.2. I want the code to: retract all dynamic predicates that are not built-in. But what I’m getting after cleanup each time I consult a file is: ERROR: Domain error: \`file\_type’ expecte…

---

## [Display a variable with write](https://swi-prolog.discourse.group/t/display-a-variable-with-write/9700)

<div class="topic-metadata">

**Author:** [@gerard26](https://swi-prolog.discourse.group/u/gerard26)\
**Replies:** 7\
**Last updated:** [August 1, 2026, 2:01pm UTC](https://swi-prolog.discourse.group/t/display-a-variable-with-write/9700 "2026-08-01T14:01:56Z")

</div>

I’m using: SWI-Prolog version 9.29 I want the code to:display the contents of the variable X But what I’m getting is: \_3014 is a variable My code looks like this: ... test(X) :- var(X), write(X), write(' …

---

## [What changed in library(macros)](https://swi-prolog.discourse.group/t/what-changed-in-library-macros/9733)

<div class="topic-metadata">

**Author:** [@BJooze](https://swi-prolog.discourse.group/u/BJooze)\
**Replies:** 10\
**Last updated:** [July 28, 2026, 3:08pm UTC](https://swi-prolog.discourse.group/t/what-changed-in-library-macros/9733 "2026-07-28T15:08:40Z")

</div>

I’ve been using a few simple macros - starting in 9.2.9. After recently switching to 1.0.2 and changing nothing in my own code, all the sudden I cannot for the life of me get any (#define/#import) macros to work. I’m cur…

---

## [I think I found a bug](https://swi-prolog.discourse.group/t/i-think-i-found-a-bug/9633)

<div class="topic-metadata">

**Author:** [@Frank\_Schwidom](https://swi-prolog.discourse.group/u/Frank_Schwidom)\
**Replies:** 15\
**Last updated:** [July 17, 2026, 3:41pm UTC](https://swi-prolog.discourse.group/t/i-think-i-found-a-bug/9633 "2026-07-17T15:41:12Z")

</div>

I’m on $ swipl --version SWI-Prolog version 9.3.32 for x86\_64-linux And I wrote this code :- use\_module( library( 'clpfd')). % transpose xmas( \`XMAS\`). direction8( IDX\_R\_C) :- IDX\_R\_C = ( ROW, COL) , FACTORS=\[-1,0,1…

---

## [Can no longer publish updates to packages](https://swi-prolog.discourse.group/t/can-no-longer-publish-updates-to-packages/9728)

<div class="topic-metadata">

**Author:** [@hargettp](https://swi-prolog.discourse.group/u/hargettp)\
**Replies:** 3\
**Last updated:** [July 11, 2026, 4:45pm UTC](https://swi-prolog.discourse.group/t/can-no-longer-publish-updates-to-packages/9728 "2026-07-11T16:45:22Z")

</div>

I’m using: SWI-Prolog version 10.0.2 (on macOS 26) I want the code to: register my new package with the swi-prolog.org catalog But what I’m getting is: swipl does the test install of dependencies and my package – but t…

---

## [Message appears on swipl-win launch terminal when Python call made by janus](https://swi-prolog.discourse.group/t/message-appears-on-swipl-win-launch-terminal-when-python-call-made-by-janus/9724)

<div class="topic-metadata">

**Author:** [@mike.elston](https://swi-prolog.discourse.group/u/mike.elston)\
**Replies:** 3\
**Last updated:** [July 7, 2026, 11:29pm UTC](https://swi-prolog.discourse.group/t/message-appears-on-swipl-win-launch-terminal-when-python-call-made-by-janus/9724 "2026-07-07T23:29:28Z")

</div>

I’m using: SWI-Prolog version 10.1.10-27-gb662174c4 test.pl: :- use\_module(library(janus)). test :- py\_call(list, \_, \[py\_object(true)\]). Run goal which calls py\_call/3 101 ?- test. % Interactive session; added…

---

## [Unintuitive debug/3 - format/2 interaction](https://swi-prolog.discourse.group/t/unintuitive-debug-3-format-2-interaction/9715)

<div class="topic-metadata">

**Author:** [@Benji](https://swi-prolog.discourse.group/u/Benji)\
**Replies:** 7\
**Last updated:** [July 1, 2026, 7:58am UTC](https://swi-prolog.discourse.group/t/unintuitive-debug-3-format-2-interaction/9715 "2026-07-01T07:58:04Z")

</div>

I have reduced my confusion on the fillowing situation: run :- debug(foo), debug(foo, 'd1', \[\]), format('baz', \[\]), debug(foo, 'd2', \[\]), format('~n', \[\]), debug(foo, 'd1', \[\]), ansi\_fo…

---

## [Tricky CHR behaviour](https://swi-prolog.discourse.group/t/tricky-chr-behaviour/9642)

<div class="topic-metadata">

**Author:** [@AZH](https://swi-prolog.discourse.group/u/AZH)\
**Replies:** 10\
**Last updated:** [June 26, 2026, 8:17pm UTC](https://swi-prolog.discourse.group/t/tricky-chr-behaviour/9642 "2026-06-26T20:17:26Z")

</div>

Hello, I have a CHR as follows: :- use\_module(library(chr)). :- chr\_constraint try/1. try(X), try(Y) \<=\> X == Y | writeln(succeed). then I declared a constraint, but got an unexpected result: ?- try(A). succeed try(A…

---

## [Debugging two http\_server inside docker containers](https://swi-prolog.discourse.group/t/debugging-two-http-server-inside-docker-containers/9703)

<div class="topic-metadata">

**Author:** [@wdiestel](https://swi-prolog.discourse.group/u/wdiestel)\
**Replies:** 23\
**Last updated:** [June 25, 2026, 6:32am UTC](https://swi-prolog.discourse.group/t/debugging-two-http-server-inside-docker-containers/9703 "2026-06-25T06:32:04Z")

</div>

I’m using: SWI-Prolog (threaded, 64 bits, version 10.0.2) I try to debug two containers running http\_server, where one functions as a proxy calling the other using http\_post. Every 30 requests or so I get such an error…

---

## [Current status of s(CASP)](https://swi-prolog.discourse.group/t/current-status-of-s-casp/9507)

<div class="topic-metadata">

**Author:** [@alanbur](https://swi-prolog.discourse.group/u/alanbur)\
**Replies:** 9\
**Last updated:** [June 19, 2026, 1:45pm UTC](https://swi-prolog.discourse.group/t/current-status-of-s-casp/9507 "2026-06-19T13:45:14Z")

</div>

I’m considering using the s(CASP) pack for rules-based fault diagnosis. However I’m wondering what the current status is - the docs seem kinda sparse, the only comprehensive ones I’ve been able to find are on the SWISH s…

---

## [XPCE PDF function](https://swi-prolog.discourse.group/t/xpce-pdf-function/9625)

<div class="topic-metadata">

**Author:** [@karl\_popp](https://swi-prolog.discourse.group/u/karl_popp)\
**Replies:** 1\
**Last updated:** [June 17, 2026, 10:31am UTC](https://swi-prolog.discourse.group/t/xpce-pdf-function/9625 "2026-06-17T10:31:54Z")

</div>

I’m using: SWI-Prolog version 10.0.2 I want the code to: print a XPCE picture But what I’m getting is: not enogh parameters for PDF, only prints the visible part of the picture, not the full picture My code looks like…

---

## [Basic CHR question](https://swi-prolog.discourse.group/t/basic-chr-question/9653)

<div class="topic-metadata">

**Author:** [@AZH](https://swi-prolog.discourse.group/u/AZH)\
**Replies:** 4\
**Last updated:** [June 11, 2026, 1:28pm UTC](https://swi-prolog.discourse.group/t/basic-chr-question/9653 "2026-06-11T13:28:51Z")

</div>

Hi there, sorry that my question may be too basic. For the following CHR rule: :- use\_module(library(chr)). :- chr\_constraint try/1. try(X) ==\> writeln(guard), ground(X) | writeln(body). If I assert a try(X), it give…

---

## [How to use swipl within my C++ program?](https://swi-prolog.discourse.group/t/how-to-use-swipl-within-my-c-program/9620)

<div class="topic-metadata">

**Author:** [@Raphy](https://swi-prolog.discourse.group/u/Raphy)\
**Replies:** 22\
**Last updated:** [May 20, 2026, 10:20pm UTC](https://swi-prolog.discourse.group/t/how-to-use-swipl-within-my-c-program/9620 "2026-05-20T22:20:36Z")

</div>

I compiled and built swipl-devel in this way: raphy@raphy:~$ git clone --recursive https://github.com/SWI-Prolog/swipl-devel.git raphy@raphy:~/swipl-devel$ cmake -DCMAKE\_INSTALL\_PREFIX=/home/raphy/MyPrj/src/swipl-deve…

---

## [SEGV in tabled deterministic predicate, but only when compiled](https://swi-prolog.discourse.group/t/segv-in-tabled-deterministic-predicate-but-only-when-compiled/9514)

<div class="topic-metadata">

**Author:** [@alanbur](https://swi-prolog.discourse.group/u/alanbur)\
**Replies:** 16\
**Last updated:** [May 20, 2026, 3:33pm UTC](https://swi-prolog.discourse.group/t/segv-in-tabled-deterministic-predicate-but-only-when-compiled/9514 "2026-05-20T15:33:53Z")

</div>

Version 10.1.2 This only fails when compiled: ERROR: \\\[Thread main\\\] Deterministic procedure stats:resourceStats/1 failed ERROR: \\\[Thread main\\\] In: ERROR: \\\[Thread main\\\] \\\[20\\\] throw(error(determinism\_error(…,det,f…

---

## [BUG: internal error in GUI debugger](https://swi-prolog.discourse.group/t/bug-internal-error-in-gui-debugger/9622)

<div class="topic-metadata">

**Author:** [@alanbur](https://swi-prolog.discourse.group/u/alanbur)\
**Replies:** 4\
**Last updated:** [May 20, 2026, 3:21pm UTC](https://swi-prolog.discourse.group/t/bug-internal-error-in-gui-debugger/9622 "2026-05-20T15:21:45Z")

</div>

I’m seeing this in both 10.1.5 & 10.1.7 when stepping through code with the GUI debugger. The initial gspy breakpoint is taken OK, but this happens after the first ‘step into’: \[INTERNAL ERROR: Diff: '.'(\_, roots, A), '…

---

## [Odbc\_prepare error when using library(odbc) with DuckDB](https://swi-prolog.discourse.group/t/odbc-prepare-error-when-using-library-odbc-with-duckdb/9623)

<div class="topic-metadata">

**Author:** [@xabush](https://swi-prolog.discourse.group/u/xabush)\
**Replies:** 1\
**Last updated:** [May 15, 2026, 6:45am UTC](https://swi-prolog.discourse.group/t/odbc-prepare-error-when-using-library-odbc-with-duckdb/9623 "2026-05-15T06:45:03Z")

</div>

Hi, I am using SWI-Prolog library(odbc) with DuckDB through ODBC. I can run a query successfully with: odbc\_query(opnt, SQL, Row). But the equivalent prepared-statement version fails at prepare time with: ERROR: odb…

---

## [Ctest vs. test\_installation (case closed)](https://swi-prolog.discourse.group/t/ctest-vs-test-installation-case-closed/9614)

<div class="topic-metadata">

**Author:** [@mgondan1](https://swi-prolog.discourse.group/u/mgondan1)\
**Replies:** 0\
**Last updated:** [May 10, 2026, 3:06pm UTC](https://swi-prolog.discourse.group/t/ctest-vs-test-installation-case-closed/9614 "2026-05-10T15:06:09Z")

</div>

I’m using: SWI-Prolog version: current git I want the code to: pass the tests But what I’m getting is: ctest works, but test\_installation doesn’t. My code looks like this: cmake .. make ctest (all tests pass) sudo m…

---

## [Run swish locally](https://swi-prolog.discourse.group/t/run-swish-locally/9612)

<div class="topic-metadata">

**Author:** [@mgondan1](https://swi-prolog.discourse.group/u/mgondan1)\
**Replies:** 5\
**Last updated:** [May 10, 2026, 8:46am UTC](https://swi-prolog.discourse.group/t/run-swish-locally/9612 "2026-05-10T08:46:38Z")

</div>

I followed the steps here, git clone https://github.com/SWI-Prolog/swish cd swish git submodule update --init make packs sudo apt install npm nodejs sudo npm i yarn -g yarn make src sudo apt-get install imagemagick su…

---

## [Patch to include zstd in libarchive](https://swi-prolog.discourse.group/t/patch-to-include-zstd-in-libarchive/9584)

<div class="topic-metadata">

**Author:** [@DewayneG](https://swi-prolog.discourse.group/u/DewayneG)\
**Replies:** 5\
**Last updated:** [May 2, 2026, 3:39am UTC](https://swi-prolog.discourse.group/t/patch-to-include-zstd-in-libarchive/9584 "2026-05-02T03:39:07Z")

</div>

Hi. I needed to read and extract files from tar.zst files, so I’ve created the patches for swipl 10.0.2. The patches work on FreeBSD and I’ve tested by reading headers and by extracting the content of tar.zst files. I’…

---

## [Order and sorting](https://swi-prolog.discourse.group/t/order-and-sorting/9551)

<div class="topic-metadata">

**Author:** [@Boris](https://swi-prolog.discourse.group/u/Boris)\
**Replies:** 40\
**Last updated:** [April 16, 2026, 2:56pm UTC](https://swi-prolog.discourse.group/t/order-and-sorting/9551 "2026-04-16T14:56:02Z")

</div>

Disclaimer: I seem to have a preoccupation with ordering and sorting; I have managed to not let it influence my daily life too badly. I lived in Germany once but I left the country. This topic pops up periodically. Thi…

---

## [Connecting to Redislabs](https://swi-prolog.discourse.group/t/connecting-to-redislabs/9565)

<div class="topic-metadata">

**Author:** [@chris.painter](https://swi-prolog.discourse.group/u/chris.painter)\
**Replies:** 6\
**Last updated:** [April 10, 2026, 9:42am UTC](https://swi-prolog.discourse.group/t/connecting-to-redislabs/9565 "2026-04-10T09:42:50Z")

</div>

I’m using: SWI-Prolog version 10.0.2 I want the code to: connect to a Redislabs databse But what I’m getting is: ERROR: c:/users/chris/documents/prolog/prolog/paths.pl:14: ERROR: Type error: dict' expected, found 1…

---

## [SWI freezes when trying free XPCE objects (?)](https://swi-prolog.discourse.group/t/swi-freezes-when-trying-free-xpce-objects/9550)

<div class="topic-metadata">

**Author:** [@gmenier](https://swi-prolog.discourse.group/u/gmenier)\
**Replies:** 2\
**Last updated:** [March 23, 2026, 7:31pm UTC](https://swi-prolog.discourse.group/t/swi-freezes-when-trying-free-xpce-objects/9550 "2026-03-23T19:31:41Z")

</div>

Hi ! I’m using: SWI-Prolog version 10.0.2 windows I want the code to: open a dialog, show it and remove it. But what I’m getting is: it freezes SWI (I have to kill it). It works ok on SWI 9 (exact same code) My code…

---

## [Python interface (Janus) for Prolog 10?](https://swi-prolog.discourse.group/t/python-interface-janus-for-prolog-10/9547)

<div class="topic-metadata">

**Author:** [@AZH](https://swi-prolog.discourse.group/u/AZH)\
**Replies:** 4\
**Last updated:** [March 18, 2026, 1:55pm UTC](https://swi-prolog.discourse.group/t/python-interface-janus-for-prolog-10/9547 "2026-03-18T13:55:19Z")

</div>

Hi there, anyone successfully call Prolog 10 from Python using Janus? Janus worked fine with Prolog 9.3, but after upgrading to Prolog 10.0.1, apparently it still tries to locate \`/Applications/SWI-Prolog.app/Contents/F…

---

## [Can't create a file](https://swi-prolog.discourse.group/t/cant-create-a-file/9531)

<div class="topic-metadata">

**Author:** [@Glad33k](https://swi-prolog.discourse.group/u/Glad33k)\
**Replies:** 3\
**Last updated:** [February 28, 2026, 7:12am UTC](https://swi-prolog.discourse.group/t/cant-create-a-file/9531 "2026-02-28T07:12:19Z")

</div>

Hi, it’s my first day with prolog because im studying IT, i have to create a file in prolog but on my computer i can’t. Only i get that message, and when i click to create file it automatically crash.

---

## [SWI-Prolog 10.1.4 compilation problem](https://swi-prolog.discourse.group/t/swi-prolog-10-1-4-compilation-problem/9529)

<div class="topic-metadata">

**Author:** [@EWurbel](https://swi-prolog.discourse.group/u/EWurbel)\
**Replies:** 6\
**Last updated:** [February 23, 2026, 4:57pm UTC](https://swi-prolog.discourse.group/t/swi-prolog-10-1-4-compilation-problem/9529 "2026-02-23T16:57:37Z")

</div>

Hi, I just upgraded my machine to Debian Trixie and need to buil a new SWI-prolog deb package. I cloned the development repository with git, not forgetting to initialize submodules. I installed all the necessary build…

---

## [Http\_daemon throwing exception over port number I'm not using](https://swi-prolog.discourse.group/t/http-daemon-throwing-exception-over-port-number-im-not-using/9526)

<div class="topic-metadata">

**Author:** [@mcculloch](https://swi-prolog.discourse.group/u/mcculloch)\
**Replies:** 4\
**Last updated:** [February 22, 2026, 2:58pm UTC](https://swi-prolog.discourse.group/t/http-daemon-throwing-exception-over-port-number-im-not-using/9526 "2026-02-22T14:58:50Z")

</div>

I’m using: SWI-Prolog version 10.0.1. I have a program that runs linux program as a daemon by loading them with consult and then using http\_daemon. It used to work fine but I’m resurrecting it after not using it for a …

---

## [Fixing jvm.dll error in swipl cpack](https://swi-prolog.discourse.group/t/fixing-jvm-dll-error-in-swipl-cpack/9525)

<div class="topic-metadata">

**Author:** [@EricGT](https://swi-prolog.discourse.group/u/EricGT)\
**Replies:** 1\
**Last updated:** [February 21, 2026, 12:57pm UTC](https://swi-prolog.discourse.group/t/fixing-jvm-dll-error-in-swipl-cpack/9525 "2026-02-21T12:57:20Z")

</div>

Building SWI-Prolog on Windows using CMake with MSVC which builds and runs all ctest without error. When running cpack -C Release error occurs CPack: CMake Error at C:/dev/swipl-devel/build/cmake\_install.cmake:1213 …

---

## [Max\_path\_length limitation](https://swi-prolog.discourse.group/t/max-path-length-limitation/5304)

<div class="topic-metadata">

**Author:** [@duesentrieb17](https://swi-prolog.discourse.group/u/duesentrieb17)\
**Replies:** 11\
**Last updated:** [February 19, 2026, 9:06pm UTC](https://swi-prolog.discourse.group/t/max-path-length-limitation/5304 "2026-02-19T21:06:42Z")

</div>

I’m using: SWI-Prolog version 8.4.2 There is a real show stopper in our application with v8.4.2. Specifically, it is this artificial limitation of the path length of around 259: ?- absolute\_file\_name('1111111111111111…

[Next page](https://swi-prolog.discourse.group/c/help/6.md?page=1)
