Bug 392411 - Error to save (ok) ten brushes
Summary: Error to save (ok) ten brushes
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Scripting (other bugs)
Version First Reported In: 4.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-27 13:11 UTC by Seryoga Biryukov
Modified: 2018-03-27 17:58 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Seryoga Biryukov 2018-03-27 13:11:16 UTC
AttributeError
Python 3.6.2: python
Tue Mar 27 16:09:34 2018

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

 C:\Program Files\Krita (x64)\share\krita\pykrita\tenbrushes\tenbrushesdialog.py in accept(self=<tenbrushes.tenbrushesdialog.TenBrushesDialog object>)
   21 
   22     def accept(self):
   23         self.uitenbrushes.tentbrushes.writeSettings()
   24 
   25         super(TenBrushesDialog, self).accept()
self = <tenbrushes.tenbrushesdialog.TenBrushesDialog object>
self.uitenbrushes = <tenbrushes.uitenbrushes.UITenBrushes object>
self.uitenbrushes.tentbrushes undefined
AttributeError: 'UITenBrushes' object has no attribute 'tentbrushes'
    __cause__ = None
    __class__ = <class 'AttributeError'>
    __context__ = None
    __delattr__ = <method-wrapper '__delattr__' of AttributeError object>
    __dict__ = {}
    __dir__ = <built-in method __dir__ of AttributeError object>
    __doc__ = 'Attribute not found.'
    __eq__ = <method-wrapper '__eq__' of AttributeError object>
    __format__ = <built-in method __format__ of AttributeError object>
    __ge__ = <method-wrapper '__ge__' of AttributeError object>
    __getattribute__ = <method-wrapper '__getattribute__' of AttributeError object>
    __gt__ = <method-wrapper '__gt__' of AttributeError object>
    __hash__ = <method-wrapper '__hash__' of AttributeError object>
    __init__ = <method-wrapper '__init__' of AttributeError object>
    __init_subclass__ = <built-in method __init_subclass__ of type object>
    __le__ = <method-wrapper '__le__' of AttributeError object>
    __lt__ = <method-wrapper '__lt__' of AttributeError object>
    __ne__ = <method-wrapper '__ne__' of AttributeError object>
    __new__ = <built-in method __new__ of type object>
    __reduce__ = <built-in method __reduce__ of AttributeError object>
    __reduce_ex__ = <built-in method __reduce_ex__ of AttributeError object>
    __repr__ = <method-wrapper '__repr__' of AttributeError object>
    __setattr__ = <method-wrapper '__setattr__' of AttributeError object>
    __setstate__ = <built-in method __setstate__ of AttributeError object>
    __sizeof__ = <built-in method __sizeof__ of AttributeError object>
    __str__ = <method-wrapper '__str__' of AttributeError object>
    __subclasshook__ = <built-in method __subclasshook__ of type object>
    __suppress_context__ = False
    __traceback__ = <traceback object>
    args = ("'UITenBrushes' object has no attribute 'tentbrushes'",)
    with_traceback = <built-in method with_traceback of AttributeError object>

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

Traceback (most recent call last):
  File "C:\Program Files\Krita (x64)\share\krita\pykrita\tenbrushes\tenbrushesdialog.py", line 23, in accept
    self.uitenbrushes.tentbrushes.writeSettings()
AttributeError: 'UITenBrushes' object has no attribute 'tentbrushes'
Comment 1 Halla Rempt 2018-03-27 13:17:26 UTC
Fixed in


commit 02ba8aa46767e0f5bd4d2abf77d53ae513c97dfc
Author: Boudewijn Rempt <boud@valdyas.org>
Date:   Thu Mar 22 14:41:12 2018 +0100

    Fix typo

diff --git a/plugins/python/tenbrushes/tenbrushesdialog.py b/plugins/python/tenbrushes/tenbrushesdialog.py
index d2403a6957..6a87b19705 100644
--- a/plugins/python/tenbrushes/tenbrushesdialog.py
+++ b/plugins/python/tenbrushes/tenbrushesdialog.py
@@ -20,7 +20,7 @@ class TenBrushesDialog(QDialog):
         self.uitenbrushes = uitenbrushes
 
     def accept(self):
-        self.uitenbrushes.tentbrushes.writeSettings()
+        self.uitenbrushes.tenbrushes.writeSettings()
 
         super(TenBrushesDialog, self).accept()
Comment 2 Seryoga Biryukov 2018-03-27 13:27:55 UTC
I do not understand. I'm not a programmer. I am an artist. What can I do to make the Ten Brushes work?
Comment 3 Halla Rempt 2018-03-27 15:40:02 UTC
Wait until the next release.
Comment 4 Seryoga Biryukov 2018-03-27 17:58:11 UTC
I read the forum and moved on nightlies. It works now! Thank you. You are best!