I'm trying to batch convert svg vector files to EPS files but having trouble.
Command I'm using:
for file in /tmp/0/*.svg; do inkscape "$file" -o "${file%svg}eps" --export-ignore-filters --export-ps-level=3; done
Error I'm getting:
Gtk-Message: 12:09:52.418: Failed to load module "canberra-gtk-module"
Gtk-Message: 12:09:52.420: Failed to load module "canberra-gtk-module"
** (org.inkscape.Inkscape:948538): WARNING **: 12:09:52.682: Can't open file: /tmp/0/test20016.svg (doesn't exist)
** (org.inkscape.Inkscape:948538): WARNING **: 12:09:52.682: Can't open file: /tmp/0/test20016.svg (doesn't exist)
ink_file_open: '/tmp/0/test20016.svg' cannot be opened!
InkscapeApplication::document_open: Failed to open: /tmp/0/test20016.svg
ConcreteInkscapeApplication::on_open: failed to create document!
Gtk-Message: 12:09:52.956: Failed to load module "canberra-gtk-module"
Gtk-Message: 12:09:52.958: Failed to load module "canberra-gtk-module"
** (org.inkscape.Inkscape:948666): WARNING **: 12:09:53.223: Can't open file: /tmp/0/test20022.svg (doesn't exist)
** (org.inkscape.Inkscape:948666): WARNING **: 12:09:53.224: Can't open file: /tmp/0/test20022.svg (doesn't exist)
ink_file_open: '/tmp/0/test20022.svg' cannot be opened!
InkscapeApplication::document_open: Failed to open: /tmp/0/test20022.svg
ConcreteInkscapeApplication::on_open: failed to create document!
The file is there and can be opened using the GUI of inkscape
I'm using the snap version of Inkscape:
Inkscape 1.2.2 (b0a8486541, 2022-12-01, custom)
inkscape /tmp/0/test20016.svg
Fails to open file:
Gtk-Message: 12:30:49.665: Failed to load module "canberra-gtk-module"
Gtk-Message: 12:30:49.667: Failed to load module "canberra-gtk-module"
** (org.inkscape.Inkscape:966787): WARNING **: 12:30:49.981: Can't open file: /tmp/0/test20016.svg (doesn't exist)
** (org.inkscape.Inkscape:966787): WARNING **: 12:30:49.981: Can't open file: /tmp/0/test20016.svg (doesn't exist)
ink_file_open: '/tmp/0/test20016.svg' cannot be opened!
InkscapeApplication::document_open: Failed to open: /tmp/0/test20016.svg
ConcreteInkscapeApplication::on_open: failed to create document!
Other commands work as expected:
$ for file in /tmp/0/*.svg; do ls "$file"; done
/tmp/0/test20016.svg
/tmp/0/test20022.svg
I did a sudo apt install libcanberra-gtk-module libcanberra-gtk3-module
but still has issues with the canberra-gtk-module
I'm running Ubuntu 20.04 LTS:
Linux sys76 5.15.0-57-generic #63~20.04.1-Ubuntu SMP Wed Nov 30 13:40:16 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.5 LTS
Release: 20.04
Codename: focal