Re: TesseractOCR add-on : error in the NVDA log


Javi Domínguez
 

Sorry I was wrong. The correct syntax is:


super(GlobalPlugin, self).terminate()


This would also be valid:


super(self.__class__, self).terminate()


Although I don't notice a difference between using super or not, maybe the line is necessary, I was wrong, globalPluginHandler.GlobalPlugin really yes has terminate method.


Greetings


El 11/09/2022 a las 10:57, Javi Domínguez via groups.io escribió:

Hello.


I have also noticed this bug. It doesn't seem important but it's a bit inconvenient when you're in debug mode and you hear the error sound every time you reload addons or reboot.


I think the correct syntax is:


super(globalPluginHandler.GlobalPlugin, self).terminate()


but this gives the error:


AttributeError: 'super' object has no attribute 'terminate'


because globalPluginHandler.GlobalPlugin does not have a terminate method. So I think this line is not necessary.


Greetings


El 10/09/2022 a las 11:56, Brian's Mail list account via groups.io escribió:
Yes I see this, but as its only on exit, does it really matter? I also notice another warning for the old  sounds add on, so one assumes different syntax will be needed there as well in the future.


IO - speech.speech.speak (10:43:15.454) - MainThread (5924):
Speaking [LangChangeCommand ('en_GB'), 'reboot nvda with log', CancellableSpeech (still valid), '80 space', 'blank']
INFO - core.main (10:43:15.457) - MainThread (5924):
Exiting
DEBUG - core.triggerNVDAExit (10:43:15.457) - MainThread (5924):
_doShutdown has been queued
DEBUG - core.main (10:43:15.457) - MainThread (5924):
NVDA not already exiting, hit catch-all exit trigger. This likely indicates NVDA is exiting due to WM_QUIT.
DEBUG - core._terminate (10:43:15.457) - MainThread (5924):
Terminating updateCheck
DEBUG - core._terminate (10:43:15.457) - MainThread (5924):
Terminating watchdog
DEBUG - core._terminate (10:43:15.457) - MainThread (5924):
Terminating globalPluginHandler
ERROR - globalPluginHandler.terminate (10:43:15.457) - MainThread (5924):
Error terminating global plugin <globalPlugins.tesseractOCR.GlobalPlugin object at 0x05B6AC50>
Traceback (most recent call last):
 File "globalPluginHandler.pyc", line 41, in terminate
 File "C:\nvda release candidate\userConfig\addons\tesseractOCR\globalPlugins\tesseractOCR\__init__.py", line 74, in terminate
   super(self).terminate()
TypeError: super() argument 1 must be type, not GlobalPlugin
DEBUGWARNING - Python warning (10:43:15.467) - MainThread (5924):
C:\nvda release candidate\userConfig\addons\audiothemes\globalPlugins\audiothemes\__init__.py:67: wxPyDeprecationWarning: Call to deprecated item. Use Remove instead.
 gui.mainFrame.sysTrayIcon.menu.RemoveItem(self.studioMenuItem)
DEBUG - core._closeAllWindows (10:43:15.468) - MainThread (5924):
destroying system tray icon and menu
DEBUG - core._closeAllWindows (10:43:15.472) - MainThread (5924):
destroying main frame during exit process
DEBUG - core._terminate (10:43:15.472) - MainThread (5924):
Terminating gui
DEBUG - autoSettingsUtils.autoSettings.AutoSettings._saveSpecificSettings (10:43:15.472) - MainThread (5924):
Saved settings for NVDAHighlighterSettings
DEBUG - autoSettingsUtils.autoSettings.AutoSettings._saveSpecificSettings (10:43:15.473) - MainThread (5924):
Saved settings for ScreenCurtainSettings
DEBUG - fileUtils.FaultTolerantFile (10:43:15.473) - MainThread (5924):
C:\nvda release candidate\userConfig\nvda.iniaqrxwelz.tmp
INFO - config.ConfigManager.save (10:43:15.476) - MainThread (5924):
Base configuration saved
DEBUG - fileUtils.FaultTolerantFile (10:43:15.476) - MainThread (5924):
C:\nvda release candidate\userConfig\profiles\command.iniojl3gghs.tmp
INFO - config.ConfigManager.save (10:43:15.481) - MainThread (5924):
Saved configuration profile command
DEBUG - core.main (10:43:15.481) - MainThread (5924):
calling lose focus on object with focus
DEBUG - core._terminate (10:43:15.482) - MainThread (5924):
Terminating treeInterceptorHandler
DEBUG - core._terminate (10:43:15.482) - MainThread (5924):
Terminating IAccessible support
DEBUG - core._terminate (10:43:15.482) - MainThread (5924):
Terminating UIA support
DEBUG - core._terminate (10:43:15.487) - MainThread (5924):
Terminating Legacy winConsole support
DEBUG - core._terminate (10:43:15.487) - MainThread (5924):
Terminating Java Access Bridge support
DEBUG - core._terminate (10:43:15.488) - MainThread (5924):
Terminating app module handler
DEBUG - core._terminate (10:43:15.488) - MainThread (5924):
Terminating tones
DEBUG - core._terminate (10:43:15.488) - MainThread (5924):
Terminating NVDAHelper
DEBUG - core._terminate (10:43:15.490) - MainThread (5924):
Terminating touchHandler
DEBUG - core._terminate (10:43:15.490) - MainThread (5924):
Terminating keyboard handler
DEBUG - core._terminate (10:43:15.491) - MainThread (5924):
Terminating mouseHandler
DEBUG - core._terminate (10:43:15.493) - MainThread (5924):
Terminating inputCore
DEBUG - core._terminate (10:43:15.493) - MainThread (5924):
Terminating vision
DEBUG - core._terminate (10:43:15.493) - MainThread (5924):
Terminating brailleInput
DEBUG - core._terminate (10:43:15.493) - MainThread (5924):
Terminating braille
DEBUG - core._terminate (10:43:15.493) - MainThread (5924):
Terminating speech
DEBUG - core._terminate (10:43:15.494) - MainThread (5924):
Terminating addonHandler
DEBUG - core._terminate (10:43:15.494) - MainThread (5924):
Terminating garbageHandler
DEBUG - winAPI.sessionTracking.unregister (10:43:16.540) - MainThread (5924):
Unregistered session tracking
DEBUG - core.main (10:43:16.541) - MainThread (5924):
core done
INFO - __main__ (10:43:16.551) - MainThread (5924):
NVDA exit


Join nvda-addons@nvda-addons.groups.io to automatically receive all group messages.