Buli Notes

I reproduce it… :flushed:

How can I’ve missed this??? :worried:


Ok, I found the problem.

I have to download last Krita 5-beta 2 for Linux & Windows
Reset entirely current resources configuration.

But it seems that brushes names for which underscores has been replaced by spaces now have underscore again on my windows Krita version :sob: :sob:

I’ve fixed what’s wrong in the plugin code (the case unable to find any of brush preset, take the first one available was buggy - so for this at least it’s fixed)

But I have to test what happen with brushes resources names…


I’ve downloaded last nightly for Windows.
Deleted the resource file C:\Users\grum\AppData\Roaming\krita\resourcecache.sqlite
Restarted Krita and then, spaces and not underscores in preset names

I really don’t know why underscores were back on my environment… :confused:

One thing you can test:

  • Made a backup of your file:
  • Delete it
  • Test last nightly version of Krita 5 (use the portable one for example)
  • Check if BuliNote works or not

Once tested, you can stay in this situation or restore your previous resource cache file


1 Like

Amazingly this fixes the problem, thanks!

So how does that work?
Because it’s not like you gave me a new version…

Now to finally look into saving my gamut settings

I don’t know :confused:

The thing is:

  • You told me that BuliNote was not working
  • After trying to understand why the problem occurred, we saw that there was a mismatch in preset name between underscore “_” and spaces " "
    @Lynx3d told us that, at a moment, in resource library the underscore in preset name were replaced by spaces
  • I released v0.4.0b to take in account new way of naming for preset (spaces instead of underscores)
    I also added a fallback in plugin (if referenced brush doesn’t exist, just take first one plugin can find)
    I tested it in Windows and Linux (it was working :slight_smile: )
  • Few time after, you test it and told me that it doesn’t work
  • I tested it again on my Linux and my Windows => failure for windows, same error than you
  • What I saw is, the plugin tries to apply fallback but raise an error
    1. The fallback wasn’t working, so now fallback is fixed for v0.4.1 :slight_smile:
    2. Entering in fallback is not normal, and reason why on my windows this occurred is because resources names were using underscores instead of spaces…

What I asked to you is to delete resource file to force Krita to rebuild it; once rebuilt, resources name have spaces again

As your plugin version is made to work with resources names containing spaces and plugin is now able again to find internal default names (basic 5 is the first one) it’s working again

If you delete some brushes (basic 1, basic 5, …) the plugin will try to use fallback and crash again (until release v0.4.1 is installed)

The thing is, I have no idea about why underscores came back on my windows installation (and yours)
Maybe @tiar have an idea?
I tried to find bug about that but found none.
Also tried to reproduce the case (having underscore again in resources names) but currently I’m not able.
I’ll try to re-install krita-nightly-x64-5.0.0-beta2-eee2a1edfe on which I got the problem, maybe something was broken and then fixed…

Just, consider that BuliNote and Krita 5 are both in beta version, and if something is changed in Krita, it can have an impact on plugin :slight_smile:
I’m glad you like the plugin and use it, but I prefer to be sure that you’re aware that both can be unstable and you can loose data.

Concerning loose of data, I found a case in which this can occurs:

  • Work on a document on which you a have a note(s)
  • Krita badly crash for some reason…
  • Then restart Krita, choose to open autosaved version of document
    => internal Krita’s document annotation are missing (in other words: notes are lost…)


  • Have backup
  • Open last backup file, copy/paste notes from backup to autosaved document version
    I’ll create a new topic for that


1 Like

It sounds like a bug.

Regarding that ' ' vs '_' issue, it certainly can happen, because I myself found a few intricacies about the spaces handling, but I don’t think I know about any specific bug (except for sorting of seexpr scripts, which is hardly relevant here). Can you please tell me:

  • how Buli Notes saves the preset (name? filename? something else?)
  • how does it try to find the preset when the user clicks on it (especially after restart)
  • description of the issue (maybe it’s fixed already)

Note that right now I think new presets are saved with underscores in filenames, but names are saved into the databases with spaces. The same goes for default presets. (When saving into a bundle though you get filenames with spaces - it’s a bit inconsistent, yes, but it should still work fine).

(Halla said that we can save presets into the resource folder with spaces, because the default presets having underscores is caused by some technical details that don’t affect normal usage. But I haven’t implemented it yet, and it should work well either way).

I’ve opened a dedicated topic for that, I’ll try to provide more information :slight_smile:

The preset is saved with is name.
The preset name is the one returned by Resource.name() method

The plugin get preset from dictionary returned by Krita.preset() method
Basically in dictionary:

  • Key = preset name
  • Value = Resource

Then, when plugin tries to get a preset from a note, it looks in Krita available preset if given name exist.
The plugin does not save the preset configuration itself (currently not possible through API, it need some tweaks that I currently don’t want to implement…)

Issue seems to be fixed, but I can’t confirm it.

The thing is, returned preset from API were using spaces.
And then, for an unknown reason, returned preset from API were using underscores again.

