Skip to content

Radio group demo doesn't work, problem with super()? #205

@justinpenner

Description

@justinpenner

macOS 12.6.5
Python 3.11
Vanilla 0.5.0

I have a GlyphsApp plugin that stopped working after the Glyphs team pushed a Vanilla module update a few days ago (I think they updated from Vanilla 0.2.4 to 0.5.0).

I thought maybe something has changed in Vanilla over all those versions, but the syntax I'm using is basically the same as the example in the Vanilla docs. So I tried running the demo from https://vanilla.robotools.dev/en/latest/objects/RadioGroup.html in a fresh venv, and I get the same error that my plugin was getting:

Traceback (most recent call last):
  File "…/vanilla-test.py", line 23, in <module>
    RadioGroupDemo()
  File "…/vanilla-test.py", line 7, in __init__
    self.w.radioGroup = HorizontalRadioGroup(
                        ^^^^^^^^^^^^^^^^^^^^^
  File "…/venv/lib/python3.11/site-packages/vanilla/vanillaRadioGroup.py", line 191, in __init__
    self._init(HorizontalRadioGroup, posSize, titles, callback=callback, sizeStyle=sizeStyle)
  File "…/venv/lib/python3.11/site-packages/vanilla/vanillaRadioGroup.py", line 26, in _init
    super().__init__(posSize, spacing=spacing, alignment="leading")
TypeError: object.__init__() takes exactly one argument (the instance to initialize)

I'm a bit lost since this seems to imply that Vanilla has been broken since 0.2.4? That doesn't make sense. After some digging I found that Vanilla is using super() from pyobjc instead of Python stdlib, so maybe something is newly broken in pyobjc?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions