gillescastel / inkscape-figures

Inkscape figure manager
MIT License
557 stars 119 forks source link

No pdf/pdf_tex created because of unexpected(?) inkscape_version_number #21

Closed towadroid closed 4 years ago

towadroid commented 4 years ago

When trying to use the functionality to automatically save as pdf and pdf_tex when saving as svg no output was generated for me. (I ran the watch command before.) I followed the advice of this comment and got the following output:

Debug output log ``` DEBUG:inotify.adapters:Events received from epoll: ['IN_ACCESS'] DEBUG:inotify.adapters:Events received in stream: ['IN_CLOSE_WRITE'] INFO:inkscape-figures:Recompiling /home/towa/tex-test/figures/hallo3.svg DEBUG:inkscape-figures:Inkscape 0.92.4 (5da689c313, 2019-01-14) Traceback (most recent call last): File "/home/towa/.local/bin/inkscape-figures", line 4, in cli() File "/home/towa/.local/lib/python3.7/site-packages/click/core.py", line 829, in __call__ return self.main(*args, **kwargs) File "/home/towa/.local/lib/python3.7/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/home/towa/.local/lib/python3.7/site-packages/click/core.py", line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/towa/.local/lib/python3.7/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/towa/.local/lib/python3.7/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "/home/towa/.local/lib/python3.7/site-packages/inkscapefigures/main.py", line 113, in watch watcher_cmd() File "/home/towa/.local/lib/python3.7/site-packages/inkscapefigures/main.py", line 213, in watch_daemon_inotify maybe_recompile_figure(path) File "/home/towa/.local/lib/python3.7/site-packages/inkscapefigures/main.py", line 131, in maybe_recompile_figure inkscape_version_number = float(inkscape_version.split()[1].split('-')[0]) ValueError: could not convert string to float: '0.92.4' DEBUG:inotify.adapters:Cleaning-up inotify. ```

Running inkscape --version gives Inkscape 0.92.4 (5da689c313, 2019-01-14). I don't know what the expected output here is but apparently this string can't be processed further.

gillescastel commented 4 years ago

I'll fix this ASAP. This bug was introduced by a pull request.

gillescastel commented 4 years ago

Thank you for filing this issue :smiley: This should be fixed by commit fa4768e87! Updating inkscape-figures to version 1.0.7 should fix your problem. Please report back if it does.

towadroid commented 4 years ago

Looking through the closed issues I'm seeing the different versioning scheme now :D

towadroid commented 4 years ago

Yes, the new version fixed it for me. Thanks for the fast fix! Sorry that I took so long, I somehow had to fight with pip...

gillescastel commented 4 years ago

Glad it is fixed. Thanks for reporting back!