Buli Notes

Hi

No, it’s still alive :slightly_smiling_face:
I’m juste working on another stuff, and didn’t had time to implement new features or fix bugs.

Here my current todo list :sweat_smile:

If you have problem with plugin, you can provide some detail about your case because “it doesn’t work for me” doesn’t let me understand what happen to you with plugin :sweat_smile:

Grum999

I expected this to work much like a simple notepad but the ability to add brushes with notes and use it as a scratchpad? What a huge bonus. This is a plugin I’ll be using along with the EasyColors Map plugin as well. Thanks for this @Grum999 :grinning:

2 Likes

Oh hey there XD Thanks for letting me know! I’m glad its still well and alive. Oh yeah, I should’ve specified the problem! The plugin keeps giving me an attribute error, saying ‘Element Tree’ object has no attribute ‘getiterator’. Something occurred in the python script. It keeps crashing my Krita.

Btw, I’m on Mac.

If you have an error message, the best thing to do is to provide me exact content message (like here)
This help me to locate from where the bug occurs

Also, I need more precision: is the problem occurs when you create a note? when you save a note? when you save a brush, a font?
I need the maximum information to be able to try to reproduce it on my side

Also, screenshot can (sometime and often) help

Grum999

Oh ok, no problem! The message occurs when I start Krita. The message is behind the Krita loading screen. I would have to click outside the Krita screen in order to see the message. And here’s the full error message:

AttributeError
Python 3.9.12: /Users/sydni/Desktop/krita.app/Contents/MacOS/krita
Thu Sep 29 11:51:32 2022

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

/Users/sydni/Desktop/krita.app/Contents/Frameworks/krita-python-libs/krita/dockwidgetfactory.py in createDockWidget(self=<krita.dockwidgetfactory.DockWidgetFactory object>)
14 super(DockWidgetFactory, self).init(_id, _dockPosition)
15 self.klass = _klass
16
17 def createDockWidget(self):
18 return self.klass()
self = <krita.dockwidgetfactory.DockWidgetFactory object>
self.klass = <class ‘bulinotes.bulinotes.BuliNotesDocker’>

/Users/sydni/Library/Application Support/krita/pykrita/bulinotes/bulinotes.py in init(self=<bulinotes.bulinotes.BuliNotesDocker object>)
92 self.setWindowTitle(PLUGIN_MENU_ENTRY)
93 if checkKritaVersion(*REQUIRED_KRITA_VERSION):
94 self.__ui=BNUiDocker(self, PLUGIN_MENU_ENTRY, EXTENSION_ID, PLUGIN_VERSION)
95 self.setWidget(self.__ui)
96 else:
self = <bulinotes.bulinotes.BuliNotesDocker object>
self.__ui undefined
global BNUiDocker = <class ‘bulinotes.bn.bnuidocker.BNUiDocker’>
global PLUGIN_MENU_ENTRY = ‘Buli Notes’
global EXTENSION_ID = ‘pykrita_bulinotes’
global PLUGIN_VERSION = ‘0.4.0b’

 /Users/sydni/Library/Application Support/krita/pykrita/bulinotes/bn/bnuidocker.py in __init__(self=<bulinotes.bn.bnuidocker.BNUiDocker object>, docker=<bulinotes.bulinotes.BuliNotesDocker object>, bnName='Buli Notes', bnId='pykrita_bulinotes', bnVersion='0.4.0b', parent=None)
   61 
   62         uiFileName = os.path.join(os.path.dirname(__file__), 'resources', 'bnuidocker.ui')
   63         loadXmlUi(uiFileName, self)
   64 
   65         self.__initialize()
global loadXmlUi = <function loadXmlUi>
uiFileName = '/Users/sydni/Library/Application Support/krita/pykrita/bulinotes/bn/resources/bnuidocker.ui'
self = <bulinotes.bn.bnuidocker.BNUiDocker object>

 /Users/sydni/Library/Application Support/krita/pykrita/bulinotes/pktk/modules/utils.py in loadXmlUi(fileName='/Users/sydni/Library/Application Support/krita/pykrita/bulinotes/bn/resources/bnuidocker.ui', parent=<bulinotes.bn.bnuidocker.BNUiDocker object>)
  198     # Parse XML file and retrieve all object for which an icon is set
  199     tree = ET.parse(fileName)
  200     for nodeParent in tree.getiterator():
  201         for nodeChild in nodeParent:
  202             if 'name' in nodeChild.attrib and nodeChild.attrib['name'] == 'icon':
nodeParent undefined
tree = <xml.etree.ElementTree.ElementTree object>
tree.getiterator undefined
AttributeError: 'ElementTree' object has no attribute 'getiterator'
    __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 = ("'ElementTree' object has no attribute 'getiterator'",)
    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 "/Users/sydni/Desktop/krita.app/Contents/Frameworks/krita-python-libs/krita/dockwidgetfactory.py", line 18, in createDockWidget
    return self.klass()
  File "/Users/sydni/Library/Application Support/krita/pykrita/bulinotes/bulinotes.py", line 94, in __init__
    self.__ui=BNUiDocker(self, PLUGIN_MENU_ENTRY, EXTENSION_ID, PLUGIN_VERSION)
  File "/Users/sydni/Library/Application Support/krita/pykrita/bulinotes/bn/bnuidocker.py", line 63, in __init__
    loadXmlUi(uiFileName, self)
  File "/Users/sydni/Library/Application Support/krita/pykrita/bulinotes/pktk/modules/utils.py", line 200, in loadXmlUi
    for nodeParent in tree.getiterator():
AttributeError: 'ElementTree' object has no attribute 'getiterator'

Oh no formatting issues :confused:

Edit: All fixed with the images! :slight_smile:


and an additional report for krita (mac):


Translated Report (Full Report Below)

Process: krita [2398]
Path: /Users/USER/Desktop/krita.app/Contents/MacOS/krita
Identifier: org.krita
Version: 5.1.1 (5.1.1)
Code Type: X86-64 (Native)
Parent Process: launchd [1]
User ID: 501

Date/Time: 2022-09-29 12:41:06.6770 -0500
OS Version: macOS 12.6 (21G115)
Report Version: 12
Bridge OS Version: 6.6 (19P6067)
Anonymous UUID: 2DC8CE44-5411-25E3-705A-46E92A60E4D4

Sleep/Wake UUID: A2568DDA-3C28-458A-B0B9-12A5F07EB282

Time Awake Since Boot: 6000 seconds
Time Since Wake: 827 seconds

System Integrity Protection: enabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000008
Exception Codes: 0x0000000000000001, 0x0000000000000008
Exception Note: EXC_CORPSE_NOTIFY

Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process: exc handler [2398]

