lifelike / countersheetsextension

Inkscape extension for the layout of sheets of cards, tiles, or counters for boardgames.
Other
233 stars 27 forks source link

Inline images fail to work when Options are used #38

Closed StoneOfLight closed 5 years ago

StoneOfLight commented 5 years ago

The following error code is produced when using inline images if there is an option column set to no.

Traceback (most recent call last): File "countersheet.py", line 1917, in effect.affect() File "inkex.py", line 283, in affect self.effect() File "countersheet.py", line 1275, in effect positions[box].y+rowy) File "countersheet.py", line 727, in generatecounter if not c.is_included(eid): File "countersheet.py", line 107, in is_included if fnmatch.fnmatchcase(eid, eglob): File "C:\Program Files\Inkscape\lib\python2.7/fnmatch.py", line 83, in fnmatchcase return re_pat.match(name) is not None TypeError: expected string or buffer

Steps to reproduce:

  1. Open the not-working-template.csv.
  2. Set one of the rows in the 'image?' column to 'n'.
  3. Run the csv file as input for the not-working-template.svg to see the error.
  4. Setting the row back to 'y' should produce correct output.

Test-Files.zip

Workaround: Instead of using Options for images, replace images with transparent "blank" images and instead of using Options for text, leave text fields blank. Will probably result in a more "bloated" output file for larger projects.

lifelike commented 5 years ago

It is now (latest master, since yesterday) possible to just leave a cell blank to remove an image, so there should be no need to bloat the output with transparent images at least. But this issue should still be fixed of course.

lifelike commented 5 years ago

Looks like this is fixed now. Tested it on Test-Files.zip (not-working files) before and after commit 88d4542 and from what I can see the crash is gone now and the output looks like expected.