microelly2 / freecad-pluginloader

GNU Lesser General Public License v3.0
10 stars 7 forks source link

Hardcoded userconfigfile #12

Open kkoksvik opened 8 years ago

kkoksvik commented 8 years ago

Getting this error-message during startup. Does not look like it is problematic but cutters terminal when looking for other problems.

Mod pluginloader InitGui.py starting ... pluginmanager config file /usr/share/freecad//Mod/plugins/pluginloaderconfig.yaml pluginmanager userconfig file /usr/lib/freecad/Mod/plugins/myconfig.yaml userconfigfile not available IOError: [Errno 2] No such file or directory: '/usr/lib/freecad/Mod/plugins/myconfig.yaml'

dict {'menu test - cmd2': {'exec': 'import plugins;plugins.plugin1.p1.info1()'}, 'menu tes - fun': {'exec': 'FreeCAD.ActiveDocument.addObject("Part::Box","Box")'}, 'menu test - command1': {'exec': 'import plugins;plugins.plugin1.info2()'}} {'author': 'noname', 'backup': '/usr/share/freecad/tmp/bak2_', 'description': 'no description', 'destdir': '/home/kjetil/.FreeCAD/Mod/testdir', 'exec': "import FreeCAD;FreeCAD.Console.PrintWarning('*****default Method FreeCAD-Dir=/usr/share/freecad/! HOME-Dir=/home/kjetil/! UserData-Dir=/home/kjetil/.FreeCAD/!\n')", 'format': 'zipdir', 'icon': '/usr/share/freecad/Mod/plugins/icons/master.png', 'menu': 'defaults', 'method': 'zip', 'name': 'defaultName', 'source': 'https://github.com/microelly2/plugin_defaults/archive/master.zip', 'sourcedir': 'plugin_defaults-master', 'status': 'ignore', 'timestime': 'https://github.com/microelly2/plugin_defaults/timestamp'} dict {'files': ['dark-green.qss', 'dark-blue.qss', 'dark-orange.qss', 'light-green.qss', 'light-blue.qss', 'light-orange.qss'], 'pattern': '[PATH_TO_IMAGES]', 'data': 'UserAppData/Gui/Stylesheets/images'} Mod pluginloader InitGui.py done gentoolbars ...

ReactorShop commented 6 years ago

+2

It happens because the FCText userconfigfile value inside the user.cfg file is empty @ line 247:

<FCText Name="userconfigfile"></FCText></FCParamGroup>

so, it's picking up the default value used by get() in pluginloader.py @ line 381:

fn2=z.get('userconfigfile',"/usr/lib/freecad/Mod/plugins/myconfig.yaml") say("pluginmanager userconfig file "+ fn2)

I've just installed the plugin and did some checking to get to this stage, so I'm not aware if there's a dialog where I can enter this path, or why was it left empty in the first place.