VM Region Info: 0x8 is not in any region. Bytes before following region: 140737486790648
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
—>
VM_ALLOCATE 7fffffe82000-7fffffe83000 [ 4K] r-x/r-x SM=ALI

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 QtWidgets 0x10a6e8124 QDockWidget::toggleViewAction() const + 4
1 libkritaui.18.dylib 0x1090afdb7 KisMainWindow::KisMainWindow(QUuid) + 3095
2 libkritaui.18.dylib 0x1090cce79 KisPart::createMainWindow(QUuid) + 57
3 libkritaui.18.dylib 0x1090d0b8f KisPart::startBlankSession() + 15
4 libkritaui.18.dylib 0x10906d5ef KisApplication::start(KisApplicationArguments const&) + 8287
5 krita 0x10739b63e 0x10738a000 + 71230
6 dyld 0x11015252e start + 462

Thread 1:: com.apple.CFSocket.private
0 libsystem_kernel.dylib 0x7ff81c7f9d5a __select + 10
1 CoreFoundation 0x7ff81c91c679 __CFSocketManager + 641
2 libsystem_pthread.dylib 0x7ff81c82e4e1 _pthread_start + 125
3 libsystem_pthread.dylib 0x7ff81c829f6b thread_start + 15

Thread 2:: com.apple.NSEventThread
0 libsystem_kernel.dylib 0x7ff81c7f197a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x7ff81c7f1ce8 mach_msg + 56
2 CoreFoundation 0x7ff81c8f536d __CFRunLoopServiceMachPort + 319
3 CoreFoundation 0x7ff81c8f39f8 __CFRunLoopRun + 1276
4 CoreFoundation 0x7ff81c8f2e3c CFRunLoopRunSpecific + 562
5 AppKit 0x7ff81f49a9ce _NSEventThread + 132
6 libsystem_pthread.dylib 0x7ff81c82e4e1 _pthread_start + 125
7 libsystem_pthread.dylib 0x7ff81c829f6b thread_start + 15

Thread 3:: Qt bearer thread
0 libsystem_kernel.dylib 0x7ff81c7f80aa poll + 10
1 QtCore 0x10ad9464e qt_safe_poll(pollfd*, unsigned int, timespec const*) + 94
2 QtCore 0x10ad95de8 QEventDispatcherUNIX::processEvents(QFlagsQEventLoop::ProcessEventsFlag) + 696
3 QtCore 0x10ad3dd37 QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) + 471
4 QtCore 0x10ab8c405 QThread::exec() + 149
5 QtCore 0x10ab8d2a4 0x10ab6d000 + 131748
6 libsystem_pthread.dylib 0x7ff81c82e4e1 _pthread_start + 125
7 libsystem_pthread.dylib 0x7ff81c829f6b thread_start + 15

Thread 4:: KisTileDataSwapper
0 libsystem_kernel.dylib 0x7ff81c7f43ea __psynch_cvwait + 10
1 libsystem_pthread.dylib 0x7ff81c82ea6f _pthread_cond_wait + 1249
2 QtCore 0x10ab9578b 0x10ab6d000 + 165771
3 QtCore 0x10ab95725 QWaitCondition::wait(QMutex*, QDeadlineTimer) + 101
4 QtCore 0x10ab91cde QSemaphore::tryAcquire(int, int) + 142
5 libkritaimage.18.dylib 0x10949d77f KisTileDataSwapper::run() + 31
6 QtCore 0x10ab8d2a4 0x10ab6d000 + 131748
7 libsystem_pthread.dylib 0x7ff81c82e4e1 _pthread_start + 125
8 libsystem_pthread.dylib 0x7ff81c829f6b thread_start + 15

Thread 5:: Dispatch queue: NSCGSDisableUpdates
0 libsystem_kernel.dylib 0x7ff81c7f19ce semaphore_timedwait_trap + 10
1 libdispatch.dylib 0x7ff81c677848 _dispatch_sema4_timedwait + 72
2 libdispatch.dylib 0x7ff81c677c75 _dispatch_semaphore_wait_slow + 58
3 SkyLight 0x7ff82185812e CGSUpdateManager::enable_updates_common() + 1038
4 SkyLight 0x7ff821858b7e SLSReenableUpdateTokenWithSeed + 130
5 libdispatch.dylib 0x7ff81c6760cc _dispatch_call_block_and_release + 12
6 libdispatch.dylib 0x7ff81c677317 _dispatch_client_callout + 8
7 libdispatch.dylib 0x7ff81c67d317 _dispatch_lane_serial_drain + 672
8 libdispatch.dylib 0x7ff81c67ddfd _dispatch_lane_invoke + 366
9 libdispatch.dylib 0x7ff81c687eee _dispatch_workloop_worker_thread + 753
10 libsystem_pthread.dylib 0x7ff81c82afd0 _pthread_wqthread + 326
11 libsystem_pthread.dylib 0x7ff81c829f57 start_wqthread + 15

Thread 6:
0 libsystem_pthread.dylib 0x7ff81c829f48 start_wqthread + 0

Thread 7:: Dispatch queue: com.apple.SkyLight.UpdateManager.SerialSema
0 libsystem_kernel.dylib 0x7ff81c7f19b6 semaphore_wait_trap + 10
1 SkyLight 0x7ff82185833f invocation function for block in (anonymous namespace)::InterprocessSerialSemaphore::asyncWait(void (int) block_pointer) + 35
2 libdispatch.dylib 0x7ff81c6760cc _dispatch_call_block_and_release + 12
3 libdispatch.dylib 0x7ff81c677317 _dispatch_client_callout + 8
4 libdispatch.dylib 0x7ff81c67d317 _dispatch_lane_serial_drain + 672
5 libdispatch.dylib 0x7ff81c67ddfd _dispatch_lane_invoke + 366
6 libdispatch.dylib 0x7ff81c687eee _dispatch_workloop_worker_thread + 753
7 libsystem_pthread.dylib 0x7ff81c82afd0 _pthread_wqthread + 326
8 libsystem_pthread.dylib 0x7ff81c829f57 start_wqthread + 15

Thread 8:
0 libsystem_pthread.dylib 0x7ff81c829f48 start_wqthread + 0

Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x00007fb4abcd19e0 rcx: 0x0000000000000000 rdx: 0x00000000000c82e0
rdi: 0x0000000000000000 rsi: 0x0000000107b4d000 rbp: 0x00007ff7b8b75370 rsp: 0x00007ff7b8b75370
r8: 0x00000000000000e0 r9: 0x0000000000000011 r10: 0x00007fb4bc000000 r11: 0x0000000000000000
r12: 0x0000000000000000 r13: 0x00007fb4a9d31070 r14: 0x00007ff7b8b75520 r15: 0x00000000000000a0
rip: 0x000000010a6e8124 rfl: 0x0000000000010206 cr2: 0x0000000000000008

Logical CPU: 7
Error Code: 0x00000004 (no mapping for user data read)
Trap Number: 14

