# Glyphs 3 mekkablue script Copy Layer to Layer gives Python errors

**URL:** <https://forum.glyphsapp.com/t/glyphs-3-mekkablue-script-copy-layer-to-layer-gives-python-errors/16667>\
**Category:** Scripting\
**Created:** [November 26, 2020, 5:29pm UTC](https://forum.glyphsapp.com/t/glyphs-3-mekkablue-script-copy-layer-to-layer-gives-python-errors/16667 "2020-11-26T17:29:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cormullion](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/cormullion/32/33901_2.png) [@Cormullion](https://forum.glyphsapp.com/u/Cormullion)\
**Post date:** [November 26, 2020, 5:29pm UTC](https://forum.glyphsapp.com/t/glyphs-3-mekkablue-script-copy-layer-to-layer-gives-python-errors/16667/1 "2020-11-26T17:29:46Z")

</div>

This script seems to fail if one of the target layers (not the current layer) contains components which are to be deleted.

```auto
Copy Layer to Layer Protocol:
- Deleting 1 paths in target layer
- Copying paths
- Deleting 1 components in target layer

⚠️ Script Error:

Traceback (most recent call last):
  File "Copy Layer to Layer.py", line 311, in buttonCallback
  File "Copy Layer to Layer.py", line 300, in buttonCallback
  File "Copy Layer to Layer.py", line 223, in copyComponentsFromLayerToLayer
AttributeError: can't set attribute

```

It works as expected in Glyphs 2.

---

<div class="post-metadata">

**Author:** ![mekkablue](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/mekkablue/32/23_2.png) [@mekkablue](https://forum.glyphsapp.com/u/mekkablue)\
**Post date:** [November 28, 2020, 11:09am UTC](https://forum.glyphsapp.com/t/glyphs-3-mekkablue-script-copy-layer-to-layer-gives-python-errors/16667/2 "2020-11-28T11:09:27Z")

</div>

Cannot reproduce. What did you do before you got the error?  
**EDIT:** _I think I found the issue. Fixing it…_  
**UPDATE:** fixed, thanks for reporting!
