# Get mworks events on Braintree

**URL:** <https://mworks.discourse.group/t/get-mworks-events-on-braintree/120>\
**Category:** Support\
**Created:** [July 9, 2021, 3:00pm UTC](https://mworks.discourse.group/t/get-mworks-events-on-braintree/120 "2021-07-09T15:00:06Z")\
**Posts on this page:** 3\
**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:** [July 9, 2021, 3:00pm UTC](https://mworks.discourse.group/t/get-mworks-events-on-braintree/120/1 "2021-07-09T15:00:06Z")

</div>

Hi Chris,

I am trying to stay on Braintree when reading mworks events. Since the files are so big now and since everything else is on Braintree, it would be nice to not process files with my local mworks installation on my mac. Ideally, the code would run from Braintree rather than locally, like all my other code.

When I copy the matlab scripts, it complains that there is a mac mex file, so the MWORKS/Scripting/MATLAB version cannot just be copied to Braintree and used. I assume there is no easy fix for this?

When I try to use python, it throws an error for the

from mworks.data import MWKFile, presumably because the sys.path.insert way to add the code is not working?

I am new to python so I am hoping there is a trivial solution for this?

Thanks!

Alina

---

<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 9, 2021, 3:11pm UTC](https://mworks.discourse.group/t/get-mworks-events-on-braintree/120/2 "2021-07-09T15:11:57Z")

</div>

Hi Alina,

MWorks’ official data-file tools for both Python and MATLAB depend on compiled code that runs only on macOS. However, there are some unofficial (and unsupported) ways of reading MWorks event files on other operating systems. In particular, I’ve written a pure-Python MWK2 reader (described [in the docs](https://mworks.github.io/documentation/latest/reference/event_file_format/current.html#example-code) and [available on GitHub](https://github.com/mworks/mworks/blob/master/tools/python/test_mworks/readers/mwk2.py)). To use it, you’ll need to install the [msgpack](https://pypi.org/project/msgpack/) package.

For a bit more info, see [this discussion](https://mworks.tenderapp.com/discussions/questions/1400).

Cheers,  
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:05pm UTC](https://mworks.discourse.group/t/get-mworks-events-on-braintree/120/3 "2022-07-19T19:05:33Z")

</div>


