# Problems with Sweep

**URL:** <https://swi-prolog.discourse.group/t/problems-with-sweep/6558>\
**Category:** Tools\
**Tags:** software\
**Created:** [May 18, 2023, 8:30pm UTC](https://swi-prolog.discourse.group/t/problems-with-sweep/6558 "2023-05-18T20:30:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Submerg](https://avatars.discourse-cdn.com/v4/letter/s/6a8cbe/32.png) [@Submerg](https://swi-prolog.discourse.group/u/Submerg)\
**Post date:** [May 18, 2023, 8:30pm UTC](https://swi-prolog.discourse.group/t/problems-with-sweep/6558/1 "2023-05-18T20:30:08Z")

</div>

I’m trying to set up Sweep, but getting an error whenever I put a Prolog in `sweeprolog-mode`. When I run `M-x sweeprolog-mode`, I get this error over and over while the `sweeprolog-mode` buffer is focused. It stops when the buffer loses focus and resumes again when it regains focus:

```
Loading c:/Program Files/swipl/bin/sweep-module.dll (module)...
Error during redisplay: (eval (when (sweeprolog-buffer-loaded-since-last-modification-p) "/Loaded")) signaled (module-open-failed "c:/Program Files/swipl/bin/sweep-module.dll" "The specified module could not be found.")

```

I’ve set the `sweeprolog-swipl-path` variable with this code:

```
(setq sweeprolog-swipl-path "C:/Program Files/swipl/bin/swipl.exe")

```

The confusing part, is that I’ve confirmed that the file `c:/Program Files/swipl/bin/sweep-module.dll` exists, so I am at a complete lost.

How do I fix this?

---

<div class="post-metadata">

**Author:** ![oskardrums](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/oskardrums/32/3594_2.png) [@oskardrums](https://swi-prolog.discourse.group/u/oskardrums)\
**Post date:** [May 19, 2023, 5:45am UTC](https://swi-prolog.discourse.group/t/problems-with-sweep/6558/2 "2023-05-19T05:45:20Z")

</div>

Hi there!

> [@Submerg](#):
>
> How do I fix this?

The error saying `The specified module could not be found` comes from Windows’ `RunDLL` AFAIU, can you please share some more details about your setup? Namely, how you installed SWI-Prolog and Emacs.

---

<div class="post-metadata">

**Author:** ![Submerg](https://avatars.discourse-cdn.com/v4/letter/s/6a8cbe/32.png) [@Submerg](https://swi-prolog.discourse.group/u/Submerg)\
**Post date:** [May 26, 2023, 12:26am UTC](https://swi-prolog.discourse.group/t/problems-with-sweep/6558/3 "2023-05-26T00:26:12Z")

</div>

> [@"oskardrums](#):
>
> Namely, how you installed SWI-Prolog and Emacs.

Apologies for the late response.

SWI-Prolog was installed from the websites download page. Emacs I got from the website, I believe.

---

<div class="post-metadata">

**Author:** ![oskardrums](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/oskardrums/32/3594_2.png) [@oskardrums](https://swi-prolog.discourse.group/u/oskardrums)\
**Post date:** [May 26, 2023, 11:09am UTC](https://swi-prolog.discourse.group/t/problems-with-sweep/6558/4 "2023-05-26T11:09:23Z")

</div>

Would these both be the respective latest versions? Also, did you install Sweep from ELPA or another source?  
I’m asking about the specifics of your setup because I want to try and reproduce the issue here, in order to investigate it.

---

<div class="post-metadata">

**Author:** ![Submerg](https://avatars.discourse-cdn.com/v4/letter/s/6a8cbe/32.png) [@Submerg](https://swi-prolog.discourse.group/u/Submerg)\
**Post date:** [May 28, 2023, 3:56pm UTC](https://swi-prolog.discourse.group/t/problems-with-sweep/6558/5 "2023-05-28T15:56:33Z")

</div>

> [@"oskardrums](#):
>
> Would these both be the respective latest versions? Also, did you install Sweep from ELPA or another source?

They should be the latest versions, but I can’t check right now. Remind me, what does ELPA stand for again? I believe I simply ran a command and it installed Sweep.
