Python positional arguments not accepted anymore

Hi,
Trying to run various scripts than ran all good a few months back, I get a lot of this error (in various scenarios).

Traceback (most recent call last):
  File "FontBuildGlyphsFromComponents.py", line 190
    symbol2 = GSComponent("E")
              ^^^^^^^^^^^^^^^^
  File "_new.py", line 98, in __call__
    return self._function(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "_new.py", line 133, in __new__
    raise TypeError(
TypeError: GSComponent() does not accept positional arguments


Traceback (most recent call last):
  File "FontBuildGlyphsFromComponents.py", line 4311
    raise e
  File "FontBuildGlyphsFromComponents.py", line 190
    symbol2 = GSComponent("E")
              ^^^^^^^^^^^^^^^^
  File "_new.py", line 98, in __call__
    return self._function(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "_new.py", line 133, in __new__
    raise TypeError(
TypeError: GSComponent() does not accept positional arguments

I’m not sure to understand what _new.py is?
If I put it as separate keyword argument, it works.

		symbol1 = GSComponent()
		symbol1.componentName= "A"

But I would like to have your opinion before updating the code everywhere.
What are your thoughts on this?
Thanks for your help

What version of Glyphs do you have?
And can you run this in the macro window and post the result?

import objc
print(objc.__version__)

Hi,
The result is 10.2.
In the meantime, I re-installed python (3.11.9) in order to be able to correctly select it in Glyphs settings and it works now.
The other version I had installed is 3.12.5 and it what the one with wich the problem occurred.
Is it advised not to update to the latest version of python in order to avoid this type of problem?
Thanks for your help on this

Generally speaking, you should almost always use the Python that comes with Glyphs (sometimes known as GlyphsPython). In Preferences > Addons, it’s this one:

Most plugins and scripts are made for this version of Python, since it’s the one that comes with Glyphs. So the only scenario where you should use a different Python version is if you’re running a script or plugin that requires a different version of Python (which is rare).