Thread 0 instruction stream:
48 83 ec 30 48 8b 05 91-12 31 00 48 8b 00 48 89 H…0H…1.H…H.
45 f8 40 88 75 df 48 c7-45 e0 00 00 00 00 48 8d E.@.u.H.E…H.
45 df 48 89 45 e8 48 8d-35 ff 00 32 00 48 8d 4d E.H.E.H.5…2.H.M
e0 ba 03 00 00 00 e8 91-57 28 00 48 8b 05 5a 12 …W(.H…Z.
31 00 48 8b 00 48 3b 45-f8 75 06 48 83 c4 30 5d 1.H…H;E.u.H…0]
c3 e8 0c 88 28 00 66 0f-1f 44 00 00 55 48 89 e5 …(.f…D…UH…
[48]8b 47 08 48 8b 80 e8-01 00 00 5d c3 66 2e 0f H.G.H…].f… <==
1f 84 00 00 00 00 00 0f-1f 44 00 00 55 48 89 e5 …D…UH…
41 57 41 56 53 48 83 ec-18 49 89 f7 48 89 fb 4c AWAVSH…I…H…L
8b 77 08 e8 54 32 f2 ff-48 8d 3d bd 00 32 00 48 .w…T2…H.=…2.H
89 c6 e8 5f 74 28 00 48-89 c7 be 03 00 00 00 4c …_t(.H…L
89 fa e8 85 c6 ff ff 4c-89 f7 e8 fd d2 ff ff 48 …L…H

Binary Images:
0x10a5c1000 - 0x10a9f8fff org.qt-project.QtWidgets (5.12) /Users/USER/Desktop/krita.app/Contents/Frameworks/QtWidgets.framework/Versions/5/QtWidgets
0x108bf5000 - 0x109258fff libkritaui.18.dylib () <1d719fb8-4480-3992-8d4c-ab3f70700374> /Users/USER/Desktop/krita.app/Contents/Frameworks/libkritaui.18.dylib
0x10738a000 - 0x107a05fff org.krita (5.1.1) <2372d7be-d253-3fcd-aae5-02700cc9adaf> /Users/USER/Desktop/krita.app/Contents/MacOS/krita
0x11014d000 - 0x1101b8fff dyld (
) <71febccd-d9dc-3599-9971-2b3407c588a8> /usr/lib/dyld
0x7ff81c7f0000 - 0x7ff81c827fff libsystem_kernel.dylib () <8cc28466-fd2f-3c80-9834-9525b7beac19> /usr/lib/system/libsystem_kernel.dylib
0x7ff81c875000 - 0x7ff81cd77fff com.apple.CoreFoundation (6.9) <93c48919-68af-367e-9a67-db4159bc962c> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x7ff81c828000 - 0x7ff81c833fff libsystem_pthread.dylib (
) /usr/lib/system/libsystem_pthread.dylib
0x7ff81f2ee000 - 0x7ff82017dfff com.apple.AppKit (6.9) <06015263-62ac-3b08-a298-dc835c18452a> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
0x10ab6d000 - 0x10b074fff org.qt-project.QtCore (5.12) /Users/USER/Desktop/krita.app/Contents/Frameworks/QtCore.framework/Versions/5/QtCore
0x109465000 - 0x109888fff libkritaimage.18.dylib () /Users/USER/Desktop/krita.app/Contents/Frameworks/libkritaimage.18.dylib
0x7ff81c674000 - 0x7ff81c6bafff libdispatch.dylib (
) <1a04b380-76e4-3e4b-b0fc-9837533d021d> /usr/lib/system/libdispatch.dylib
0x7ff8217f9000 - 0x7ff821b97fff com.apple.SkyLight (1.600.0) <6563e632-526d-3c88-8035-049fcca8ca93> /System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/SkyLight
0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???

External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 0
thread_create: 0
thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=1.1G resident=0K(0%) swapped_out_or_unallocated=1.1G(100%)
Writable regions: Total=848.7M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=848.7M(100%)

                            VIRTUAL   REGION 

REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Accelerate framework 256K 2
Activity Tracing 256K 1
CG backing stores 2160K 4
CG image 564K 22
ColorSync 228K 27
CoreAnimation 84K 10
CoreGraphics 12K 2
CoreUI image data 1972K 15
Dispatch continuations 64.0M 1
Foundation 40K 2
Kernel Alloc Once 8K 1
MALLOC 750.1M 896
MALLOC guard page 32K 8
MALLOC_LARGE (reserved) 256K 1 reserved VM address space (unallocated)
ObjC additional data 15K 1
STACK GUARD 56.0M 9
Stack 12.1M 9
VM_ALLOCATE 18.4M 93
__CTF 756 1
__DATA 30.7M 649
__DATA_CONST 18.9M 218
__DATA_DIRTY 911K 128
__FONT_DATA 4K 1
__GLSLBUILTINS 5176K 1
__LINKEDIT 702.7M 271
__TEXT 404.5M 646
__UNICODE 592K 1
dyld private memory 1024K 1
mapped file 161.8M 28
shared memory 780K 18
=========== ======= =======
TOTAL 2.2G 3067
TOTAL, minus reserved VM space 2.2G 3067


Full Report

{“app_name”:“krita”,“timestamp”:“2022-09-29 12:41:07.00 -0500”,“app_version”:“5.1.1”,“slice_uuid”:“2372d7be-d253-3fcd-aae5-02700cc9adaf”,“build_version”:“5.1.1”,“platform”:1,“bundleID”:“org.krita”,“share_with_app_devs”:1,“is_first_party”:0,“bug_type”:“309”,“os_version”:“macOS 12.6 (21G115)”,“incident_id”:“3B1FF612-7AB2-4622-A8B0-6CA2C9C36E59”,“name”:“krita”}
{
“uptime” : 6000,
“procLaunch” : “2022-09-29 11:50:53.4598 -0500”,
“procRole” : “Foreground”,
“version” : 2,
“userID” : 501,
“deployVersion” : 210,
“modelCode” : “MacBookAir9,1”,
“procStartAbsTime” : 4163685218567,
“coalitionID” : 1180,
“osVersion” : {
“train” : “macOS 12.6”,
“build” : “21G115”,
“releaseType” : “User”
},
“captureTime” : “2022-09-29 12:41:06.6770 -0500”,
“incident” : “3B1FF612-7AB2-4622-A8B0-6CA2C9C36E59”,
“bug_type” : “309”,
“pid” : 2398,
“procExitAbsTime” : 6088459431281,
“cpuType” : “X86-64”,
“procName” : “krita”,
“procPath” : “/Users/USER/Desktop/krita.app/Contents/MacOS/krita”,
“bundleInfo” : {“CFBundleShortVersionString”:“5.1.1”,“CFBundleVersion”:“5.1.1”,“CFBundleIdentifier”:“org.krita”},
“storeInfo” : {“deviceIdentifierForVendor”:“98D9962C-27E1-5153-9A22-1EAFFF7ED66C”,“thirdParty”:true},
“parentProc” : “launchd”,
“parentPid” : 1,
“coalitionName” : “org.krita”,
“crashReporterKey” : “2DC8CE44-5411-25E3-705A-46E92A60E4D4”,
“wakeTime” : 827,
“bridgeVersion” : {“build”:“19P6067”,“train”:“6.6”},
“sleepWakeUUID” : “A2568DDA-3C28-458A-B0B9-12A5F07EB282”,
“sip” : “enabled”,
“vmRegionInfo” : “0x8 is not in any region. Bytes before following region: 140737486790648\n REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL\n UNUSED SPACE AT START\n—> \n VM_ALLOCATE 7fffffe82000-7fffffe83000 [ 4K] r-x/r-x SM=ALI “,
“isCorpse” : 1,
“exception” : {“codes”:“0x0000000000000001, 0x0000000000000008”,“rawCodes”:[1,8],“type”:“EXC_BAD_ACCESS”,“signal”:“SIGSEGV”,“subtype”:“KERN_INVALID_ADDRESS at 0x0000000000000008”},
“termination” : {“flags”:0,“code”:11,“namespace”:“SIGNAL”,“indicator”:“Segmentation fault: 11”,“byProc”:“exc handler”,“byPid”:2398},
“vmregioninfo” : “0x8 is not in any region. Bytes before following region: 140737486790648\n REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL\n UNUSED SPACE AT START\n—> \n VM_ALLOCATE 7fffffe82000-7fffffe83000 [ 4K] r-x/r-x SM=ALI “,
“extMods” : {“caller”:{“thread_create”:0,“thread_set_state”:0,“task_for_pid”:0},“system”:{“thread_create”:0,“thread_set_state”:0,“task_for_pid”:0},“targeted”:{“thread_create”:0,“thread_set_state”:0,“task_for_pid”:0},“warnings”:0},
“faultingThread” : 0,
“threads” : [{“triggered”:true,“id”:52552,“instructionState”:{“instructionStream”:{“bytes”:[72,131,236,48,72,139,5,145,18,49,0,72,139,0,72,137,69,248,64,136,117,223,72,199,69,224,0,0,0,0,72,141,69,223,72,137,69,232,72,141,53,255,0,50,0,72,141,77,224,186,3,0,0,0,232,145,87,40,0,72,139,5,90,18,49,0,72,139,0,72,59,69,248,117,6,72,131,196,48,93,195,232,12,136,40,0,102,15,31,68,0,0,85,72,137,229,72,139,71,8,72,139,128,232,1,0,0,93,195,102,46,15,31,132,0,0,0,0,0,15,31,68,0,0,85,72,137,229,65,87,65,86,83,72,131,236,24,73,137,247,72,137,251,76,139,119,8,232,84,50,242,255,72,141,61,189,0,50,0,72,137,198,232,95,116,40,0,72,137,199,190,3,0,0,0,76,137,250,232,133,198,255,255,76,137,247,232,253,210,255,255,72],“offset”:96}},“threadState”:{“r13”:{“value”:140413920022640},“rax”:{“value”:0},“rflags”:{“value”:66054},“cpu”:{“value”:7},“r14”:{“value”:140701932672288},“rsi”:{“value”:4424257536},“r8”:{“value”:224},“cr2”:{“value”:8},“rdx”:{“value”:819936},“r10”:{“value”:140414224957440},“r9”:{“value”:17},“r15”:{“value”:160},“rbx”:{“value”:140413953186272},“trap”:{“value”:14,“description”:”(no mapping for user data read)”},“err”:{“value”:4},“r11”:{“value”:0},“rip”:{“value”:4469981476,“matchesCrashFrame”:1},“rbp”:{“value”:140701932671856},“rsp”:{“value”:140701932671856},“r12”:{“value”:0},“rcx”:{“value”:0},“flavor”:“x86_THREAD_STATE”,“rdi”:{“value”:0}},“queue”:“com.apple.main-thread”,“frames”:[{“imageOffset”:1208612,“symbol”:“QDockWidget::toggleViewAction() const”,“symbolLocation”:4,“imageIndex”:0},{“imageOffset”:4959671,“symbol”:“KisMainWindow::KisMainWindow(QUuid)”,“symbolLocation”:3095,“imageIndex”:1},{“imageOffset”:5078649,“symbol”:“KisPart::createMainWindow(QUuid)”,“symbolLocation”:57,“imageIndex”:1},{“imageOffset”:5094287,“symbol”:“KisPart::startBlankSession()”,“symbolLocation”:15,“imageIndex”:1},{“imageOffset”:4687343,“symbol”:“KisApplication::start(KisApplicationArguments const&)”,“symbolLocation”:8287,“imageIndex”:1},{“imageOffset”:71230,“imageIndex”:2},{“imageOffset”:21806,“symbol”:“start”,“symbolLocation”:462,“imageIndex”:3}]},{“id”:52653,“name”:“com.apple.CFSocket.private”,“frames”:[{“imageOffset”:40282,“symbol”:”__select”,“symbolLocation”:10,“imageIndex”:4},{“imageOffset”:685689,“symbol”:“__CFSocketManager”,“symbolLocation”:641,“imageIndex”:5},{“imageOffset”:25825,“symbol”:“_pthread_start”,“symbolLocation”:125,“imageIndex”:6},{“imageOffset”:8043,“symbol”:“thread_start”,“symbolLocation”:15,“imageIndex”:6}]},{“id”:52665,“name”:“com.apple.NSEventThread”,“frames”:[{“imageOffset”:6522,“symbol”:“mach_msg_trap”,“symbolLocation”:10,“imageIndex”:4},{“imageOffset”:7400,“symbol”:“mach_msg”,“symbolLocation”:56,“imageIndex”:4},{“imageOffset”:525165,“symbol”:“__CFRunLoopServiceMachPort”,“symbolLocation”:319,“imageIndex”:5},{“imageOffset”:518648,“symbol”:“__CFRunLoopRun”,“symbolLocation”:1276,“imageIndex”:5},{“imageOffset”:515644,“symbol”:“CFRunLoopRunSpecific”,“symbolLocation”:562,“imageIndex”:5},{“imageOffset”:1755598,“symbol”:“_NSEventThread”,“symbolLocation”:132,“imageIndex”:7},{“imageOffset”:25825,“symbol”:“_pthread_start”,“symbolLocation”:125,“imageIndex”:6},{“imageOffset”:8043,“symbol”:“thread_start”,“symbolLocation”:15,“imageIndex”:6}]},{“id”:52921,“name”:“Qt bearer thread”,“frames”:[{“imageOffset”:32938,“symbol”:“poll”,“symbolLocation”:10,“imageIndex”:4},{“imageOffset”:2258510,“symbol”:“qt_safe_poll(pollfd*, unsigned int, timespec const*)”,“symbolLocation”:94,“imageIndex”:8},{“imageOffset”:2264552,“symbol”:“QEventDispatcherUNIX::processEvents(QFlagsQEventLoop::ProcessEventsFlag)”,“symbolLocation”:696,“imageIndex”:8},{“imageOffset”:1903927,“symbol”:“QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag)”,“symbolLocation”:471,“imageIndex”:8},{“imageOffset”:128005,“symbol”:“QThread::exec()”,“symbolLocation”:149,“imageIndex”:8},{“imageOffset”:131748,“imageIndex”:8},{“imageOffset”:25825,“symbol”:“_pthread_start”,“symbolLocation”:125,“imageIndex”:6},{“imageOffset”:8043,“symbol”:“thread_start”,“symbolLocation”:15,“imageIndex”:6}]},{“id”:52933,“name”:“KisTileDataSwapper”,“frames”:[{“imageOffset”:17386,“symbol”:“__psynch_cvwait”,“symbolLocation”:10,“imageIndex”:4},{“imageOffset”:27247,“symbol”:“_pthread_cond_wait”,“symbolLocation”:1249,“imageIndex”:6},{“imageOffset”:165771,“imageIndex”:8},{“imageOffset”:165669,“symbol”:“QWaitCondition::wait(QMutex*, QDeadlineTimer)”,“symbolLocation”:101,“imageIndex”:8},{“imageOffset”:150750,“symbol”:“QSemaphore::tryAcquire(int, int)”,“symbolLocation”:142,“imageIndex”:8},{“imageOffset”:231295,“symbol”:“KisTileDataSwapper::run()”,“symbolLocation”:31,“imageIndex”:9},{“imageOffset”:131748,“imageIndex”:8},{“imageOffset”:25825,“symbol”:“_pthread_start”,“symbolLocation”:125,“imageIndex”:6},{“imageOffset”:8043,“symbol”:“thread_start”,“symbolLocation”:15,“imageIndex”:6}]},{“id”:77413,“queue”:“NSCGSDisableUpdates”,“frames”:[{“imageOffset”:6606,“symbol”:“semaphore_timedwait_trap”,“symbolLocation”:10,“imageIndex”:4},{“imageOffset”:14408,“symbol”:“_dispatch_sema4_timedwait”,“symbolLocation”:72,“imageIndex”:10},{“imageOffset”:15477,“symbol”:“_dispatch_semaphore_wait_slow”,“symbolLocation”:58,“imageIndex”:10},{“imageOffset”:389422,“symbol”:“CGSUpdateManager::enable_updates_common()”,“symbolLocation”:1038,“imageIndex”:11},{“imageOffset”:392062,“symbol”:“SLSReenableUpdateTokenWithSeed”,“symbolLocation”:130,“imageIndex”:11},{“imageOffset”:8396,“symbol”:“_dispatch_call_block_and_release”,“symbolLocation”:12,“imageIndex”:10},{“imageOffset”:13079,“symbol”:“_dispatch_client_callout”,“symbolLocation”:8,“imageIndex”:10},{“imageOffset”:37655,“symbol”:“_dispatch_lane_serial_drain”,“symbolLocation”:672,“imageIndex”:10},{“imageOffset”:40445,“symbol”:“_dispatch_lane_invoke”,“symbolLocation”:366,“imageIndex”:10},{“imageOffset”:81646,“symbol”:“_dispatch_workloop_worker_thread”,“symbolLocation”:753,“imageIndex”:10},{“imageOffset”:12240,“symbol”:“_pthread_wqthread”,“symbolLocation”:326,“imageIndex”:6},{“imageOffset”:8023,“symbol”:“start_wqthread”,“symbolLocation”:15,“imageIndex”:6}]},{“id”:77439,“frames”:[{“imageOffset”:8008,“symbol”:“start_wqthread”,“symbolLocation”:0,“imageIndex”:6}]},{“id”:77619,“queue”:“com.apple.SkyLight.UpdateManager.SerialSema”,“frames”:[{“imageOffset”:6582,“symbol”:“semaphore_wait_trap”,“symbolLocation”:10,“imageIndex”:4},{“imageOffset”:389951,“symbol”:“invocation function for block in (anonymous namespace)::InterprocessSerialSemaphore::asyncWait(void (int) block_pointer)”,“symbolLocation”:35,“imageIndex”:11},{“imageOffset”:8396,“symbol”:“_dispatch_call_block_and_release”,“symbolLocation”:12,“imageIndex”:10},{“imageOffset”:13079,“symbol”:“_dispatch_client_callout”,“symbolLocation”:8,“imageIndex”:10},{“imageOffset”:37655,“symbol”:“_dispatch_lane_serial_drain”,“symbolLocation”:672,“imageIndex”:10},{“imageOffset”:40445,“symbol”:“_dispatch_lane_invoke”,“symbolLocation”:366,“imageIndex”:10},{“imageOffset”:81646,“symbol”:“_dispatch_workloop_worker_thread”,“symbolLocation”:753,“imageIndex”:10},{“imageOffset”:12240,“symbol”:“_pthread_wqthread”,“symbolLocation”:326,“imageIndex”:6},{“imageOffset”:8023,“symbol”:“start_wqthread”,“symbolLocation”:15,“imageIndex”:6}]},{“id”:77690,“frames”:[{“imageOffset”:8008,“symbol”:“start_wqthread”,“symbolLocation”:0,“imageIndex”:6}]}],
“usedImages” : [
{
“source” : “P”,
“arch” : “x86_64”,
“base” : 4468772864,
“CFBundleShortVersionString” : “5.12”,
“CFBundleIdentifier” : “org.qt-project.QtWidgets”,
“size” : 4423680,
“uuid” : “ba249b73-bc0b-3314-850b-b38eca8faacf”,
“path” : “/Users/USER/Desktop/krita.app/Contents/Frameworks/QtWidgets.framework/Versions/5/QtWidgets”,
“name” : “QtWidgets”,
“CFBundleVersion” : “5.12.12”
},
{
“source” : “P”,
“arch” : “x86_64”,
“base” : 4441722880,
“size” : 6701056,
“uuid” : “1d719fb8-4480-3992-8d4c-ab3f70700374”,
“path” : “/Users/USER/Desktop/krita.app/Contents/Frameworks/libkritaui.18.dylib”,
“name” : “libkritaui.18.dylib”
},
{
“source” : “P”,
“arch” : “x86_64”,
“base” : 4416118784,
“CFBundleShortVersionString” : “5.1.1”,
“CFBundleIdentifier” : “org.krita”,
“size” : 6799360,
“uuid” : “2372d7be-d253-3fcd-aae5-02700cc9adaf”,
“path” : “/Users/USER/Desktop/krita.app/Contents/MacOS/krita”,
“name” : “krita”,
“CFBundleVersion” : “5.1.1”
},
{
“source” : “P”,
“arch” : “x86_64”,
“base” : 4564766720,
“size” : 442368,
“uuid” : “71febccd-d9dc-3599-9971-2b3407c588a8”,
“path” : “/usr/lib/dyld”,
“name” : “dyld”
},
{
“source” : “P”,
“arch” : “x86_64”,
“base” : 140703606702080,
“size” : 229376,
“uuid” : “8cc28466-fd2f-3c80-9834-9525b7beac19”,
“path” : “/usr/lib/system/libsystem_kernel.dylib”,
“name” : “libsystem_kernel.dylib”
},
{
“source” : “P”,
“arch” : “x86_64h”,
“base” : 140703607246848,
“CFBundleShortVersionString” : “6.9”,
“CFBundleIdentifier” : “com.apple.CoreFoundation”,
“size” : 5255168,
“uuid” : “93c48919-68af-367e-9a67-db4159bc962c”,
“path” : “/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation”,
“name” : “CoreFoundation”,
“CFBundleVersion” : “1866”
},
{
“source” : “P”,
“arch” : “x86_64”,
“base” : 140703606931456,
“size” : 49152,
“uuid” : “b5454e27-e8c7-3fdb-b77f-714f1e82e70b”,
“path” : “/usr/lib/system/libsystem_pthread.dylib”,
“name” : “libsystem_pthread.dylib”
},
{
“source” : “P”,
“arch” : “x86_64”,
“base” : 140703651782656,
“CFBundleShortVersionString” : “6.9”,
“CFBundleIdentifier” : “com.apple.AppKit”,
“size” : 15269888,
“uuid” : “06015263-62ac-3b08-a298-dc835c18452a”,
“path” : “/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit”,
“name” : “AppKit”,
“CFBundleVersion” : “2113.60.148”
},
{
“source” : “P”,
“arch” : “x86_64”,
“base” : 4474720256,
“CFBundleShortVersionString” : “5.12”,
“CFBundleIdentifier” : “org.qt-project.QtCore”,
“size” : 5275648,
“uuid” : “b3699c58-b3d0-3757-a0ed-3883361618c9”,
“path” : “/Users/USER/Desktop/krita.app/Contents/Frameworks/QtCore.framework/Versions/5/QtCore”,
“name” : “QtCore”,
“CFBundleVersion” : “5.12.12”
},
{
“source” : “P”,
“arch” : “x86_64”,
“base” : 4450570240,
“size” : 4341760,
“uuid” : “e0b8acaa-9947-342f-be1e-9cc59010aa22”,
“path” : “/Users/USER/Desktop/krita.app/Contents/Frameworks/libkritaimage.18.dylib”,
“name” : “libkritaimage.18.dylib”
},
{
“source” : “P”,
“arch” : “x86_64”,
“base” : 140703605145600,
“size” : 290816,
“uuid” : “1a04b380-76e4-3e4b-b0fc-9837533d021d”,
“path” : “/usr/lib/system/libdispatch.dylib”,
“name” : “libdispatch.dylib”
},
{
“source” : “P”,
“arch” : “x86_64”,
“base” : 140703690625024,
“CFBundleShortVersionString” : “1.600.0”,
“CFBundleIdentifier” : “com.apple.SkyLight”,
“size” : 3796992,
“uuid” : “6563e632-526d-3c88-8035-049fcca8ca93”,
“path” : “/System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/SkyLight”,
“name” : “SkyLight”
},
{
“size” : 0,
“source” : “A”,
“base” : 0,
“uuid” : “00000000-0000-0000-0000-000000000000”
}
],
“sharedCache” : {
“base” : 140703603675136,
“size” : 19331678208,
“uuid” : “73669942-bd8a-3e40-951f-7fbe07b51cb8”
},
“vmSummary” : “ReadOnly portion of Libraries: Total=1.1G resident=0K(0%) swapped_out_or_unallocated=1.1G(100%)\nWritable regions: Total=848.7M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=848.7M(100%)\n\n VIRTUAL REGION \nREGION TYPE SIZE COUNT (non-coalesced) \n=========== ======= ======= \nAccelerate framework 256K 2 \nActivity Tracing 256K 1 \nCG backing stores 2160K 4 \nCG image 564K 22 \nColorSync 228K 27 \nCoreAnimation 84K 10 \nCoreGraphics 12K 2 \nCoreUI image data 1972K 15 \nDispatch continuations 64.0M 1 \nFoundation 40K 2 \nKernel Alloc Once 8K 1 \nMALLOC 750.1M 896 \nMALLOC guard page 32K 8 \nMALLOC_LARGE (reserved) 256K 1 reserved VM address space (unallocated)\nObjC additional data 15K 1 \nSTACK GUARD 56.0M 9 \nStack 12.1M 9 \nVM_ALLOCATE 18.4M 93 \n__CTF 756 1 \n__DATA 30.7M 649 \n__DATA_CONST 18.9M 218 \n__DATA_DIRTY 911K 128 \n__FONT_DATA 4K 1 \n__GLSLBUILTINS 5176K 1 \n__LINKEDIT 702.7M 271 \n__TEXT 404.5M 646 \n__UNICODE 592K 1 \ndyld private memory 1024K 1 \nmapped file 161.8M 28 \nshared memory 780K 18 \n=========== ======= ======= \nTOTAL 2.2G 3067 \nTOTAL, minus reserved VM space 2.2G 3067 \n”,
“legacyInfo” : {
“threadTriggered” : {
“queue” : “com.apple.main-thread”
}
},
“trialInfo” : {
“rollouts” : [
{
“rolloutId” : “60da5e84ab0ca017dace9abf”,
“factorPackIds” : {

  },
  "deploymentId" : 240000008
},
{
  "rolloutId" : "60f8ddccefea4203d95cbeef",
  "factorPackIds" : {

  },
  "deploymentId" : 240000020
}

],
“experiments” : [
{
“treatmentId” : “5b729754-3882-4560-826f-9c0bc27d77c6”,
“experimentId” : “6192fb082171a2330e561df0”,
“deploymentId” : 400000035
}
]
}
}

