# Inkscape plugin error

**URL:** <https://community.inventables.com/t/inkscape-plugin-error/33122>\
**Category:** Laser Cutting\
**Created:** [January 21, 2017, 9:39pm UTC](https://community.inventables.com/t/inkscape-plugin-error/33122 "2017-01-21T21:39:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![JonathanBrown](https://avatars.discourse-cdn.com/v4/letter/j/8e7dd6/32.png) [@JonathanBrown](https://community.inventables.com/u/JonathanBrown)\
**Post date:** [January 21, 2017, 9:39pm UTC](https://community.inventables.com/t/inkscape-plugin-error/33122/1 "2017-01-21T21:39:02Z")

</div>

I am getting the following error each time i try to create gcode for my laser/xcarve combo.

Traceback (most recent call last):  
File “laser.py”, line 3173, in   
e.affect()  
File “/Applications/Inkscape.app/Contents/Resources/share/inkscape/extensions/inkex.py”, line 268, in affect  
self.effect()  
File “laser.py”, line 3170, in effect  
self.laser()  
File “laser.py”, line 3032, in laser  
self.check\_dir()  
File “laser.py”, line 2554, in check\_dir  
if self.options.directory[-1] not in ["/","\"]:  
IndexError: string index out of range

I found a code change that was supposed to help but it seems the code was already changed.  
I just want to cut foam board and I am so frustrated. is there another software that will do this for the laser?

Thanks,  
JB

---

<div class="post-metadata">

**Author:** ![KennethConnell](https://yyz1.discourse-cdn.com/flex009/user_avatar/community.inventables.com/kennethconnell/32/85307_2.png) [@KennethConnell](https://community.inventables.com/u/KennethConnell)\
**Post date:** [January 22, 2017, 4:49pm UTC](https://community.inventables.com/t/inkscape-plugin-error/33122/2 "2017-01-22T16:49:09Z")

</div>

Have you set a valid destination directory for the file to be written to? this is a common thing that is over-looked.

---

<div class="post-metadata">

**Author:** ![KennethConnell](https://yyz1.discourse-cdn.com/flex009/user_avatar/community.inventables.com/kennethconnell/32/85307_2.png) [@KennethConnell](https://community.inventables.com/u/KennethConnell)\
**Post date:** [January 22, 2017, 4:51pm UTC](https://community.inventables.com/t/inkscape-plugin-error/33122/3 "2017-01-22T16:51:18Z")

</div>

here is a link to the set-up instructions [https://jtechphotonics.com/?page\_id=1980](https://jtechphotonics.com/?page_id=1980) make sure the directory field contains a location on your system that you have access to write files to.

---

<div class="post-metadata">

**Author:** ![NaimericVillafruela](https://yyz1.discourse-cdn.com/flex009/user_avatar/community.inventables.com/naimericvillafruela/32/67344_2.png) [@NaimericVillafruela](https://community.inventables.com/u/NaimericVillafruela)\
**Post date:** [March 14, 2018, 3:56pm UTC](https://community.inventables.com/t/inkscape-plugin-error/33122/4 "2018-03-14T15:56:15Z")

</div>

Hi,  
I have the same problem but i doesn’t come from my directory path. I’ve tried on a mac and pc, both paths are correct and they are writable.

Any idea ?

My exact error message is :

> Traceback (most recent call last):  
> File “laser.py”, line 3173, in   
> e.affect()  
> File “/Applications/Inkscape.app/Contents/Resources/share/inkscape/extensions/inkex.py”, line 283, in affect  
> self.effect()  
> File “laser.py”, line 3154, in effect  
> self.get\_info()  
> File “laser.py”, line 2884, in get\_info  
> recursive\_search(self.document.getroot(),self.document.getroot())  
> File “laser.py”, line 2865, in recursive\_search  
> recursive\_search(i,i)  
> File “laser.py”, line 2867, in recursive\_search  
> points = self.get\_orientation\_points(i)  
> File “laser.py”, line 2907, in get\_orientation\_points  
> r = re.match(r’(?i)\s\*(\s\*(-?\s\*\d\*(?:,|.)_\d_)\s\*;\s\*(-?\s\*\d\*(?:,|.)_\d_)\s\*;\s\*(-?\s\*\d\*(?:,|.)_\d_)\s\*)\s\*',node.text)  
> File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py”, line 141, in match  
> return \_compile(pattern, flags).match(string)  
> TypeError: expected string or buffer

---

<div class="post-metadata">

**Author:** ![Markaldo](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@Markaldo](https://community.inventables.com/u/Markaldo)\
**Post date:** [November 13, 2019, 3:18pm UTC](https://community.inventables.com/t/inkscape-plugin-error/33122/5 "2019-11-13T15:18:15Z")

</div>

> [@JonathanBrown](#):
>
> IndexError: string index out of range

In Python, a string is a single-dimensional array of characters. The [string index out of range](http://net-informations.com/python/err/range.htm) means that the index you are trying to access does not exist. In a string, that means you’re trying to get a character from the string at a given point. If that given point does not exist , then you will be trying to get a character that is not inside of the string. Indexes in Python programming start at 0. This means that the maximum index for any string will always be length-1. There are several ways to account for this. Knowing the length of your string (using len() function)could certainly help you to avoid going over the index.

---

<div class="post-metadata">

**Author:** ![DollyMayert](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@DollyMayert](https://community.inventables.com/u/DollyMayert)\
**Post date:** [April 14, 2021, 7:16am UTC](https://community.inventables.com/t/inkscape-plugin-error/33122/6 "2021-04-14T07:16:45Z")

</div>

I am facing the same problem. Please give some solution to us. Thanks in advance

[My CC Pay](https://www.myccpay.tech/)
