I need to override the global hotkey for 'Space'. I followed the doc and as an example I inserted this line in my 'myconfig.py' file in sloth/examples:
HOTKEYS = ('Space', lambda lt: lt.view().fitInView(), 'Fit current image/frame into window')
This is the output:
Traceback (most recent call last):
File "/usr/local/bin/sloth", line 16, in
labeltool.execute_from_commandline(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/sloth/core/labeltool.py", line 152, in execute_from_commandline
self._mainwindow = MainWindow(self)
File "/usr/local/lib/python2.7/dist-packages/sloth/gui/labeltool.py", line 73, in init
self.setupGui()
File "/usr/local/lib/python2.7/dist-packages/sloth/gui/labeltool.py", line 267, in setupGui
self.initShortcuts(config.HOTKEYS)
File "/usr/local/lib/python2.7/dist-packages/sloth/gui/labeltool.py", line 185, in initShortcuts
fun = import_callable(fun)
File "/usr/local/lib/python2.7/dist-packages/sloth/core/utils.py", line 12, in import_callable
raise exceptions.ImproperlyConfigured('%s is not a valid module path' % module_path_name)
sloth.core.exceptions.ImproperlyConfigured: p is not a valid module path
Could somebody please help me to solve this problem?
I need to override the global hotkey for 'Space'. I followed the doc and as an example I inserted this line in my 'myconfig.py' file in sloth/examples: HOTKEYS = ('Space', lambda lt: lt.view().fitInView(), 'Fit current image/frame into window')
This is the output: Traceback (most recent call last): File "/usr/local/bin/sloth", line 16, in
labeltool.execute_from_commandline(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/sloth/core/labeltool.py", line 152, in execute_from_commandline
self._mainwindow = MainWindow(self)
File "/usr/local/lib/python2.7/dist-packages/sloth/gui/labeltool.py", line 73, in init
self.setupGui()
File "/usr/local/lib/python2.7/dist-packages/sloth/gui/labeltool.py", line 267, in setupGui
self.initShortcuts(config.HOTKEYS)
File "/usr/local/lib/python2.7/dist-packages/sloth/gui/labeltool.py", line 185, in initShortcuts
fun = import_callable(fun)
File "/usr/local/lib/python2.7/dist-packages/sloth/core/utils.py", line 12, in import_callable
raise exceptions.ImproperlyConfigured('%s is not a valid module path' % module_path_name)
sloth.core.exceptions.ImproperlyConfigured: p is not a valid module path
Could somebody please help me to solve this problem?