Model: MacBookAir9,1, BootROM 1731.140.2.0.0 (iBridge: 19.16.16067.0.0,0), 4 processors, Quad-Core Intel Core i5, 1.1 GHz, 16 GB, SMC
Graphics: Intel Iris Plus Graphics, Intel Iris Plus Graphics, Built-In
Display: Color LCD, 2560 x 1600 Retina, Main, MirrorOff, Online
Memory Module: BANK 0/ChannelA-DIMM0, 8 GB, LPDDR4X, 3733 MHz, SK Hynix, H9HCNNNFBMALPR-NEE
Memory Module: BANK 2/ChannelB-DIMM0, 8 GB, LPDDR4X, 3733 MHz, SK Hynix, H9HCNNNFBMALPR-NEE
AirPort: spairport_wireless_card_type_wifi (0x14E4, 0x870), wl0: Jul 16 2021 18:25:13 version 16.20.328.0.3.6.105 FWID 01-30be2b3a
Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
USB Device: USB31Bus
USB Device: USB31Bus
USB Device: T2Bus
USB Device: Touch Bar Backlight
USB Device: Apple Internal Keyboard / Trackpad
USB Device: Headset
USB Device: Ambient Light Sensor
USB Device: FaceTime HD Camera (Built-in)
USB Device: Apple T2 Controller
Thunderbolt Bus: MacBook Air, Apple Inc., 86.0

