-2

I'm trying the Designer GUI TOOL of pyFpdf but upon running the designer.py with python designer.py it gives an error:

  File "designer.py", line 154
    except Exception, e:
                    ^
SyntaxError: invalid syntax

I checked the python file at line 154 and it's this code:

try:
    values[field] = eval(dlg.textctrls[field].GetValue())
except Exception, e:
    msg = wx.MessageDialog(parent, unicode(e),
           "Error in field %s" % field,
            wx.OK | wx.ICON_INFORMATION
            )
    msg.ShowModal()
    msg.Destroy()
    break

Is it the pyfpdf's problem? I'm running Python 3.8

4

1 回答 1

-1

Yes, it's pyfpdf's problem. This is Python2 syntax. There should be a newer version on the project site which is written for Python3. They also describe the problem here.

于 2020-05-14T08:21:37.890 回答