Just annotations of little "how to's", so I know I can find how to do something I've already done when I need to do it again, in case I don't remember anymore, which is not unlikely. Hopefully they can be useful to others, but I can't guarantee that it will work, or that it won't even make things worse.
[SOLVED, kind of] GIMP 2.9 fails to start due to incompatible (?) MyPaint brushes
GIMP 2.9 may fail to start due to some MyPaint brushes failing to "deserialize", whatever that means.
In order to "solve" that you don't need to get rid permanently of such brushes, which may still work fine on MyPaint itself.
Instead, move/rename the .mypaint user folder (perhaps ~/.config/mypaint to some?) to mypaint-temp or whatever, run gimp 2.9, it will start. Then go to preferences, folders, and change the mypaint-brushes folder settings, but leave a bogus folder at least, otherwise it will default to the home's mypaint user folder and fail to start due to that.
Exit GIMP, rename/move mypaint-temp back to .mypaint, and that's it.
You can eventually link the compatible mypaint brushes to that "bogus" folder, if that really matters.
Looking more carefully at the error messages, perhaps it's not that hard to fix those brushes by adding a version line to their config files:
But I haven't tried that route.
EDIT: the more correct way of fixing it may be to update MyPaint's brushes.
It can be done by changing the dir to mypaint's libs' dir, where there should be a file named "brushes_migrate_json.py"
That folder or maybe its parent folder.
From there you'd issue:
PYTHONPATH=. python -m lib/brushes_migrate_json <brush dir>
Notice that there's no ".py" there, that's because it's being run as a module (-m), not as an ordinary script.
I think it's not recursive, so it may help to use something like:
for folder in ls -d /home/$USER/.mypaint/brushes/*/ ; do PYTHONPATH=. python -m lib/brushes_migrate_json "${folder}" ; done
Even though parsing "ls" is a no-no thing to do, to me it seems to have worked, my alias ls is set to "ls --group-directories-first -h --color=auto -p'", I don't think one needs to use it, but maybe "\ls" (to "reset" the alias for the current command) may be needed, depending on what one has as the ls' alias.
In order to "solve" that you don't need to get rid permanently of such brushes, which may still work fine on MyPaint itself.
Instead, move/rename the .mypaint user folder (perhaps ~/.config/mypaint to some?) to mypaint-temp or whatever, run gimp 2.9, it will start. Then go to preferences, folders, and change the mypaint-brushes folder settings, but leave a bogus folder at least, otherwise it will default to the home's mypaint user folder and fail to start due to that.
Exit GIMP, rename/move mypaint-temp back to .mypaint, and that's it.
You can eventually link the compatible mypaint brushes to that "bogus" folder, if that really matters.
Looking more carefully at the error messages, perhaps it's not that hard to fix those brushes by adding a version line to their config files:
Code:
Error loading '/home/thedsc/.mypaint/brushes/08/kabura.myb': Failed to deserialize MyPaint brush Error: No 'version' field for brush
EDIT: the more correct way of fixing it may be to update MyPaint's brushes.
It can be done by changing the dir to mypaint's libs' dir, where there should be a file named "brushes_migrate_json.py"
That folder or maybe its parent folder.
From there you'd issue:
PYTHONPATH=. python -m lib/brushes_migrate_json <brush dir>
Notice that there's no ".py" there, that's because it's being run as a module (-m), not as an ordinary script.
I think it's not recursive, so it may help to use something like:
for folder in ls -d /home/$USER/.mypaint/brushes/*/ ; do PYTHONPATH=. python -m lib/brushes_migrate_json "${folder}" ; done
Even though parsing "ls" is a no-no thing to do, to me it seems to have worked, my alias ls is set to "ls --group-directories-first -h --color=auto -p'", I don't think one needs to use it, but maybe "\ls" (to "reset" the alias for the current command) may be needed, depending on what one has as the ls' alias.
Total Comments 0