Ok thanks for all details!

This should be enough I hope to try to understand origin of this.

I’ll try to check the problem this week-end

Grum999

Cool and no problem :smiley: and thank you so much!

and I forgot one more image XD

Hi @sydwil91

I started to take a look

For what I see, the problem occurs when ui file is loaded (ui file: a, XML file that provide the user interface description)

Can you copy/paste content of this file: /Users/sydni/Library/Application Support/krita/pykrita/bulinotes/bn/resources/bnuidocker.ui here?

I see 2 possible case for origin of problem:

  • The file is corrupted and can’t be loaded
  • I can see your python version is 3.9.12 as on my side bundled python in appimage is 3.8.1; may be for this version of python something doesn’t work like with version 3.8 with XML parser

I opened a bug on my side:

Grum999

Ok, tested modules xml.etree.ElementTree with python 3.9, it doesn’t have getiterator method anymore…

On other side, there’s a warning about deprecated function in python 3.8, so I have to take this in account

Grum999

Hi

Release v1.0.0 is available.

Version has jump from 0.4.0b to 1.0.0, I consider the plugin is stable enough and also Krita bug 441704 – Modified annotations are not saved has been fixed, so…

[2022-10-01] Version 1.0.0

  • Bug fix - Crash when multiples windows are opened
  • Bug fix - Exception on startup
  • Bug fix - Unhashable type: ‘Resource’
  • Code review - PEP8 recommendation
  • Code review - SPDX license headers

