# Beam\_bathe example - plot\_data error (Stopping the server proxy - Message: Fault)

**URL:** <https://forum.compas-framework.org/t/beam-bathe-example-plot-data-error-stopping-the-server-proxy-message-fault/182>\
**Category:** compas\_fea\
**Created:** [May 9, 2019, 4:49pm UTC](https://forum.compas-framework.org/t/beam-bathe-example-plot-data-error-stopping-the-server-proxy-message-fault/182 "2019-05-09T16:49:36Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![danhaive](https://avatars.discourse-cdn.com/v4/letter/d/7c8e57/32.png) [@danhaive](https://forum.compas-framework.org/u/danhaive)\
**Post date:** [May 9, 2019, 4:49pm UTC](https://forum.compas-framework.org/t/beam-bathe-example-plot-data-error-stopping-the-server-proxy-message-fault/182/1 "2019-05-09T16:49:36Z")

</div>

Hello,

I just completed the installation of compas and compas\_fea, and I am going through the first example file, beam\_bathe. Overall, it seems to work well, as the .inp file is written and the analysis successfully executed. Unfortunately, the last line of code, which is meant to plot the data in the Rhino viewport, throws an error.  
The error message:

```auto
Message: Fault

Traceback:
  line 800, in close, "C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib\xmlrpclib.py"
  line 1493, in parse_response, "C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib\xmlrpclib.py"
  line 1316, in single_request, "C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib\xmlrpclib.py"
  line 1283, in request, "C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib\xmlrpclib.py"
  line 1598, in _ServerProxy__request, "C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib\xmlrpclib.py"
  line 1243, in __call__ , "C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib\xmlrpclib.py"
  line 334, in proxy, "C:\Users\renau\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\compas\rpc\proxy.py"
  line 959, in plot_data, "C:\Users\renau\Dropbox (MIT)\1_PhD\Code\Tools\compas\compas_fea\src\compas_fea\cad\rhino.py"
  line 73, in <module>, "C:\Users\renau\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts\beam_bathe.py"

```

And the last lines printed in the Rhino command line:

> \*\*\*\*\* Data extracted from Abaqus .odb file : 3.732 s \*\*\*\*\*
> 
> \*\*\*\*\* Saving data to structure.results successful : 0.016 s \*\*\*\*\*
> 
> Stopping the server proxy.

Note that I have the src folder of compas and compas\_fea referenced in my environment variables, as recommended [here](https://forum.compas-framework.org/t/importerror-x-using-plot-data-or-other-functions-in-compas-fea/45).

Has anybody encountered this issue before? Any suggestions on how to solve it?

Thanks,

Renaud

---

<div class="post-metadata">

**Author:** ![andrewliew](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.compas-framework.org/andrewliew/32/88_2.png) [@andrewliew](https://forum.compas-framework.org/u/andrewliew)\
**Post date:** [May 9, 2019, 5:48pm UTC](https://forum.compas-framework.org/t/beam-bathe-example-plot-data-error-stopping-the-server-proxy-message-fault/182/2 "2019-05-09T17:48:26Z")

</div>

Hi Renaud,

Looks like the analysis part is fine, I just checked the current `beam_bathe` example on my system and it is fine (double check you have pulled the latest version of **compas\_fea** ), so it must be the communication between Rhino and your system’s CPython via the rpc server in the `plot_data()` function.

Can you first confirm on your system (not in Rhino) that you can import **compas** and **compas\_fea** , by opening a command prompt and importing both, as in the screenshot. If all is okay then no error messages will appear. If this is okay (which it most likely is as you have probably done the `src` folder environment variables correct, as per the link you gave), we can try to debug further.

 ![imports](https://us1.discourse-cdn.com/flex015/uploads/compas_framework1/original/1X/1de4acc5dddb7a80b655832705dc7177d0e57492.png)

---

<div class="post-metadata">

**Author:** ![danhaive](https://avatars.discourse-cdn.com/v4/letter/d/7c8e57/32.png) [@danhaive](https://forum.compas-framework.org/u/danhaive)\
**Post date:** [May 9, 2019, 6:32pm UTC](https://forum.compas-framework.org/t/beam-bathe-example-plot-data-error-stopping-the-server-proxy-message-fault/182/3 "2019-05-09T18:32:44Z")

</div>

Hi Andrew,

Thanks for the quick response. Yes, I can import both compas and compas\_fea without any apparent problem (see below).

 ![image](https://us1.discourse-cdn.com/flex015/uploads/compas_framework1/original/1X/7fd9b574921d75a36c4050d2746b9c9cef9945c2.png)  
As for the version of compas\_fea, I pulled from your master branch today.

Note that, for a reason unbeknownst to me, the error message fluctuates between what I’ve posted above and the following:

```auto
Message: error

Traceback:
  line 820, in connect, "C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib\httplib.py"
  line 844, in send, "C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib\httplib.py"
  line 882, in _send_output, "C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib\httplib.py"
  line 1038, in endheaders, "C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib\httplib.py"
  line 1459, in send_content, "C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib\xmlrpclib.py"
  line 1283, in request, "C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib\xmlrpclib.py"
  line 1598, in _ServerProxy__request, "C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib\xmlrpclib.py"
  line 1243, in __call__ , "C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib\xmlrpclib.py"
  line 334, in proxy, "C:\Users\renau\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\compas\rpc\proxy.py"
  line 959, in plot_data, "C:\Users\renau\Dropbox (MIT)\1_PhD\Code\Tools\compas\compas_fea\src\compas_fea\cad\rhino.py"
  line 575, in create_connection, "C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib\socket.py"
  line 1311, in single_request, "C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib\xmlrpclib.py"
  line 73, in <module>, "C:\Users\renau\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts\beam_bathe.py"

```

Either way, it does look related to the rpc server. I’m going to try and dig deeper into the issue.

Thanks again!

Renaud

---

<div class="post-metadata">

**Author:** ![tomvanmele](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.compas-framework.org/tomvanmele/32/13_2.png) [@tomvanmele](https://forum.compas-framework.org/u/tomvanmele)\
**Post date:** [May 9, 2019, 7:52pm UTC](https://forum.compas-framework.org/t/beam-bathe-example-plot-data-error-stopping-the-server-proxy-message-fault/182/5 "2019-05-09T19:52:16Z")

</div>

FWIW, this is what i think is going on…

judging from both of your prompt messages there seems to be an important difference between your setups that explains the problem.

andrew has a non-Anaconda install, and renaud has an Anaconda install.

for andrew setting the environment variables will work, but for renaud the environment variables will not have an effect when using the RPC server.

RPC will check which environment to activate or use the default environment in no other is available. the activated environment, by design, will use its own set of environment variables and is thus completely unaware of `compas_fea` since it was never “installed” in any environment. it was just added to your system-wide `PYTHONPATH` and to the `Modules Search Paths` in Rhino.

using old-school packages (which are “installed” by adding them to `PYTHONPATH`) in combination with an installed version of COMPAS is currently simply not possible…

@gonzalocasas what do you think?

---

<div class="post-metadata">

**Author:** ![danhaive](https://avatars.discourse-cdn.com/v4/letter/d/7c8e57/32.png) [@danhaive](https://forum.compas-framework.org/u/danhaive)\
**Post date:** [May 9, 2019, 8:18pm UTC](https://forum.compas-framework.org/t/beam-bathe-example-plot-data-error-stopping-the-server-proxy-message-fault/182/6 "2019-05-09T20:18:14Z")

</div>

This explanation makes sense to me, theoretically, but the rpc server seems to be using the Python interpreter associated with my anaconda environment where compas is installed:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/compas_framework1/original/1X/7ff0148fbd3274f3185d7db11bf65f23ec83b7bb.png)

In the anaconda prompt, with the compas environment activated, importing compas\_fea using its Python interpreter does not throw any errors:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/compas_framework1/original/1X/63c5b5eea9763d79a200154a3156a047b664e2ef.png)

That suggests to me that the environment activated by rpc (compas\_env) has access to that module. Is this correct, or am I missing something?

---

<div class="post-metadata">

**Author:** ![tomvanmele](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.compas-framework.org/tomvanmele/32/13_2.png) [@tomvanmele](https://forum.compas-framework.org/u/tomvanmele)\
**Post date:** [May 9, 2019, 8:24pm UTC](https://forum.compas-framework.org/t/beam-bathe-example-plot-data-error-stopping-the-server-proxy-message-fault/182/7 "2019-05-09T20:24:10Z")

</div>

the first image if from the RhinoScriptEditor in Debug mode?

---

<div class="post-metadata">

**Author:** ![danhaive](https://avatars.discourse-cdn.com/v4/letter/d/7c8e57/32.png) [@danhaive](https://forum.compas-framework.org/u/danhaive)\
**Post date:** [May 9, 2019, 8:28pm UTC](https://forum.compas-framework.org/t/beam-bathe-example-plot-data-error-stopping-the-server-proxy-message-fault/182/8 "2019-05-09T20:28:23Z")

</div>

Yes, it is.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/compas_framework1/original/1X/044c0502ee926618d3196a45ba568ed0c004a6b1.png)

---

<div class="post-metadata">

**Author:** ![tomvanmele](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.compas-framework.org/tomvanmele/32/13_2.png) [@tomvanmele](https://forum.compas-framework.org/u/tomvanmele)\
**Post date:** [May 9, 2019, 8:32pm UTC](https://forum.compas-framework.org/t/beam-bathe-example-plot-data-error-stopping-the-server-proxy-message-fault/182/9 "2019-05-09T20:32:48Z")

</div>

it might be the problem is related to your other post. perhaps because you have a non-standard install location for Anaconda (which in previous instances was always related to not having admin rights on your computer) you are not allowed to make the required tmp folders used by RPC inthe background.

can you try running the following from Rhino

```python
import compas
import sys

from compas.datastructures import Mesh
from compas.rpc import Proxy

from compas_rhino.artists import MeshArtist

numerical = Proxy('compas.numerical')

mesh = Mesh.from_obj(compas.get('faces.obj'))

mesh.update_default_vertex_attributes({'px': 0.0, 'py': 0.0, 'pz': 0.0})
mesh.update_default_edge_attributes({'q': 1.0})

key_index = mesh.key_index()

xyz = mesh.get_vertices_attributes('xyz')
edges = [(key_index[u], key_index[v]) for u, v in mesh.edges()]
fixed = [key_index[key] for key in mesh.vertices_where({'vertex_degree': 2})]
q = mesh.get_edges_attribute('q', 1.0)
loads = mesh.get_vertices_attributes(('px', 'py', 'pz'), (0.0, 0.0, 0.0))

xyz, q, f, l, r = numerical.fd_numpy(xyz, edges, fixed, q, loads)

for key, attr in mesh.vertices(True):
    index = key
    attr['x'] = xyz[index][0]
    attr['y'] = xyz[index][1]
    attr['z'] = xyz[index][2]
    attr['rx'] = r[index][0]
    attr['ry'] = r[index][1]
    attr['rz'] = r[index][2]

for index, (u, v, attr) in enumerate(mesh.edges(True)):
    attr['f'] = f[index][0]
    attr['l'] = l[index][0]

artist = MeshArtist(mesh)
artist.draw_vertices()
artist.draw_edges()
artist.draw_faces()
artist.redraw()

```

also, which version of COMPAS do you have?

---

<div class="post-metadata">

**Author:** ![danhaive](https://avatars.discourse-cdn.com/v4/letter/d/7c8e57/32.png) [@danhaive](https://forum.compas-framework.org/u/danhaive)\
**Post date:** [May 9, 2019, 8:52pm UTC](https://forum.compas-framework.org/t/beam-bathe-example-plot-data-error-stopping-the-server-proxy-message-fault/182/11 "2019-05-09T20:52:37Z")

</div>

Yes, that might be it. I have run other compas examples successfully on my laptop but never using the Proxy function and rpc server.  
Running your script from Rhino yields the following error stack:

```auto
Message: Fault

Traceback:
  line 800, in close, "C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib\xmlrpclib.py"
  line 1493, in parse_response, "C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib\xmlrpclib.py"
  line 1316, in single_request, "C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib\xmlrpclib.py"
  line 1283, in request, "C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib\xmlrpclib.py"
  line 1598, in _ServerProxy__request, "C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib\xmlrpclib.py"
  line 1243, in __call__ , "C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib\xmlrpclib.py"
  line 334, in proxy, "C:\Users\renau\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\compas\rpc\proxy.py"
  line 24, in <module>, "C:\Users\renau\AppData\Local\Temp\TempScript.py"

```

I am using the version 0.6.2.

---

<div class="post-metadata">

**Author:** ![tomvanmele](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.compas-framework.org/tomvanmele/32/13_2.png) [@tomvanmele](https://forum.compas-framework.org/u/tomvanmele)\
**Post date:** [May 9, 2019, 8:56pm UTC](https://forum.compas-framework.org/t/beam-bathe-example-plot-data-error-stopping-the-server-proxy-message-fault/182/12 "2019-05-09T20:56:48Z")

</div>

unfortunately the only way to check is to uninstall Anaconda and make sure to reinstall it in the standard location (`C:\Users\renau\Anaconda3`) if your computer allows this…

---

<div class="post-metadata">

**Author:** ![tomvanmele](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.compas-framework.org/tomvanmele/32/13_2.png) [@tomvanmele](https://forum.compas-framework.org/u/tomvanmele)\
**Post date:** [May 9, 2019, 8:59pm UTC](https://forum.compas-framework.org/t/beam-bathe-example-plot-data-error-stopping-the-server-proxy-message-fault/182/13 "2019-05-09T20:59:05Z")

</div>

but let me quickly discuss this tomorrow with a few people first. i don’t want to make you go through all of that if the problem might be related to something else…

---

<div class="post-metadata">

**Author:** ![danhaive](https://avatars.discourse-cdn.com/v4/letter/d/7c8e57/32.png) [@danhaive](https://forum.compas-framework.org/u/danhaive)\
**Post date:** [May 9, 2019, 9:00pm UTC](https://forum.compas-framework.org/t/beam-bathe-example-plot-data-error-stopping-the-server-proxy-message-fault/182/14 "2019-05-09T21:00:43Z")

</div>

Ok, that sounds good.  
Worst case, I’ll save my environments configs and try that. It wouldn’t be the end of the world.

Thanks for the help!

---

<div class="post-metadata">

**Author:** ![danhaive](https://avatars.discourse-cdn.com/v4/letter/d/7c8e57/32.png) [@danhaive](https://forum.compas-framework.org/u/danhaive)\
**Post date:** [May 10, 2019, 2:45am UTC](https://forum.compas-framework.org/t/beam-bathe-example-plot-data-error-stopping-the-server-proxy-message-fault/182/15 "2019-05-10T02:45:31Z")

</div>

Interesting but weird development. It turns out that, if I start the proxy server from outside Rhino (using the Anaconda prompt; see below), it is reused when the script is subsequently run from Rhino, and it works:  
Starting the proxy server from anaconda prompt:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/compas_framework1/original/1X/f7e28a3ba62b6fe9e36ea3ffdf7fde13cabaf1ee.png)

Result from the test script with proxy externally started:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/compas_framework1/original/1X/cef96134f73b9c66b11077490cc132dd48523cb9.png)

I guess that’s a good enough short-term solution, but I’m surprised by this behavior.

---

<div class="post-metadata">

**Author:** ![tomvanmele](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.compas-framework.org/tomvanmele/32/13_2.png) [@tomvanmele](https://forum.compas-framework.org/u/tomvanmele)\
**Post date:** [May 10, 2019, 5:54am UTC](https://forum.compas-framework.org/t/beam-bathe-example-plot-data-error-stopping-the-server-proxy-message-fault/182/16 "2019-05-10T05:54:21Z")

</div>

okay we are getting close 🙂  
can you try the following and report back?

in Anaconda Prompt

```auto
conda info --envs

```

in Rhino

```python
import compas_bootstrapper
from compas_bootstrapper import ENVIRONMENT_NAME
from compas_bootstrapper import PYTHON_DIRECTORY
print ENVIRONMENT_NAME
print PYTHON_DIRECTORY

```

and then finally, do you have COMPAS listed in the `Module Search Paths` in Rhino? (you shouldn’t…)

---

<div class="post-metadata">

**Author:** ![danhaive](https://avatars.discourse-cdn.com/v4/letter/d/7c8e57/32.png) [@danhaive](https://forum.compas-framework.org/u/danhaive)\
**Post date:** [May 10, 2019, 12:22pm UTC](https://forum.compas-framework.org/t/beam-bathe-example-plot-data-error-stopping-the-server-proxy-message-fault/182/17 "2019-05-10T12:22:24Z")

</div>

Yes 🙂

```auto
conda info --envs

```

returns:

```auto
base * C:\Program Files\Anaconda3
compas_env C:\Users\renau\AppData\Local\conda\conda\envs\compas_env
ds3.1 C:\Users\renau\AppData\Local\conda\conda\envs\ds3.1
mfpredict C:\Users\renau\AppData\Local\conda\conda\envs\mfpredict
py27 C:\Users\renau\AppData\Local\conda\conda\envs\py27
tensorflow C:\Users\renau\AppData\Local\conda\conda\envs\tensorflow

```

Running the script in Rhino returns:

```auto
compas_env
C:\Users\renau\AppData\Local\conda\conda\envs\compas_env

```

And I do not have COMPAS in the module search paths, although I do have COMPAS\_FEA referenced there.

---

<div class="post-metadata">

**Author:** ![tomvanmele](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.compas-framework.org/tomvanmele/32/13_2.png) [@tomvanmele](https://forum.compas-framework.org/u/tomvanmele)\
**Post date:** [May 10, 2019, 1:34pm UTC](https://forum.compas-framework.org/t/beam-bathe-example-plot-data-error-stopping-the-server-proxy-message-fault/182/18 "2019-05-10T13:34:49Z")

</div>

hmm that is not what i was expecting…

@andrewliew which version of COMPAS do you have? can you confirm that `compas_fea` works with COMPAS `0.6.2` ?

---

<div class="post-metadata">

**Author:** ![andrewliew](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.compas-framework.org/andrewliew/32/88_2.png) [@andrewliew](https://forum.compas-framework.org/u/andrewliew)\
**Post date:** [May 10, 2019, 2:07pm UTC](https://forum.compas-framework.org/t/beam-bathe-example-plot-data-error-stopping-the-server-proxy-message-fault/182/19 "2019-05-10T14:07:44Z")

</div>

Sorry, arrived a bit late to the party, thanks both for investigating further.

@danhaive Does your trick to run the proxy server outside of Rhino then work with `plot_data()` back in Rhino afterwards?

@tomvanmele I can indeed confirm the **compas\_fea** example works with **compas** 0.6.2 (on my system at least). Might a **compas\_fea** Anaconda install-able be a possible near-term solution?

---

<div class="post-metadata">

**Author:** ![danhaive](https://avatars.discourse-cdn.com/v4/letter/d/7c8e57/32.png) [@danhaive](https://forum.compas-framework.org/u/danhaive)\
**Post date:** [May 10, 2019, 2:09pm UTC](https://forum.compas-framework.org/t/beam-bathe-example-plot-data-error-stopping-the-server-proxy-message-fault/182/21 "2019-05-10T14:09:43Z")

</div>

@andrewliew yes, that works with plot\_data() as well.

---

<div class="post-metadata">

**Author:** ![tomvanmele](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.compas-framework.org/tomvanmele/32/13_2.png) [@tomvanmele](https://forum.compas-framework.org/u/tomvanmele)\
**Post date:** [May 10, 2019, 2:20pm UTC](https://forum.compas-framework.org/t/beam-bathe-example-plot-data-error-stopping-the-server-proxy-message-fault/182/22 "2019-05-10T14:20:40Z")

</div>

i have the feeling that `PYTHONPATH` is added to the active environment when Python is launched from Anaconda Prompt (because Anaconda Prompt takes care of that) but not when Python is launched in a different way; for example through a subprocess from Rhino.

that would explain why all Rhino settings seem to in order and everything works when the Proxy Server is launched from the Anaconda Prompt first, but not when it is launched from Rhino.

perhaps we should add an optional `PYTHONPATH` parameter to RPC that allows for adding search paths on the fly…

i will release a patch to test this.

---

<div class="post-metadata">

**Author:** ![danhaive](https://avatars.discourse-cdn.com/v4/letter/d/7c8e57/32.png) [@danhaive](https://forum.compas-framework.org/u/danhaive)\
**Post date:** [May 10, 2019, 5:49pm UTC](https://forum.compas-framework.org/t/beam-bathe-example-plot-data-error-stopping-the-server-proxy-message-fault/182/23 "2019-05-10T17:49:03Z")

</div>

That makes sense to me. Let me know when/if the patch is released, and I can try it out. In the meantime, I’ll start the server externally first

[Next page](https://forum.compas-framework.org/t/beam-bathe-example-plot-data-error-stopping-the-server-proxy-message-fault/182.md?page=2)
