SVG 不使用inkscape 命令行打开,但使用gui 打开

Car*_*ver 2 command-line svg inkscape

我对inkscape很陌生,我想使用命令行界面和以下命令(与SVG在同一目录中)处理一批SVG:

$ inkscape -D -z NMY.svg
Run Code Online (Sandbox Code Playgroud)

但是,当我尝试使用 CLI 加载 SVG 时,我收到以下警告:

** (inkscape-bin:8875): WARNING **: Can't open file: NMY.svg (doesn't exist)

** (inkscape-bin:8875): WARNING **: Can't open file: NMY.svg (doesn't exist)

** (inkscape-bin:8875): WARNING **: Specified document NMY.svg cannot be opened (does not exist or not a valid SVG file)
Run Code Online (Sandbox Code Playgroud)

但是,从 GUI 打开相同的 SVG 会正确显示图像。

这是有问题的标题 SVG,以防它出现问题:

<?xml version='1.0' encoding='iso-8859-1'?>
<svg version='1.1' baseProfile='full'
          xmlns:svg='http://www.w3.org/2000/svg'
                  xmlns:rdkit='http://www.rdkit.org/xml'
                  xmlns:xlink='http://www.w3.org/1999/xlink'
              xml:space='preserve'
width='250px' height='150px' >
Run Code Online (Sandbox Code Playgroud)

Inkscape 0.92.2 5c3e80d, 2017-08-06在 MacOS 10.14 上使用inkscape 。

谢谢!

Car*_*ver 6

发现问题,我不得不指定文件的绝对路径。