Several errors upon startup after installing SWISH in PEngines


When I first installed PEngines on my Windows 8.1 box everything worked fine. However, after installing the SWISH sub-module, I am getting several errors in the SWI-Prolog console related to paths upon startup. Can someone tell me what is wrong?

ERROR: ~/pengines/apps/swish/
        ~/pengines/apps/swish/lib/ Initialization goal raised exception:
        swish_paths:attach_local_packs/0: Undefined procedure: swish_paths:attach_packs/2
          However, there are definitions for:
ERROR: ~/pengines/apps/swish/lib/
        source_sink `library(pcre)' does not exist
Warning: ~/pengines/apps/swish/lib/
        Goal (directive) failed: web_storage:use_module(library(pcre))
ERROR: ~/pengines/apps/swish/lib/
        source_sink `library(hash_stream)' does not exist
Warning: ~/pengines/apps/swish/lib/
        Goal (directive) failed: gitty_driver_files:use_module(library(hash_stream))
ERROR: ~/pengines/apps/swish/lib/
        source_sink `library(md5)' does not exist
Warning: ~/pengines/apps/swish/lib/
        Goal (directive) failed: avatar:use_module(library(md5))
ERROR: ~/pengines/apps/swish/lib/
        source_sink `library(lazy_lists)' does not exist
Warning: ~/pengines/apps/swish/lib/
        Goal (directive) failed: swish_highlight:use_module(library(lazy_lists))
% Updating GIT version stamps in the background.
ERROR: ~/pengines/apps/swish/
        ~/pengines/apps/swish/lib/ Initialization goal raised exception:
        Domain error: `http_session_option' expected, found `gc(active)'
ERROR: ~/pengines/apps/swish/lib/render/
        source_sink `library(dicts)' does not exist
Warning: ~/pengines/apps/swish/lib/render/
        Goal (directive) failed: swish_render_table:use_module(library(dicts))
ERROR: ~/pengines/
        ~/pengines/apps/swish/ Initialization goal raised exception:
        This program requires SWI-Prolog 7.7.17
        while you are running version 7.2.3.
        Please visit and
        upgrade your version of SWI-Prolog.

Please install 8.1.5.


Hi Jan,

I am running 8.0.2:

Welcome to SWI-Prolog (threaded, 64 bits, version 8.0.2)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.

Would 8.1.5 fix the problem?


The messages suggests you have two versions installed and are somehow using 7.2.3 for SWISH. 8.0.2 should not give these errors, but surely a lot has been improved since :slight_smile:


I see. Yes I do have my older versions around by I am definitely launching with 8.0.2. Is there anything I can do to coerce SWISH into using the newer version?

UPDATE: Via the Windows 8.1 control panel and uninstalled I completely uninstalled 7.6.1. There were no other versions visible. I don’t know why SWISH thinks there is an older version still resident. Old registry keys or something?


UPDATE: I was wrong. Despite creating a file association directly to v8.0.2 via the Windows dialog for that, the version that ended up executing “” when I double-clicked on it was indeed 7.2.3. I don’t know how Windows found it since I uninstalled all versions via the Control Panel, but it did.

I modified my INI file to switch to the Pengines directory and then consult

	NewDir = '~/me/pengines',
	working_directory(OldCwd, NewDir),
	write('Old directory - '), write(OldCwd), nl,
	write('New directory - '), write(NewDir), nl,

Now it works and when I navigate my browser to http://localhost:3030/ I see the PEngines web interface. However, when I click on the link to SWISH, I am getting errors starting with the inability to find a predicate called convlist/3:

Undefined procedure: swish_examples:convlist/3
[27] swish_examples:convlist(add_href('/apps/swish/example'),[...|...],_G1312)
[26] swish_examples:add_examples_href('/apps/swish/example',_G1336{comment:"This file populates the example menu of SWISH. The 'menu' list\n defines the groups inside the menu and their order. Each group is\n separated with a divider. The 'files' section describes the example\n files and their properties. Only files that are assigned a group\n appear in the menu.\n ",files: ...,menu: ...},_G1334) at c:/users/robert/documents/github/me/pengines/apps/swish/lib/
[25] swish_examples:index_json('/apps/swish/example','c:/users/robert/documents/github/me/pengines/apps/swish/examples',_G1359) at c:/users/robert/documents/github/me/pengines/apps/swish/lib/
[24] apply:maplist_('<garbage_collected>',[_G1378|_G1379],swish_examples: ...) at c:/program files (x86)/swipl/library/
[21] swish_examples:swish_examples([_G1399|_G1400]) at c:/users/robert/documents/github/me/pengines/apps/swish/lib/
[20] swish_examples:examples(_G1415,[...]) at c:/users/robert/documents/github/me/pengines/apps/swish/lib/
[19] swish_examples:list_examples('<garbage_collected>') at c:/users/robert/documents/github/me/pengines/apps/swish/lib/
[18] http_dispatch:call_action(swish_examples:list_examples,[...|...]) at c:/program files (x86)/swipl/library/http/
[16] time:run_alarm_goal('<garbage_collected>','<garbage_collected>') at c:/program files (x86)/swipl/library/
[15] setup_call_catcher_cleanup(time: ...,time: ...,_G1486,time: ...) at c:/program files (x86)/swipl/boot/
[8] httpd_wrapper:call_handler('<garbage_collected>',131,'<garbage_collected>') at c:/program files (x86)/swipl/library/http/
[7] catch(httpd_wrapper: ...,error(...,...),httpd_wrapper:true) at c:/program files (x86)/swipl/boot/
[6] httpd_wrapper:handler_with_output_to(pengines_server:http_dispatch,131,'<garbage_collected>',current_output,error(...,...)) at c:/program files (x86)/swipl/library/http/
[5] httpd_wrapper:handler_with_output_to('<garbage_collected>',131,'<garbage_collected>',<stream>(05AE1050),error(...,...)) at c:/program files (x86)/swipl/library/http/
[4] httpd_wrapper:http_wrapper('<garbage_collected>',<stream>(022547F8),<stream>(02255470),_G1601,'<garbage_collected>') at c:/program files (x86)/swipl/library/http/
[3] thread_httpd:http_process('<garbage_collected>',<stream>(022547F8),<stream>(02255470),'<garbage_collected>') at c:/program files (x86)/swipl/library/http/
[2] catch(thread_httpd: ...,_G1633,thread_httpd:true) at c:/program files (x86)/swipl/boot/
[1] thread_httpd:http_worker([...|...]) at c:/program files (x86)/swipl/library/http/
[0] <meta call>

How can I fix this?


A missing convlist/3 looks like a broken Prolog installation. Does exist in the Prolog library? Does the content make sense? Might be fixed using make_library_index/1 if something is wrong with the index

1 Like

Does exist in the Prolog library?

What directory is that?


Ask Prolog :slight_smile:

?- absolute_file_name(swi(library), Dir, [file_type(directory), access(read)]).


?- absolute_file_name(library(.), Dir, [file_type(directory), access(read),solutions(all)]).
1 Like