Mobileread
Running calibre's run_checks inside a UI plugin
#1  jackie_w 02-16-2020, 07:10 AM
@kovid,

I've just noticed a new error message when running my ScrambleEbook plugin in commandline mode. I'm pretty sure it wasn't there when I did most of my py2-to-py3 testing in early January.

This is what I see in the CMD window in Win10 calibre 4.10.1 32-bit
Code
stdout+stderr from file dialog helper: ['', '']
piped data from file dialog helper: ['LA\xa2q\x86D\xa4\'\x93\x94\xf4"C\xa6L\xaamFh9\xf5\xfa\xf2f\x04\xfd{\xf5\x9a]\x19F', 'D:\\sysfiles\\Downloads']
Release of profile requested but WebEnginePage still not deleted. Expect troubles !
Release of profile requested but WebEnginePage still not deleted. Expect troubles !
Release of profile requested but WebEnginePage still not deleted. Expect troubles !
Release of profile requested but WebEnginePage still not deleted. Expect troubles !
Error in atexit._run_exitfuncs:
Traceback (most recent call last): File "atexit.py", line 24, in _run_exitfuncs File "site-packages\calibre\ebooks\oeb\polish\check\css.py", line 225, in shutdown
RuntimeError: wrapped C/C++ object of type Worker has been deleted
Error in sys.exitfunc:
Traceback (most recent call last): File "atexit.py", line 24, in _run_exitfuncs File "site-packages\calibre\ebooks\oeb\polish\check\css.py", line 225, in shutdown
RuntimeError: wrapped C/C++ object of type Worker has been deleted
Press any key to continue . . .
From that message I'm presuming it's related to the recent changes to CSS checking in calibre.ebooks.oeb.polish.check.main run_checks. ScrambleEbook (in standalone/CLI mode) has always had the ability to compare number of book errors before/after scrambling, although I doubt it's being used by many (or even any???) users.

The odd thing is that if I hadn't seen that message I wouldn't know there was anything wrong. The plugin seems to be functioning OK. Is there something I need to do to stop the error?
Reply 

#2  kovidgoyal 02-16-2020, 07:51 AM
The message will not affect the working of the plugin. To avoid it, you should call the shutdown() function from polish.check.css before your plugin exits.
Reply 

#3  jackie_w 02-16-2020, 08:29 AM
Quote kovidgoyal
The message will not affect the working of the plugin. To avoid it, you should call the shutdown() function from polish.check.css before your plugin exits.
Thanks. That's less painful than I feared it might be
Reply 

Today's Posts | Search this Thread | Login | Register