# Several errors upon startup after installing SWISH in PEngines

**URL:** <https://swi-prolog.discourse.group/t/several-errors-upon-startup-after-installing-swish-in-pengines/622>\
**Category:** Help!\
**Created:** [May 8, 2019, 2:31pm UTC](https://swi-prolog.discourse.group/t/several-errors-upon-startup-after-installing-swish-in-pengines/622 "2019-05-08T14:31:26Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![prodog](https://avatars.discourse-cdn.com/v4/letter/p/57b2e6/32.png) [@prodog](https://swi-prolog.discourse.group/u/prodog)\
**Post date:** [May 8, 2019, 2:31pm UTC](https://swi-prolog.discourse.group/t/several-errors-upon-startup-after-installing-swish-in-pengines/622/1 "2019-05-08T14:31:26Z")

</div>

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?

```prolog
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.

```

---

<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:** [May 8, 2019, 3:46pm UTC](https://swi-prolog.discourse.group/t/several-errors-upon-startup-after-installing-swish-in-pengines/622/2 "2019-05-08T15:46:33Z")

</div>

> [@prodog](#):
>
> This program requires SWI-Prolog 7.7.17 while you are running version 7.2.3.

Please install 8.1.5.

---

<div class="post-metadata">

**Author:** ![prodog](https://avatars.discourse-cdn.com/v4/letter/p/57b2e6/32.png) [@prodog](https://swi-prolog.discourse.group/u/prodog)\
**Post date:** [May 8, 2019, 4:08pm UTC](https://swi-prolog.discourse.group/t/several-errors-upon-startup-after-installing-swish-in-pengines/622/3 "2019-05-08T16:08:02Z")

</div>

Hi Jan,

I am running 8.0.2:

```prolog
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?

---

<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:** [May 8, 2019, 4:21pm UTC](https://swi-prolog.discourse.group/t/several-errors-upon-startup-after-installing-swish-in-pengines/622/4 "2019-05-08T16:21:41Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![prodog](https://avatars.discourse-cdn.com/v4/letter/p/57b2e6/32.png) [@prodog](https://swi-prolog.discourse.group/u/prodog)\
**Post date:** [May 8, 2019, 4:30pm UTC](https://swi-prolog.discourse.group/t/several-errors-upon-startup-after-installing-swish-in-pengines/622/5 "2019-05-08T16:30:17Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![prodog](https://avatars.discourse-cdn.com/v4/letter/p/57b2e6/32.png) [@prodog](https://swi-prolog.discourse.group/u/prodog)\
**Post date:** [May 8, 2019, 7:36pm UTC](https://swi-prolog.discourse.group/t/several-errors-upon-startup-after-installing-swish-in-pengines/622/6 "2019-05-08T19:36:59Z")

</div>

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_:

```prolog
:- 
	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/](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_:

```prolog
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?

---

<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:** [May 9, 2019, 8:39am UTC](https://swi-prolog.discourse.group/t/several-errors-upon-startup-after-installing-swish-in-pengines/622/7 "2019-05-09T08:39:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![prodog](https://avatars.discourse-cdn.com/v4/letter/p/57b2e6/32.png) [@prodog](https://swi-prolog.discourse.group/u/prodog)\
**Post date:** [May 9, 2019, 11:00am UTC](https://swi-prolog.discourse.group/t/several-errors-upon-startup-after-installing-swish-in-pengines/622/8 "2019-05-09T11:00:24Z")

</div>

> [@jan](#):
>
> Does `INDEX.pl` exist in the Prolog library?

> > Does `INDEX.pl` exist in the Prolog library?

What directory is that?

---

<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:** [May 9, 2019, 11:37am UTC](https://swi-prolog.discourse.group/t/several-errors-upon-startup-after-installing-swish-in-pengines/622/9 "2019-05-09T11:37:32Z")

</div>

Ask Prolog 🙂

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

```

or

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

```