For screenshots and functionalities description, you can read the full detailed release content directly on github repository.
And main Buli Notes page.

Grum999

3 Likes

Sure, no problem! I’d also like to report another problem with the extension. For the drawing notes, I get an error messaging when exporting and importing notes.

Bnuidocker.ui:

# -----------------------------------------------------------------------------
# Buli Notes
# Copyright (C) 2021-2022 - Grum999
# -----------------------------------------------------------------------------
# SPDX-License-Identifier: GPL-3.0-or-later
#
# https://spdx.org/licenses/GPL-3.0-or-later.html
# -----------------------------------------------------------------------------
# A Krita plugin designed to manage notes
# -----------------------------------------------------------------------------

# -----------------------------------------------------------------------------
# The bnuidocker module provides classes used to manage plugin docker interface
#
# Main classes from this module
#
# - BNUiDocker:
#       Main plugin docker user interface
#
# -----------------------------------------------------------------------------

import os.path

from PyQt5.Qt import *
from PyQt5.QtWidgets import (
        QWidget
    )

from bulinotes.pktk.modules.about import AboutWindow
from bulinotes.pktk.modules.uitheme import UITheme
from bulinotes.pktk.modules.utils import loadXmlUi

from .bnsettings import BNSettings
from .bnnotes import (BNNote,
                      BNNotes,
                      BNNoteEditor
                      )