In a scripter, the following code confirmed me the problem:

from krita import * 

for k in pdict:
    print(k, '==>', pdict[k].name())

When I released v0.4.0 of plugin, preset name were using spaces.
Few days after, when @Konstrukto told me it was not working, tried again on my Windows installation and I saw that preset name were using underscores
Deleting resource file fix the problem: after resource file has been rebuilt, preset names uses spaces again.

I’m not able to determinate what happen here neither exactly when and how: on my installation (and on @Konstrukto installation) the preset names were using underscore again… :man_shrugging:
If I found a way to reproduce the problem I’ll inform you :slight_smile:

My initial question for you was more if you’ve already encountered this situation or have an idea of how it could be possible to get back in resource file (I suppose API looks in resource files) preset with underscores…



Don’t know if it’s helpful but I also tried this the other way around, as I found out that after deleting my ‘resourcecache.sqlite’, my personal tag bundle was missing.
So I put it back for a while to write down the brushes it contains and tested Buli Notes because I could.
As kind of expected the error returned.
Made Krita rebuild the file again and it again works as a charm.

Yes that’s normal, they’re stored in this file :slight_smile:

But that’s not really a solution, this file normally should not be deleted/rebuilt. Doing it is eventualy the last solution to fix some problem if no other solution were found


1 Like

I agree, people shouldn’t be required to do anything in their APPDATA folder, it’s hidden by default for a reason.
Still I’m happy we finally got it working!

Error encountered when switching themes:

Python 3.8.1: C:\GAMES\STEAM\steamapps\common\Krita\krita\bin\krita.exe
Mon Nov  8 04:41:16 2021

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:\Users\123\AppData\Roaming\krita\pykrita\bulinotes\pktk\modules\uitheme.py in reloadResources(clearPixmapCache=True)
   96             clearPixmapCache=True
   97         for theme in UITheme.__themes:
   98             if UITheme.__themes[theme].autoReload():
   99                 # reload
  100                 UITheme.__themes[theme].loadResources(clearPixmapCache)
global UITheme = <class 'bulinotes.pktk.modules.uitheme.UITheme'>
UITheme.__themes undefined
theme = r'C:\Users\123\AppData\Roaming\krita\pykrita\bulinotes\pktk\resources'
].autoReload undefined
AttributeError: 'UITheme' object has no attribute 'autoReload'
    __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 = ("'UITheme' object has no attribute 'autoReload'",)
    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:\Users\123\AppData\Roaming\krita\pykrita\bulinotes\pktk\modules\uitheme.py", line 98, in reloadResources
    if UITheme.__themes[theme].autoReload():
AttributeError: 'UITheme' object has no attribute 'autoReload'


Thanks for feed back :slight_smile:

This has been fixed in v0.4.1b with commit 09f09fe but I didn’t published official release yet :wink:




I’ve been trying to use Buli Notes in Krita 5.1 prealpha and I receive this error:

KeyError - b)_Basic-5_Size

Python 3.8.1: C:\Program Files\Krita (x64)\bin\krita.exe
Mon Mar 14 21:56:29 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.

C:\Users\Tors Inc\AppData\Roaming\krita\pykrita\bulinotes\bn\bnuidocker.py in __addNote(self=<bulinotes.bn.bnuidocker.BNUiDocker object>)
88 def __addNote(self):
89 “”“Add a new note in notes”""
90 note=BNNoteEditor.edit(BNNote())
91 if note:
92 note.setPosition(self.__notes.length())
note undefined
global BNNoteEditor = <class ‘bulinotes.bn.bnnotes.BNNoteEditor’>
BNNoteEditor.edit =
global BNNote = <class ‘bulinotes.bn.bnnotes.BNNote’>

C:\Users\Tors Inc\AppData\Roaming\krita\pykrita\bulinotes\bn\bnnotes.py in edit(note=<BNNote({71302c9b-ab43-499b-8269-513acfc071ea}, None, False, False, False)>)
1019 def edit(note):
1020 “”“Open a dialog box to edit note”""
1021 dlgBox = BNNoteEditor(note)
1023 returned = dlgBox.exec()
dlgBox undefined
global BNNoteEditor = <class ‘bulinotes.bn.bnnotes.BNNoteEditor’>
note = <BNNote({71302c9b-ab43-499b-8269-513acfc071ea}, None, False, False, False)>

C:\Users\Tors Inc\AppData\Roaming\krita\pykrita\bulinotes\bn\bnnotes.py in init(self=<bulinotes.bn.bnnotes.BNNoteEditor object>, note=<BNNote({71302c9b-ab43-499b-8269-513acfc071ea}, None, False, False, False)>, name=‘Buli Notes’, parent=None)
1067 self.__saveViewConfig()
1068 self.__buildUi()
1069 self.__initViewConfig()
self = <bulinotes.bn.bnnotes.BNNoteEditor object>
self.__buildUi undefined

