In my addon everything is working fine.... other than
bpy.app.driver_namespace["Driver"] = driver
It works if I enable the addon on starting blender, but once I save user preferences, then it seems to not run that line of code but everything else works fine, as far as I can tell
I have tried putting it in classes and in the register function but nothing works