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/swish.pl:47:
        ~/pengines/apps/swish/lib/paths.pl:42: Initialization goal raised exception:
        swish_paths:attach_local_packs/0: Undefined procedure: swish_paths:attach_packs/2
          However, there are definitions for:
                swish_paths:attach_packs/0
ERROR: ~/pengines/apps/swish/lib/storage.pl:68:
        source_sink `library(pcre)' does not exist
Warning: ~/pengines/apps/swish/lib/storage.pl:68:
        Goal (directive) failed: web_storage:use_module(library(pcre))
ERROR: ~/pengines/apps/swish/lib/gitty_driver_files.pl:72:
        source_sink `library(hash_stream)' does not exist
Warning: ~/pengines/apps/swish/lib/gitty_driver_files.pl:72:
        Goal (directive) failed: gitty_driver_files:use_module(library(hash_stream))
ERROR: ~/pengines/apps/swish/lib/avatar.pl:45:
        source_sink `library(md5)' does not exist
Warning: ~/pengines/apps/swish/lib/avatar.pl:45:
        Goal (directive) failed: avatar:use_module(library(md5))
ERROR: ~/pengines/apps/swish/lib/highlight.pl:53:
        source_sink `library(lazy_lists)' does not exist
Warning: ~/pengines/apps/swish/lib/highlight.pl:53:
        Goal (directive) failed: swish_highlight:use_module(library(lazy_lists))
% Updating GIT version stamps in the background.
ERROR: ~/pengines/apps/swish/swish.pl:217:
        ~/pengines/apps/swish/lib/session.pl:54: Initialization goal raised exception:
        Domain error: `http_session_option' expected, found `gc(active)'
ERROR: ~/pengines/apps/swish/lib/render/table.pl:41:
        source_sink `library(dicts)' does not exist
Warning: ~/pengines/apps/swish/lib/render/table.pl:41:
        Goal (directive) failed: swish_render_table:use_module(library(dicts))
ERROR: ~/pengines/load.pl:18:
        ~/pengines/apps/swish/swish.pl:80: Initialization goal raised exception:
        This program requires SWI-Prolog 7.7.17
        while you are running version 7.2.3.
        Please visit http://www.swi-prolog.org 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 “run.pl” 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 run.pl:

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

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
In:
[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/examples.pl:223
[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/examples.pl:198
[24] apply:maplist_('<garbage_collected>',[_G1378|_G1379],swish_examples: ...) at c:/program files (x86)/swipl/library/apply.pl:191
[21] swish_examples:swish_examples([_G1399|_G1400]) at c:/users/robert/documents/github/me/pengines/apps/swish/lib/examples.pl:138
[20] swish_examples:examples(_G1415,[...]) at c:/users/robert/documents/github/me/pengines/apps/swish/lib/examples.pl:122
[19] swish_examples:list_examples('<garbage_collected>') at c:/users/robert/documents/github/me/pengines/apps/swish/lib/examples.pl:87
[18] http_dispatch:call_action(swish_examples:list_examples,[...|...]) at c:/program files (x86)/swipl/library/http/http_dispatch.pl:642
[16] time:run_alarm_goal('<garbage_collected>','<garbage_collected>') at c:/program files (x86)/swipl/library/time.pl:139
[15] setup_call_catcher_cleanup(time: ...,time: ...,_G1486,time: ...) at c:/program files (x86)/swipl/boot/init.pl:310
[8] httpd_wrapper:call_handler('<garbage_collected>',131,'<garbage_collected>') at c:/program files (x86)/swipl/library/http/http_wrapper.pl:300
[7] catch(httpd_wrapper: ...,error(...,...),httpd_wrapper:true) at c:/program files (x86)/swipl/boot/init.pl:274
[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/http_wrapper.pl:280
[5] httpd_wrapper:handler_with_output_to('<garbage_collected>',131,'<garbage_collected>',<stream>(05AE1050),error(...,...)) at c:/program files (x86)/swipl/library/http/http_wrapper.pl:290
[4] httpd_wrapper:http_wrapper('<garbage_collected>',<stream>(022547F8),<stream>(02255470),_G1601,'<garbage_collected>') at c:/program files (x86)/swipl/library/http/http_wrapper.pl:106
[3] thread_httpd:http_process('<garbage_collected>',<stream>(022547F8),<stream>(02255470),'<garbage_collected>') at c:/program files (x86)/swipl/library/http/thread_httpd.pl:717
[2] catch(thread_httpd: ...,_G1633,thread_httpd:true) at c:/program files (x86)/swipl/boot/init.pl:274
[1] thread_httpd:http_worker([...|...]) at c:/program files (x86)/swipl/library/http/thread_httpd.pl:540
[0] <meta call>

How can I fix this?

A missing convlist/3 looks like a broken Prolog installation. Does INDEX.pl 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 INDEX.pl exist in the Prolog library?

What directory is that?

Ask Prolog :slight_smile:

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

or

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