C:\Users\Tors Inc\AppData\Roaming\krita\pykrita\bulinotes\bn\bnnotes.py in __buildUi(self=<bulinotes.bn.bnnotes.BNNoteEditor object>)
1126 self.__actionSelectDefaultBrush=QAction(QIcon(QPixmap.fromImage(self.__allBrushesPreset[‘b)_Basic-5_Size’].image())), i18n(‘Default note brush’), self)
1127 self.__actionSelectDefaultBrush.triggered.connect(self.__actionScratchpadSetBrushDefault)
1128 self.__actionSelectCurrentBrush=QAction(QIcon(QPixmap.fromImage(self.__activeViewCurrentConfig[‘brushPreset’].image())), i18n(f"Current painting brush ({self.__activeViewCurrentConfig[‘brushPreset’].name()})"), self)
self = <bulinotes.bn.bnnotes.BNNoteEditor object>
self.__actionSelectDefaultBrush undefined
global QAction = <class ‘PyQt5.QtWidgets.QAction’>
global QIcon = <class ‘PyQt5.QtGui.QIcon’>
global QPixmap = <class ‘PyQt5.QtGui.QPixmap’>
QPixmap.fromImage =
self.__allBrushesPreset undefined
builtini18n =
KeyError: ‘b)_Basic-5_Size’
cause = None
class = <class ‘KeyError’>
context = None
delattr = <method-wrapper ‘delattr’ of KeyError object>
dict = {}
dir =
doc = ‘Mapping key not found.’
eq = <method-wrapper ‘eq’ of KeyError object>
format =
ge = <method-wrapper ‘ge’ of KeyError object>
getattribute = <method-wrapper ‘getattribute’ of KeyError object>
gt = <method-wrapper ‘gt’ of KeyError object>
hash = <method-wrapper ‘hash’ of KeyError object>
init = <method-wrapper ‘init’ of KeyError object>
init_subclass =
le = <method-wrapper ‘le’ of KeyError object>
lt = <method-wrapper ‘lt’ of KeyError object>
ne = <method-wrapper ‘ne’ of KeyError object>
new =
reduce =
reduce_ex =
repr = <method-wrapper ‘repr’ of KeyError object>
setattr = <method-wrapper ‘setattr’ of KeyError object>
setstate =
sizeof =
str = <method-wrapper ‘str’ of KeyError object>
subclasshook =
suppress_context = False
traceback =
args = (‘b)_Basic-5_Size’,)
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 “C:\Users\Tors Inc\AppData\Roaming\krita\pykrita\bulinotes\bn\bnuidocker.py”, line 90, in __addNote
File “C:\Users\Tors Inc\AppData\Roaming\krita\pykrita\bulinotes\bn\bnnotes.py”, line 1021, in edit
dlgBox = BNNoteEditor(note)
File “C:\Users\Tors Inc\AppData\Roaming\krita\pykrita\bulinotes\bn\bnnotes.py”, line 1068, in init
File “C:\Users\Tors Inc\AppData\Roaming\krita\pykrita\bulinotes\bn\bnnotes.py”, line 1126, in __buildUi
self.__actionSelectDefaultBrush=QAction(QIcon(QPixmap.fromImage(self.__allBrushesPreset[‘b)_Basic-5_Size’].image())), i18n(‘Default note brush’), self)
KeyError: ‘b)_Basic-5_Size’

Due to this, I have not been able to use Buli Notes in Krita 5.1 nor Krita Plus.

Thank you for your time and for such a wonderful plugin.


I didn’t try Krita 5.1 yet

But looking the error message it seems you are not using the latest version if BuliNote.

Which version are you using?
The last one available is 0.4.0b and should work properly I think



I was using the wrong version, v0.1.0a, thank you.

I no longer receive any errors, but I’m not sure how the plugin is supposed to function.
For example, the note does not stay in one place on the canvas, like the reference tool does, and I cannot set a font nor size as default.

I’m not sure if this is how it’s supposed to work, but I am loving the ability to place notes in my work and the compact view is wonderful.

Thank you so much for telling me about the latest version and for making such a wonderful plugin!


it was an old version, not compatible with Krita 5

Yes that’s normal, BuliNotes is more like stickly-notes you can put on your screen than on you canvas.
From my point of view, it’s better:

  • you can put your note on the screen you want (if you have than one screen)
  • whatever the canvas zoom & position are, you can have note visible for your eyes

If you need to have some annotation directly on canvas the best thing I think is just to have a dedicated layer for that :wink:

You mean here, to have a default font familly & size of your choice for new note?

Currently no, the default value are defined by system :slight_smile:
But it might be possible to add some options to let you define your preferred default font for new note, if it’s what your thinking about

There’s no real documentation because I consider the plugin is normally simple enough to understand, but if there’s things that need some clarification I can give answer here, or try to put some additional information on repository

Most functions of plugin are described on main repository page (you don’t need github account to read it :wink: ):

You can also read releases notes where I try to describe new functionalities with explanations and screenshots:

You’re welcome :slight_smile: