Recently attempted to plot from Inkscape (Linux) on my Refine MH721 Vinyl Plotter. I've seen it working in Youtube videos but can't find much info on getting it to work. When I try I get the following message:
Traceback (most recent call last): File "/usr/share/inkscape/extensions/plotter.py", line 162, in <module> Plot().run() File "/usr/share/inkscape/extensions/inkex/base.py", line 231, in run self.save_raw(self.effect()) ^^^^^^^^^^^^^ File "/usr/share/inkscape/extensions/plotter.py", line 95, in effect self.options.to_port(self.options.to_language(encoder.getHpgl())) File "/usr/share/inkscape/extensions/plotter.py", line 150, in to_serial with Serial( ^^^^^^^ File "/usr/share/inkscape/extensions/inkex/ports.py", line 54, in __init__ self.has_serial() File "/usr/share/inkscape/extensions/inkex/ports.py", line 99, in has_serial raise DependencyError("pySerial is required to open serial ports.") inkex.utils.DependencyError: pySerial is required to open serial ports.
Can anyone help? I'm wondering if there are some dependencies missing or some Python script I need.
When I set the wrong value in Inkscape → extension → export → plott here → contact with plotter, I get nearly the same Info you wrote first. After I set the serial port in the machine (virtual COM), an the other values in Inkscape, I can plott. I did not know anything about phyton. But I know that some part of the plottfunktion in Inskcape was wrote in phython. But when this part did not get the rigth value (p. 29) it send the line you wrote.
It is not a problem of phyton it is a problem of wrong value for contact plotter to PC and Inkscape.
It is necessary that you prove if you have a real USB-Port or a adapter COM to USB with dmesg to set the right serial port //dev/tty???[port number]
I will try to explain how I connected and use a vinylplotter/-cutter with Linux and Inkscape. They come from Refine, Vevor and Black Cat. I am aloud to use them as a voluntary youth worker at different places, with youth groups.
Because of having problem reading and writing any language, I will write in my mother tongue German, at the moment. Perhaps there is someone who can translate or I will try at weekend.
Beginnen wir mit dem Gerät. Eine Gerät mit einem alten parallelen, LPT Drucker Port kann von Inkscape nicht angesteuert werden. Hier wird ein Adapter benötigt.
Die genannten Geräten haben neben einem alten seriellen COM-Port auch einen eingebauten Adapter vom alten seriellen COM-Port zu einem neuen seriellen USB-Port.
Beim Gerät von Vevor muß in dem Gerät, welches mir zur Verfügung steht, selbst eingestellt werden, ob ein Parallelport oder ein serieller (Virual-COM) Port genutzt werden soll. Hierfür wird evtl. ein Passwort (Code) 21 oder 12 benötigt.
Da die Geräte mit einem PC mit USB-Tastatur, USB-Maus, USB-Drucker und USB-Scanner genutzt werden, wird der Rechner zunächst, ohne daß der Plotter eingesteckt ist, gebootet.
Nach dem Booten wird in die Konsole gewechselt. Hierfür muß man evtl. als Administrator gemeldet sein und auf die Ebene des OS wechseln. Mit dmesg werden alle belegten USB-Ports aufgezeigt.
Nun kann der Plotter eingesteckt und angeschaltet werden. Mit erneuter Eingabe von dmesg ( | tail ) hat man evtl. Glück, daß der neue USB-Port oder Adaptername angezeigt wird. Falls nicht, muß der Rechner mit dem eingesteckten und angeschalteten Plotter erneut gebootet werden. Nach einem erneuten Durchgang von dmesg ( | tail ) (als Administrator) auf der Konsole, sollte ein weiterer Eintrag mit /dev/ttyUSBX, /dev/ttyAMCX, /dev/ttyFTDX o. ä. erschienen sein. X steht dabei für die Zahl des belegten USB-Port. /dev/ttyUSBX zeigt an, daß ein normaler USB-Port oder „normaler“ Adapter COM zu USB vorliegt, /dev/ttyAMCX, /dev/ttyFTDX etc. zeigen an, daß „spezielle“ COM zu USB Adapter genutzt werden.
Dieser Name bzw. Port wird für Inkscape benötigt. Hiermit verbindet sich Inkscape unter „Erweiterungen → Exportieren → Plotten sowie Plotten → Verbindungseinstellung“ mit dem Plotter. X müßte bei der angegeben Konstellation 4 sein, da 0 für die Tastatur steht, 1 für die Maus, 2 für den Drucker, da dieser als drittes installiert wurde und 3 für den Scanner, da dieser als viertes installiert wurde. Sollten noch weitere USB-Ports vorher belegt worden sein, ändert sich dieses entsprechend. Wichtig dabei ist, daß USB, AMC, FTD o.ä. groß geschrieben, wenn es in Inkscape übertragen wird. Und es darf keine Leerstelle zwischen den großen Buchstaben und der Zahl sein.
Nach dem dieses geschafft ist, geht es an die weiteren Werte unter Inkscape in „Erweiterungen → Exportieren → Plotten sowie Plotten → Verbindungseinstellung“
Ich bin mit den Werten, die auf Seite 29 in meiner Gedächtnisstütze ( up.picr.de/47512637su.pdf ) aufgeführt sind, gut gefahren. (Hier wird die Einstellung mit einem Laptop ohne weitere USB-Portbelegung gezeigt, daher /dev/ttyAMC0). Ich habe aber auch in verschiedenen Blogs und Anleitungen zu den Geräten andere Werte gesehen. So wird in der Anleitung des Black Cat z. B. eine Baudrate von 38400 statt 9600 genommen, welches auch beim Black Cat im Gerät selbst eingestellt werden muß (Setting BR). Und ein größeres Gerät von Refine soll mit einer seriellen Baudrate von 14400 DPI genutzt werden. Hier muß daher unter Umständen etwas ausprobiert werden. Selbst wenn ich auch einen Vervor KH720 nutzen kann, könnte die interne Software eine andere oder der Adapter ein anderer sein. Geräte des selben Herstellers, wie Vevor und Refine, mit gleicher Produktbezeichnung, werden / wurden aus / mit unterschiedlichen Bauteilen und Software zusammen gesetzt.
Here you will find the newer version. hobbyschneiderin24.net/forums/topic/189095-vom-bild-zum-plot-plotten-f%C3%Bcr-dummies/page/3/#comment-2783254 ( up.picr.de/47607068aq.pdf )
I'm no expert, but it looks to me as though you are missing pySerial. I had this problem in 2019, but things have moved on a bit since then so there isn't much point in me telling you what I did.
"Have done a successful test. First removed the snap installed inkscape and install from ppa:inkscape.dev/stable again. Same error as described. Then manually installed pyserial with
Yep, re-installed pyserial and python. Said it was already installed updated a couple files and no dice. I have found that some people were having trouble with the snap installations. Where the snap install put inkscape in a kind of sandbox and you would have to apply special permissions for it to access pyserial... But I didn't use a snap install and am unaware of any permissions I could grant. But I'm also a newb so...?
I'm not an expert, but I have now got Inkscape working with my Liyu plotter (after failing to get it working with the snap version of Inkscape) and am happy to offer up my limited knowledge in case it helps.
Which operating system are you using? Are you able to post here the error message you get ?
"Traceback (most recent call last): File "/app/share/inkscape/extensions/plotter.py", line 167, in <module> Plot().run() File "/app/share/inkscape/extensions/inkex/base.py", line 250, in run self.save_raw(self.effect()) ^^^^^^^^^^^^^ File "/app/share/inkscape/extensions/plotter.py", line 97, in effect self.options.to_port(self.options.to_language(encoder.getHpgl())) File "/app/share/inkscape/extensions/plotter.py", line 152, in to_serial with Serial( ^^^^^^^ File "/app/share/inkscape/extensions/inkex/ports.py", line 54, in __init__ self.has_serial() File "/app/share/inkscape/extensions/inkex/ports.py", line 99, in has_serial raise DependencyError("pySerial is required to open serial ports.") inkex.utils.DependencyError: pySerial is required to open serial ports."
My serial port is the same as it is in inkcut: /dev/ttyUSB0 - USB2.0-Serial
I've got Inkscape 1.2.2 running on Ubuntu 24.04 and once I installed Inkscape using apt rather than as a snap it connected to the plotter without any issues.
With my limited knowledge it looks from the error message as though pySerial is the issue - I had this problem five years ago but installing pySerial solved it for me.
I cut from Inkscape using the Extensions>Export>Plot function rather than Inkcut. This does require making sure you have the right port selected, but what about trying this as an alternative to Inkcut? I realise you would probably rather stick with Inkcut, but it might at least give you a work around.
The current work around is cutting in inkcut (i have the stand alone that launches from terminal). Lots of little reasons that I'm trying to make this work, my cuts are coming out a slightly larger size than they are in both inkscape and inkcut so I'd like to nail down some variables. Inkcut also broke when I upgraded to Mint 22 (I time warped back to 21.3) so im hoping if I can get the extension to work it will be more stable.
Do you have any suggestions for other cutting software that will run in linux? Most of what I've seen is pay software I'd have to see if I could get to run in a bottle which feels like I'd run into more of the issues I'm seeing now.
Dude... I had a significant journey today. Did a lot of linux learning, tried a ton of things and broke things. Backed everything up gearing up for a distro swap. Tried MX and couldn't get it work there either didn't fall in love with MX wound up TimeShifting to the very earliest snapshot I had. Then updated everything back up and tried a few other things from other forums that sounded related to my problems then when I was out of ideas and tired of trying things that i was kind of afraid of I input my serial port again and my plotter sprang to life. I ran two pen plots and then it would throw errors again. Not the same error as before, this was just a "failed to open serial connection" type of error. I restarted my pc and it worked again. I've done several more plots and it seems to be keeping it's cool. Sorry to any future folks that having the same problems because I have no idea what thing it was that fixed it. Bad news is Inkcut will no longer install correctly (something about qt bindings not being found). Anyway @GJenkinsUK thanks for the help even just commenting here gave me a push to keep going.
Glad it is all sorted out and sorry that my limited knowledge means that I couldn't help more. It is deeply, deeply frustrating when something that has worked for years stops working after an update. Unfortunately the plotting/cutting community seems to be quite small so not a lot of advice is available and in my experience a lot of the information on the internet is massively out of date.
So well done for sticking with it and may you have many happy years of plotting.
Recently attempted to plot from Inkscape (Linux) on my Refine MH721 Vinyl Plotter. I've seen it working in Youtube videos but can't find much info on getting it to work. When I try I get the following message:
Traceback (most recent call last):
File "/usr/share/inkscape/extensions/plotter.py", line 162, in <module>
Plot().run()
File "/usr/share/inkscape/extensions/inkex/base.py", line 231, in run
self.save_raw(self.effect())
^^^^^^^^^^^^^
File "/usr/share/inkscape/extensions/plotter.py", line 95, in effect
self.options.to_port(self.options.to_language(encoder.getHpgl()))
File "/usr/share/inkscape/extensions/plotter.py", line 150, in to_serial
with Serial(
^^^^^^^
File "/usr/share/inkscape/extensions/inkex/ports.py", line 54, in __init__
self.has_serial()
File "/usr/share/inkscape/extensions/inkex/ports.py", line 99, in has_serial
raise DependencyError("pySerial is required to open serial ports.")
inkex.utils.DependencyError: pySerial is required to open serial ports.
Can anyone help? I'm wondering if there are some dependencies missing or some Python script I need.
Well its German but I wrote here something. up.picr.de/47512637su.pdf p. 23 ( xyleroo.de/schneideplotter.html ) and p. 29,
also see link inkscape.org/forums/Deutsch/plotter-nicht-ansteuerbar/
BmP
@bmp18 thanks, I translated your documents but there doesn't seem to be anything in there relevant to my issue
When I set the wrong value in Inkscape → extension → export → plott here → contact with plotter, I get nearly the same Info you wrote first. After I set the serial port in the machine (virtual COM), an the other values in Inkscape, I can plott. I did not know anything about phyton. But I know that some part of the plottfunktion in Inskcape was wrote in phython. But when this part did not get the rigth value (p. 29) it send the line you wrote.
It is not a problem of phyton it is a problem of wrong value for contact plotter to PC and Inkscape.
It is necessary that you prove if you have a real USB-Port or a adapter COM to USB with dmesg to set the right serial port //dev/tty???[port number]
BmP
I will try to explain how I connected and use a vinylplotter/-cutter with Linux and Inkscape. They come from Refine, Vevor and Black Cat. I am aloud to use them as a voluntary youth worker at different places, with youth groups.
Because of having problem reading and writing any language, I will write in my mother tongue German, at the moment. Perhaps there is someone who can translate or I will try at weekend.
Beginnen wir mit dem Gerät. Eine Gerät mit einem alten parallelen, LPT Drucker Port kann von Inkscape nicht angesteuert werden. Hier wird ein Adapter benötigt.
Die genannten Geräten haben neben einem alten seriellen COM-Port auch einen eingebauten Adapter vom alten seriellen COM-Port zu einem neuen seriellen USB-Port.
Beim Gerät von Vevor muß in dem Gerät, welches mir zur Verfügung steht, selbst eingestellt werden, ob ein Parallelport oder ein serieller (Virual-COM) Port genutzt werden soll. Hierfür wird evtl. ein Passwort (Code) 21 oder 12 benötigt.
Da die Geräte mit einem PC mit USB-Tastatur, USB-Maus, USB-Drucker und USB-Scanner genutzt werden, wird der Rechner zunächst, ohne daß der Plotter eingesteckt ist, gebootet.
Nach dem Booten wird in die Konsole gewechselt. Hierfür muß man evtl. als Administrator gemeldet sein und auf die Ebene des OS wechseln. Mit dmesg werden alle belegten USB-Ports aufgezeigt.
Nun kann der Plotter eingesteckt und angeschaltet werden. Mit erneuter Eingabe von dmesg ( | tail ) hat man evtl. Glück, daß der neue USB-Port oder Adaptername angezeigt wird. Falls nicht, muß der Rechner mit dem eingesteckten und angeschalteten Plotter erneut gebootet werden. Nach einem erneuten Durchgang von dmesg ( | tail ) (als Administrator) auf der Konsole, sollte ein weiterer Eintrag mit /dev/ttyUSBX, /dev/ttyAMCX, /dev/ttyFTDX o. ä. erschienen sein. X steht dabei für die Zahl des belegten USB-Port. /dev/ttyUSBX zeigt an, daß ein normaler USB-Port oder „normaler“ Adapter COM zu USB vorliegt, /dev/ttyAMCX, /dev/ttyFTDX etc. zeigen an, daß „spezielle“ COM zu USB Adapter genutzt werden.
Dieser Name bzw. Port wird für Inkscape benötigt. Hiermit verbindet sich Inkscape unter „Erweiterungen → Exportieren → Plotten sowie Plotten → Verbindungseinstellung“ mit dem Plotter. X müßte bei der angegeben Konstellation 4 sein, da 0 für die Tastatur steht, 1 für die Maus, 2 für den Drucker, da dieser als drittes installiert wurde und 3 für den Scanner, da dieser als viertes installiert wurde. Sollten noch weitere USB-Ports vorher belegt worden sein, ändert sich dieses entsprechend. Wichtig dabei ist, daß USB, AMC, FTD o.ä. groß geschrieben, wenn es in Inkscape übertragen wird. Und es darf keine Leerstelle zwischen den großen Buchstaben und der Zahl sein.
Nach dem dieses geschafft ist, geht es an die weiteren Werte unter Inkscape in „Erweiterungen → Exportieren → Plotten sowie Plotten → Verbindungseinstellung“
Ich bin mit den Werten, die auf Seite 29 in meiner Gedächtnisstütze ( up.picr.de/47512637su.pdf ) aufgeführt sind, gut gefahren. (Hier wird die Einstellung mit einem Laptop ohne weitere USB-Portbelegung gezeigt, daher /dev/ttyAMC0). Ich habe aber auch in verschiedenen Blogs und Anleitungen zu den Geräten andere Werte gesehen. So wird in der Anleitung des Black Cat z. B. eine Baudrate von 38400 statt 9600 genommen, welches auch beim Black Cat im Gerät selbst eingestellt werden muß (Setting BR). Und ein größeres Gerät von Refine soll mit einer seriellen Baudrate von 14400 DPI genutzt werden. Hier muß daher unter Umständen etwas ausprobiert werden. Selbst wenn ich auch einen Vervor KH720 nutzen kann, könnte die interne Software eine andere oder der Adapter ein anderer sein. Geräte des selben Herstellers, wie Vevor und Refine, mit gleicher Produktbezeichnung, werden / wurden aus / mit unterschiedlichen Bauteilen und Software zusammen gesetzt.
BmP
Here you will find the newer version. hobbyschneiderin24.net/forums/topic/189095-vom-bild-zum-plot-plotten-f%C3%Bcr-dummies/page/3/#comment-2783254 ( up.picr.de/47607068aq.pdf )
BmP
newer version: up.picr.de/47687881qh.pdf BmP
I'm no expert, but it looks to me as though you are missing pySerial. I had this problem in 2019, but things have moved on a bit since then so there isn't much point in me telling you what I did.
Others have had this problem more recently than I have - see https://gitlab.com/inkscape/inkscape/-/issues/3963
See the post from David Lehmann, where he says:
"Have done a successful test. First removed the snap installed inkscape and install from ppa:inkscape.dev/stable again. Same error as described. Then manually installed pyserial with
gives me the messages
Good luck.
@JoePineapples, did you ever find a solution? I'm having the same issue.
@boyagogo Have you tried installing pyserial to if this helps? When I the same problem some years ago I solved it by installing pyserial.
Yep, re-installed pyserial and python. Said it was already installed updated a couple files and no dice. I have found that some people were having trouble with the snap installations. Where the snap install put inkscape in a kind of sandbox and you would have to apply special permissions for it to access pyserial... But I didn't use a snap install and am unaware of any permissions I could grant. But I'm also a newb so...?
I'm not an expert, but I have now got Inkscape working with my Liyu plotter (after failing to get it working with the snap version of Inkscape) and am happy to offer up my limited knowledge in case it helps.
Which operating system are you using? Are you able to post here the error message you get ?
Absolutely.
"Traceback (most recent call last):
File "/app/share/inkscape/extensions/plotter.py", line 167, in <module>
Plot().run()
File "/app/share/inkscape/extensions/inkex/base.py", line 250, in run
self.save_raw(self.effect())
^^^^^^^^^^^^^
File "/app/share/inkscape/extensions/plotter.py", line 97, in effect
self.options.to_port(self.options.to_language(encoder.getHpgl()))
File "/app/share/inkscape/extensions/plotter.py", line 152, in to_serial
with Serial(
^^^^^^^
File "/app/share/inkscape/extensions/inkex/ports.py", line 54, in __init__
self.has_serial()
File "/app/share/inkscape/extensions/inkex/ports.py", line 99, in has_serial
raise DependencyError("pySerial is required to open serial ports.")
inkex.utils.DependencyError: pySerial is required to open serial ports."
My serial port is the same as it is in inkcut: /dev/ttyUSB0 - USB2.0-Serial
Version info:
Inkscape 1.3.2 (091e20ef0f, 2023-11-25)
I'm running linux Mint 21.3 Cinnamon 6.0.4
I've got Inkscape 1.2.2 running on Ubuntu 24.04 and once I installed Inkscape using apt rather than as a snap it connected to the plotter without any issues.
With my limited knowledge it looks from the error message as though pySerial is the issue - I had this problem five years ago but installing pySerial solved it for me.
I don't know whether or not this page helps: https://www.geeksforgeeks.org/how-to-install-python-serial-package-on-linux/
It gives a command you can run to see if pySerial is properly installed.
Looks like it is. possible clue though is at the end of the show pyserial:
Name: pyserial
Version: 3.5
Summary: Python Serial Port Extension
Home-page: https://github.com/pyserial/pyserial
Author: Chris Liechti
Author-email: cliechti@gmx.net
License: BSD
Location: /usr/lib/python3/dist-packages
Requires:
Required-by: inkcut
Last line was blank in the example on the site you refered me to. Here it says "Required-by: Inkcut". Inkcut is what I am currently plotting with.
I cut from Inkscape using the Extensions>Export>Plot function rather than Inkcut. This does require making sure you have the right port selected, but what about trying this as an alternative to Inkcut? I realise you would probably rather stick with Inkcut, but it might at least give you a work around.
The current work around is cutting in inkcut (i have the stand alone that launches from terminal). Lots of little reasons that I'm trying to make this work, my cuts are coming out a slightly larger size than they are in both inkscape and inkcut so I'd like to nail down some variables. Inkcut also broke when I upgraded to Mint 22 (I time warped back to 21.3) so im hoping if I can get the extension to work it will be more stable.
Do you have any suggestions for other cutting software that will run in linux? Most of what I've seen is pay software I'd have to see if I could get to run in a bottle which feels like I'd run into more of the issues I'm seeing now.
Unfortunately I didn't find any affordable Linux alternative to Inkscape when I feared I would not be able to get Inkscape/Ubuntu to drive my cutter.
I think over the weekend I am going to try another distro.
All I can say is that I found Inkscape 1.2.2 worked fine with Ubuntu 24.04 once I installed it from a terminal using apt rather than as a snap.
Dude... I had a significant journey today. Did a lot of linux learning, tried a ton of things and broke things. Backed everything up gearing up for a distro swap. Tried MX and couldn't get it work there either didn't fall in love with MX wound up TimeShifting to the very earliest snapshot I had. Then updated everything back up and tried a few other things from other forums that sounded related to my problems then when I was out of ideas and tired of trying things that i was kind of afraid of I input my serial port again and my plotter sprang to life. I ran two pen plots and then it would throw errors again. Not the same error as before, this was just a "failed to open serial connection" type of error. I restarted my pc and it worked again. I've done several more plots and it seems to be keeping it's cool. Sorry to any future folks that having the same problems because I have no idea what thing it was that fixed it. Bad news is Inkcut will no longer install correctly (something about qt bindings not being found). Anyway @GJenkinsUK thanks for the help even just commenting here gave me a push to keep going.
Glad it is all sorted out and sorry that my limited knowledge means that I couldn't help more. It is deeply, deeply frustrating when something that has worked for years stops working after an update. Unfortunately the plotting/cutting community seems to be quite small so not a lot of advice is available and in my experience a lot of the information on the internet is massively out of date.
So well done for sticking with it and may you have many happy years of plotting.