Closed gordonjcp closed 4 years ago
That seems strange to me. The offending line of code is similar to other inkscape 1.0 plugins.
Our code: https://github.com/leechwort/knob-scale-generator/blob/master/render_knob_scale.py#L31
Similar Examples: https://github.com/fm3/inkscape-latexformula/blob/master/latexformula.py#L15 https://github.com/gimpscape/group-to-layer/blob/master/inkscape-1.0/group_to_layer.py#L32
I'm wondering what version of python your inkscape is set up to use?
The recommendation by Inkscape developers relating to that line was this:
Effect.OptionParser or `optparse` has been deprecated and replaced with `argparser`.You must change `self.OptionParser.add_option` to `self.arg_parser.add_argument`; the arguments are similar.
...which is exactly what I did.
@gordonjcp I'd appreciate knowing your python version. If you could find the time, I'd also be interested to know if either of the group-to-layer or inkscape-latexformula plugins cause errors for you, which might indicate that the issue is related to your installation.
In the meanwhile, you can try installing the previous version to see if that works for you: https://github.com/leechwort/knob-scale-generator/tree/096e6633c0273e3b10e2ad8cc4c4c021ab519fe7
I couldn't comment on the issue earlier, but I tracked it down to broken bits of Inkscape lying around from a pre-1.0 install.
Totally my error.
When I install it in Inkscape 1.0 (1.0+r73+1) I can see the option to use it, the dialogue box pops up, put clicking Apply does nothing and toggling "Live Preview" pops up an error message with the following:
Traceback (most recent call last): File "render_knob_scale.py", line 285, in
e = Knob_Scale()
File "render_knob_scale.py", line 31, in init
self.arg_parser.add_argument("--x",
AttributeError: 'Knob_Scale' object has no attribute 'arg_parser'