# Compas -v 0.15.5 unknown error

**URL:** <https://forum.compas-framework.org/t/compas-v-0-15-5-unknown-error/331>\
**Category:** compas\
**Created:** [April 8, 2020, 1:26pm UTC](https://forum.compas-framework.org/t/compas-v-0-15-5-unknown-error/331 "2020-04-08T13:26:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Keerthana](https://avatars.discourse-cdn.com/v4/letter/k/9fc29f/32.png) [@Keerthana](https://forum.compas-framework.org/u/Keerthana)\
**Post date:** [April 8, 2020, 1:26pm UTC](https://forum.compas-framework.org/t/compas-v-0-15-5-unknown-error/331/1 "2020-04-08T13:26:29Z")

</div>

I upgraded to compas 0.15.5 and tried to run a simple test script and I got an error

The script I ran:

import compas  
from compas.datastructures import Mesh  
from compas\_rhino.utilities import select\_mesh  
from compas\_rhino.artists import MeshArtist  
from compas\_rhino.geometry import RhinoMesh

guid = select\_mesh("select mesh ")  
mesh = RhinoMesh.from\_guid(guid).to\_compas()  
print(type(mesh))

#artist  
artist = MeshArtist(mesh, layer=‘COMPAS::test’)  
artist.clear\_layer()  
artist.draw\_faces(join\_faces=True)  
artist.draw\_edges()  
artist.redraw()

the error message:  
**’NoneType’ object has no attribute 'Attributes’**  
Traceback:  
line 515, in draw\_mesh, “C:\Users\ukeer\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\compas\_rhino\utilities\drawing.py”  
line 553, in draw\_faces, “C:\Users\ukeer\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\compas\_rhino\utilities\drawing.py”  
line 100, in wrapper, “C:\Users\ukeer\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\compas\_rhino\utilities\drawing.py”  
line 100, in wrapper, “C:\Users\ukeer\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\compas\_rhino\utilities\drawing.py”  
line 397, in draw\_faces, “C:\Users\ukeer\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\compas\_rhino\artists\meshartist.py”  
line 22, in , “c:\Users\ukeer\GitHub\hilo\_floor\_fabrication\src\hilo\_floor\_fabrication\rhino\selectors.py”

---

<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:** [April 8, 2020, 2:37pm UTC](https://forum.compas-framework.org/t/compas-v-0-15-5-unknown-error/331/2 "2020-04-08T14:37:06Z")

</div>

could you try the following:

```python
mesh = RhinoMesh.from_guid(guid)
faces = []
for face in mesh.faces:
    if face[0] == face[-1]:
        faces.append(face[:-1])
    elif face[-2] == face[-1]:
        faces.append(face[:-1])
    else:
        faces.append(face)

mesh = Mesh.from_vertices_and_faces(mesh.vertices, faces)   

```

---

<div class="post-metadata">

**Author:** ![Keerthana](https://avatars.discourse-cdn.com/v4/letter/k/9fc29f/32.png) [@Keerthana](https://forum.compas-framework.org/u/Keerthana)\
**Post date:** [April 9, 2020, 5:44am UTC](https://forum.compas-framework.org/t/compas-v-0-15-5-unknown-error/331/3 "2020-04-09T05:44:47Z")

</div>

Yes this works. Thank you!  
just noticed from\_guid is not implemented

> <https://github.com/compas-dev/compas/blob/master/src/compas_rhino/geometry/_geometry.py>

---

<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:** [April 9, 2020, 8:12am UTC](https://forum.compas-framework.org/t/compas-v-0-15-5-unknown-error/331/4 "2020-04-09T08:12:21Z")

</div>

the file you are referring to is the base class for all geometry classes. the implementations are in the deriving classes. the error is not related to that.

the classmethod `from_vertices_and_faces` wrongly assumes that the only duplicate vertices will be at the beginning and end of the face vertex list (in case the input has all faces explicitly closed), but rhino actually has duplicate vertices at the end of the vertex list in case of triangle faces.

i will update `to_compas` to take this into account and then your original snippet should just work…

---

<div class="post-metadata">

**Author:** ![Keerthana](https://avatars.discourse-cdn.com/v4/letter/k/9fc29f/32.png) [@Keerthana](https://forum.compas-framework.org/u/Keerthana)\
**Post date:** [April 9, 2020, 8:24am UTC](https://forum.compas-framework.org/t/compas-v-0-15-5-unknown-error/331/5 "2020-04-09T08:24:25Z")

</div>

Understood. Thank you for explaining

---

<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:** [April 24, 2020, 11:26am UTC](https://forum.compas-framework.org/t/compas-v-0-15-5-unknown-error/331/6 "2020-04-24T11:26:12Z")

</div>

this should be fixed since 857a29e0
