lifelike / countersheetsextension

Inkscape extension for the layout of sheets of cards, tiles, or counters for boardgames.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when running cards example

MtHiker opened this issue · comments

I am an Inkscape newbie, so this may be user error. I installed your extension, but I have not been able to get either of the example svgs to work.

  • I am running Inkscape 1.2 on Windows 10.
  • I downloaded and copied the countersheetextension files from GitHub as instructed.
  • I loaded cards.svg and then ran the extension and got the following error messages below. I have tried various approaches to get this to work, but not having any success. Can you provide direction? Thanks for your help!

Error Message:
C:\Program Files\Inkscape\share\inkscape\extensions\countersheet.py:1350: DeprecationWarning: inkex.elements._svg.width -> Use :func:viewport_width instead
self.logwrite("svg.width: %s\n" % self.svg.width)
C:\Program Files\Inkscape\share\inkscape\extensions\countersheet.py:1351: DeprecationWarning: inkex.elements._svg.height -> Use :func:viewport_height instead
self.logwrite("svg.height: %s\n" % self.svg.height)
Traceback (most recent call last):
File "C:\Program Files\Inkscape\share\inkscape\extensions\countersheet.py", line 2247, in
effect.run()
File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\base.py", line 231, in run
self.save_raw(self.effect())
File "C:\Program Files\Inkscape\share\inkscape\extensions\countersheet.py", line 1528, in effect
width, height=self.generatecounter(c, rects, layer,
File "C:\Program Files\Inkscape\share\inkscape\extensions\countersheet.py", line 823, in generatecounter
x = self.geometry[rectname].x
KeyError: 'icärd'

I believe there is something odd with Windows and parsing UTF-8 text. The same issue was reported last year, but it was closed by whomever reported it: #82

The ä in cärds was deliberately added to catch errors like this, and it usually works, but it seems like with some Windows configuration it does not.

It would be good to fix this if anyone has an idea.

The examples are ancient and I need to clean up a bit though. Will remove everything there. The useful files are in the templates directory. The examples are still used for some automated tests, but not useful for much else. There are better cards in templates. Have a look there. The cards examples should work if you change cärds to cards in the SVG and CSV. I will change it in the repo. It is probably best to always only use simple ASCII in SVG ids and not funny national characters, to not confuse Windows Inkscape.

File is now hidden away in svgtests/input and wiki updated to not mention examples/cards.

https://github.com/lifelike/countersheetsextension/wiki/Cards

Issue is not actually fixed though. Still needs some investigation.

Thanks for the quick response. I have played around with some of the template files as recommended and am having more success. Thanks again.