Inkscape.org
  1. #1
    ivse ivse @ivse

    Hello.

    I have problems using the interpolate function.

    When I try to use it - the interpolate function doesn't answer.

    I get this code message:

     

    interp.py:115: SyntaxWarning: "is" with a literal. Did you mean "=="?
      if strokestyle is 'color':
    interp.py:125: SyntaxWarning: "is" with a literal. Did you mean "=="?
      if fillstyle is 'color':
    Traceback (most recent call last):
      File "interp.py", line 283, in <module>
        Interp().run()
      File "C:\Program Files (x86)\Inkscape\share\inkscape\extensions\inkex\base.py", line 140, in run
        self.save_raw(self.effect())
      File "interp.py", line 101, in effect
        if isgradient(sst['stroke']) and isgradient(est['stroke']):
      File "interp.py", line 99, in <lambda>
        isgradient = lambda x: x.startswith('url(#')
    AttributeError: 'NoneType' object has no attribute 'startswith'

  2. #2
    Tyler Durden Tyler Durden @TylerDurden

    Describe your OS & version, the version of Inkscape and the installer you used.

  3. #3
    ivse ivse @ivse

    Windows 10 Enterprise - 10.0.19042 Build 19042

    I have installed Inkscape 1.0.1 and I used the Windows 64 bit msi

     

     

     

     

  4. #4
    Tyler Durden Tyler Durden @TylerDurden

    Thanks for the thorough reply.

    I'd check if there is a stroke or fill that is "unset".

    (feel free to share an example file.)

    Related: https://gitlab.com/inkscape/extensions/-/issues/291

  5. #5
    ivse ivse @ivse

    Hi Tyler.

    Thanks very much for your help. It worked 😉 I just "set" the stroke - and then - it worked perfectly. Just can't see the "live" function. But this isn't a problem 

    Best regards

    Per

     

  6. #6
    Arnolfini Arnolfini @Arnolfini
    👍

    The problem is simple - Inkscape uses now Python 3.8 and "The compiler now produces a SyntaxWarning when identity checks (is and is not) are used with certain types of literals (e.g. strings, numbers)." Even if you have no idea what you are doing (no programming expericence)  the best way to fix it would be to actually edit lines 115 and 125 of "interp.py" using, for example, notepad++ (https://notepad-plus-plus.org/downloads/). On Windows 64-bit the file can be found at "C:\Program Files\Inkscape\share\inkscape\extensions\". All you have to do is in lines 115 and 125 carefully replace "is" with "==" and save the file. 

     

  7. #7
    ashleedawg ashleedawg @ashleedawg

    @Arnolfini  fixed! awesome tip, thanks... and so begins my journey into the Python rabbit hole.