from .bnwnotes import BNNotesModel
from .bnnote_postit import BNNotePostIt


class BNUiDocker(QWidget):
    """Current selection interface"""

    def __init__(self, docker, bnName="Buli Notes", bnId='', bnVersion="testing", parent=None):
        super(BNUiDocker, self).__init__(parent)
        self.__bnName = bnName
        self.__bnId = bnId
        self.__bnVersion = bnVersion
        self.__docker = docker
        BNSettings.load()
        UITheme.load()
        UITheme.load(os.path.join(os.path.dirname(__file__), 'resources'))
        self.__notes = BNNotes()
        self.__docker = docker

        # on which plugin is currently working on
        self.__kraActiveDocument = None

        self.__notes.updateAdded.connect(self.__updateUi)
        self.__notes.updateRemoved.connect(self.__updateUi)

        uiFileName = os.path.join(os.path.dirname(__file__), 'resources', 'bnuidocker.ui')
        loadXmlUi(uiFileName, self)

        self.__initialize()

    def __initialize(self):
        """Initialise interface"""
        self.tvNotes.setNotes(self.__notes)
        self.tvNotes.selectionModel().selectionChanged.connect(self.__selectionChanged)

        self.tvNotes.doubleClicked.connect(self.__editNote)

        self.btAbout.clicked.connect(self.__about)
        self.btAddNote.clicked.connect(self.__addNote)
        self.btEditNote.clicked.connect(self.__editNote)
        self.btRemoveNote.clicked.connect(self.__removeNote)
        self.btMoveNoteUp.clicked.connect(self.__moveNoteUp)
        self.btMoveNoteDown.clicked.connect(self.__moveNoteDown)
        self.__updateUi()

    def __about(self):
        """Display About window"""
        AboutWindow(self.__bnName, self.__bnVersion, os.path.join(os.path.dirname(__file__), 'resources', 'png', 'buli-powered-big.png'), None, ':BuliNotes')

    def __addNote(self):
        """Add a new note in notes"""
        note = BNNoteEditor.edit(BNNote())
        if note:
            note.setPosition(self.__notes.length())
            self.__notes.add(note)

    def __removeNote(self):
        """Remove selected note from notes"""
        self.__notes.remove(self.tvNotes.selectedItems())

    def __editNote(self, index=None):
        """Edit selected note"""
        if isinstance(index, QModelIndex) and not index.column() in (BNNotesModel.COLNUM_COLOR, BNNotesModel.COLNUM_TITLE):
            # a double-click not made in valid columns does nothing
            return

        selectedItem = self.tvNotes.selectedItems()
        if not selectedItem[0].locked():
            BNNoteEditor.edit(selectedItem[0])
        else:
            if selectedItem[0].windowPostIt():
                selectedItem[0].closeWindowPostIt()
            else:
                selectedItem[0].openWindowPostIt(True)

    def __selectionChanged(self, selected, deselected):
        """Selection in treeview has changed, update UI"""
        self.__updateUi()

    def __updateUi(self):
        """Update current ui according to current selection and document"""
        selectedItems = self.tvNotes.selectedItems()
        nbSelectedItems = len(selectedItems)

        self.btAddNote.setEnabled(not(self.__kraActiveDocument is None))
        self.btEditNote.setEnabled(nbSelectedItems == 1 and not selectedItems[0] is None and not selectedItems[0].locked())
        self.btRemoveNote.setEnabled(nbSelectedItems > 1 or nbSelectedItems == 1 and not selectedItems[0] is None and not selectedItems[0].locked())
        self.btMoveNoteUp.setEnabled(nbSelectedItems > 0 and not selectedItems[0] is None and selectedItems[0].position() > 0)
        self.btMoveNoteDown.setEnabled(nbSelectedItems > 0 and not selectedItems[-1] is None and (selectedItems[-1].position() < self.__notes.length()-1))

        if self.__notes.length() > 0:
            self.__docker.setWindowTitle(f'{self.__bnName} ({self.__notes.length()})')
        else:
            self.__docker.setWindowTitle(self.__bnName)

    def __moveNoteUp(self):
        """Move all selected notes up"""
        self.__notes.movePositionUp(self.tvNotes.selectedItems())

    def __moveNoteDown(self):
        """Move all selected notes down"""
        self.__notes.movePositionDown(self.tvNotes.selectedItems())

    def canvasChanged(self, canvas):
        if canvas and Krita.instance().activeDocument() and canvas.view():
            # memorize current document
            self.__kraActiveDocument = canvas.view().document()
        else:
            # no canvas means no document opened
            self.__kraActiveDocument = None
        self.__notes.setDocument(self.__kraActiveDocument)
        self.__updateUi()

