yantoz / krita-arrangeLayers

Adding the missing "align and distribute layers" functionality to Krita
MIT License
5 stars 0 forks source link

Possible error - but this is on preAlpha 5.3 #1

Open AlanEdd opened 2 months ago

AlanEdd commented 2 months ago

Hey there FYI, I am getting this error when I load up a file. I am running 5.3 preAlpha so perhaps I am jumping the gun. Here is the error message anyway. Thanks Alan.

`TypeError

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

...pykrita\arrangeLayers\arrangeLayers.py in layerChanged() 277 enableA, enableD, activeLayer, _ = testEnable() 278 enableA = enableA or (activeLayer is not None) 279 extension.setEnable(enableA, enableD) 280 if docker: 281 docker.setEnable(enableA, enableD) global extension = extension.setEnable = > enableA = False enableD = None

...pykrita\arrangeLayers\arrangeLayers.py in setEnable(self=, enableA=False, enableD=None) 187 return 188 if self.menu: 189 self.menu.setEnabled(enableA or enableD) 190 try: 191 for i in range(6): self = self.menu = self.menu.setEnabled = enableA = False enableD = None TypeError: setEnabled(self, bool): argument 1 has unexpected type 'NoneType' cause = None class = <class 'TypeError'> context = None delattr = <method-wrapper 'delattr' of TypeError object> dict = {} dir = doc = 'Inappropriate argument type.' eq = <method-wrapper 'eq' of TypeError object> format = ge = <method-wrapper 'ge' of TypeError object> getattribute = <method-wrapper 'getattribute' of TypeError object> gt = <method-wrapper 'gt' of TypeError object> hash = <method-wrapper 'hash' of TypeError object> init = <method-wrapper 'init' of TypeError object> init_subclass = <built-in method init_subclass of type object> le = <method-wrapper 'le' of TypeError object> lt = <method-wrapper 'lt' of TypeError object> ne = <method-wrapper 'ne' of TypeError object> new = reduce = reduce_ex = <built-in method reduce_ex of TypeError object> repr = <method-wrapper 'repr' of TypeError object> setattr = <method-wrapper 'setattr' of TypeError object> setstate = sizeof = str = <method-wrapper 'str' of TypeError object> subclasshook = __suppress_context = False traceback__ = args = ("setEnabled(self, bool): argument 1 has unexpected type 'NoneType'",) with_traceback =

The above is a description of an error in a Python program. Here is the original traceback:

Traceback (most recent call last): File ....\pykrita\arrangeLayers\arrangeLayers.py", line 279, in layerChanged extension.setEnable(enableA, enableD) File "....pykrita\arrangeLayers\arrangeLayers.py", line 189, in setEnable self.menu.setEnabled(enableA or enableD) TypeError: setEnabled(self, bool): argument 1 has unexpected type 'NoneType'

`

yantoz commented 2 months ago

@AlanEdd, first I thought this might be because 5.3 breaks something, but I found that I got the same error with 5.2.3. I identified the cause and fixed it so could you please check if it is fixed as well for you?

AlanEdd commented 2 months ago

Thank you so much! I'll check it out