# Error at the end of the task

**URL:** https://mworks.discourse.group/t/error-at-the-end-of-the-task/150
**Category:** Support
**Created:** [January 23, 2021, 10:56pm UTC](https://mworks.discourse.group/t/error-at-the-end-of-the-task/150 "2021-01-23T22:56:14Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)
#### Post date: [January 23, 2021, 10:56pm UTC](https://mworks.discourse.group/t/error-at-the-end-of-the-task/150/1 "2021-01-23T22:56:14Z")

</div>

Hi Chris,

I’m running a custom-made eye calibration task (the task is coded with OOG library). I have tried the task on other computers (including iMac) and it’s working. However when I run it on my iMac, after the final trial of the task, I get the following error, which prevents the task from terminating.

00:00:28: ERROR: Cannot receive on ZeroMQ socket: Context was terminated  
00:00:28: ERROR: Terminating incoming connection  
00:00:28: ERROR: Cannot send on ZeroMQ socket: Context was terminated  
00:00:28: ERROR: Terminating outgoing connection

I attached the file for the calibration task. I’m using my mouse to set the eye\_x and eye\_y of the eye\_tracker.

Thanks,  
Setayesh

---

<div class="post-metadata">

### Author: ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)
#### Post date: [January 23, 2021, 10:58pm UTC](https://mworks.discourse.group/t/error-at-the-end-of-the-task/150/2 "2021-01-23T22:58:46Z")

</div>

Sorry, I guess the file was not attached.

---

<div class="post-metadata">

### Author: ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)
#### Post date: [January 23, 2021, 10:58pm UTC](https://mworks.discourse.group/t/error-at-the-end-of-the-task/150/3 "2021-01-23T22:58:46Z")

</div>

Attachment: [calibration\_static.py.zip](https://mworks.discourse.group/uploads/short-url/d4JiHh9RL9NnVGO4oykxdvNo1lf.zip) (2.79 KB)

---

<div class="post-metadata">

### Author: ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)
#### Post date: [January 26, 2021, 2:19pm UTC](https://mworks.discourse.group/t/error-at-the-end-of-the-task/150/4 "2021-01-26T14:19:47Z")

</div>

Hi Setayesh,

That’s very strange. The ZeroMQ context used by MWorks is created once and persists until MWServer is closed. Nothing that MWorks does should cause it to be terminated.

It’s possible that this issue results from an unintended interaction between different versions of the ZeroMQ library. On your iMac, have you installed any Python packages that embed ZeroMQ ([pyzmq](https://pypi.org/project/pyzmq/) being the most likely suspect)? If so, maybe try uninstalling said packages and testing if that resolves the issue.

Chris

---

<div class="post-metadata">

### Author: ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)
#### Post date: [July 19, 2022, 7:13pm UTC](https://mworks.discourse.group/t/error-at-the-end-of-the-task/150/5 "2022-07-19T19:13:21Z")

</div>