(Hold on, I'll upload the other error message here in a minute.)

@Grum999

 
TypeError
Python 3.9.12: /Users/sydni/Desktop/krita.app/Contents/MacOS/krita
Sun Oct  2 16:47:58 2022

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

 /Users/sydni/Library/Application Support/krita/pykrita/bulinotes/bn/bnnotes.py in __actionScratchpadImportFromFile(self=<bulinotes.bn.bnnotes.BNNoteEditor object>)
 2081     def __actionScratchpadImportFromFile(self):
 2082         """Import scratchpad content from a file"""
 2083         fDialog = WEFileDialog(self,
 2084                                i18n("Import from file"),
 2085                                "",
fDialog undefined
global WEFileDialog = <class 'bulinotes.pktk.widgets.wefiledialog.WEFileDialog'>
self = <bulinotes.bn.bnnotes.BNNoteEditor object>
builtini18n = <built-in function krita_i18n>

 /Users/sydni/Library/Application Support/krita/pykrita/bulinotes/pktk/widgets/wefiledialog.py in __init__(self=<bulinotes.pktk.widgets.wefiledialog.WEFileDialog object>, caption=<bulinotes.bn.bnnotes.BNNoteEditor object>, directory='Import from file', filter='', message='All images (*.png *.jpg *.jpeg);;Portable Network Graphics (*.png);;JPEG Image (*.jpg *.jpeg)', withImagePreview=True)
   31 
   32     def __init__(self, caption=None, directory=None, filter=None, message=None, withImagePreview=True):
   33         QFileDialog.__init__(self, None, caption, directory, filter)
   34 
   35         self.setOption(QFileDialog.DontUseNativeDialog, True)
global QFileDialog = <class 'PyQt5.QtWidgets.QFileDialog'>
QFileDialog.__init__ = <slot wrapper '__init__' of 'sip.simplewrapper' objects>
self = <bulinotes.pktk.widgets.wefiledialog.WEFileDialog object>
caption = <bulinotes.bn.bnnotes.BNNoteEditor object>
directory = 'Import from file'
filter = ''
TypeError: arguments did not match any overloaded call:
  QFileDialog(QWidget, Union[Qt.WindowFlags, Qt.WindowType]): argument 2 has unexpected type 'BNNoteEditor'
  QFileDialog(parent: QWidget = None, caption: str = '', directory: str = '', filter: str = ''): argument 2 has unexpected type 'BNNoteEditor'
    __cause__ = None
    __class__ = <class 'TypeError'>
    __context__ = None
    __delattr__ = <method-wrapper '__delattr__' of TypeError object>
    __dict__ = {}
    __dir__ = <built-in method __dir__ of TypeError object>
    __doc__ = 'Inappropriate argument type.'
    __eq__ = <method-wrapper '__eq__' of TypeError object>
    __format__ = <built-in method __format__ of TypeError object>
    __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__ = <built-in method __new__ of type object>
    __reduce__ = <built-in method __reduce__ of TypeError object>
    __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__ = <built-in method __setstate__ of TypeError object>
    __sizeof__ = <built-in method __sizeof__ of TypeError object>
    __str__ = <method-wrapper '__str__' of TypeError object>
    __subclasshook__ = <built-in method __subclasshook__ of type object>
    __suppress_context__ = False
    __traceback__ = <traceback object>
    args = ("arguments did not match any overloaded call:\n  Q...'): argument 2 has unexpected type 'BNNoteEditor'",)
    with_traceback = <built-in method with_traceback of TypeError object>

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

Traceback (most recent call last):
  File "/Users/sydni/Library/Application Support/krita/pykrita/bulinotes/bn/bnnotes.py", line 2083, in __actionScratchpadImportFromFile
    fDialog = WEFileDialog(self,
  File "/Users/sydni/Library/Application Support/krita/pykrita/bulinotes/pktk/widgets/wefiledialog.py", line 33, in __init__
    QFileDialog.__init__(self, None, caption, directory, filter)
TypeError: arguments did not match any overloaded call:
  QFileDialog(QWidget, Union[Qt.WindowFlags, Qt.WindowType]): argument 2 has unexpected type 'BNNoteEditor'
  QFileDialog(parent: QWidget = None, caption: str = '', directory: str = '', filter: str = ''): argument 2 has unexpected type 'BNNoteEditor'

Argh you’re right, I didn’t used this function from a while… :confused:

I have to open a new bug :slight_smile:
I’ll try to fix this during the week

Thanks for report! :+1:

Grum999

You’re welcome! :smiley:

Hi

Release v1.0.1 is available.

[2022-10-03] Version 1.0.1

  • Bug fix - Note Editor - Drawing note export/import raise a Python exception

Grum999

4 Likes

Continuing the discussion from Add notes along side Reference images:

Sorry @sbstratos79 I was not able to answer and then topic has been closed automatically :slight_smile:

It’s currently not possible to pin a note on canvas.
Technically, it might be possible to tweak and provide a functionality like this but I’m wondering about why you need this, and more than that, how to manage different case:

  • canvas rotation: should the note being rotated too?
  • canvas mirror: should the note being mirrored too?
  • canvas zoom: should the note being zoomed too?
  • canvas pan: should the note being pan too?

Example:

If pinned note follow canvas transformation (pan, zoom, rotate and mirror here), it start to be hard to use??

Grum999