Closed tkozybski closed 1 year ago
Changing on_top_toolbar_did_init_links in stats.py to this code "fixes" it i suppose. It loads now. Basically added a try except block so it doesn't throw on user profile screen. For some reason top_toolbar_did_init_links hook is called there now.
def on_top_toolbar_did_init_links(links, toolbar):
try:
name, details = getStatsLink()
links.append(
toolbar.create_link(
"morph", _(name), on_morph_link_clicked, tip=_(details), id="morph"
)
)
except:
pass
Also the code needs an update for these lines in newMorphHelper.py (for v3 scheduler). I don't know how to do that yet.
schedv2.Scheduler._fillNew = wrap(schedv2.Scheduler._fillNew, my_fillNew, 'around')
schedv2.Scheduler._getNewCard = wrap(schedv2.Scheduler._getNewCard, my_getNewCard, 'around')
I opened an issue concerning the v3 scheduler: #276. I doesn’t work on 2.1.49 as well.
As in the title _get_config_py_preference is failing on startup saying that config_py is NoneType, so it wasn't initialized?
Looks like this code isn't getting called
This lines in stats.py are the culprit of the crashes. Removing them allowed the addon to load, but I don't know if it even works without it as there are no stats or anything.
The problem is that the addon tries to start before the user profile is even loaded.