MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Calibre (https://www.mobileread.com/forums/forumdisplay.php?f=166)
-   -   Calibre 5.71 - CLI - Message error when adding books/exporting data (https://www.mobileread.com/forums/showthread.php?t=335747)

Bertrand 12-18-2020 06:46 AM

Calibre 5.71 - CLI - Message error when adding books/exporting data
 
Windows 10 - Calibre 5.71

When I add books or export data through a batch file, I get this error message (since calibre v5.xx) :

Code:

Could not contact the running instance of calibre (<-- free translation from french...)
Failed to connect to Listener at: \\.\pipe\CalibreGUI-adminx with error: QLocalSocket::connectToServer: Invalid name
QWidget: Must construct a QApplication before a QWidget

Despite this message, everything works as expected: books are added, exports are done correctly, so I just wanted to point out this little problem.

kovidgoyal 12-18-2020 07:44 AM

What is your batch file doing exactly?

Bertrand 12-18-2020 08:27 AM

Here it is (only relevant parts, the whole script is checking various things before, not related to calibre)

Add books :
Code:


calibre-debug -s
calibredb --library-path %biblio% add -d %dest% 1>nul 2>&1

Export all data :
Code:


calibre-debug --export-all-calibre-data %destination% %calibre% > nul

Edit : I've just found out, if I remove the redirections ( 1>nul 2>&1), this message doesn't appear anymore.
Strange, I've been using this script for years.

kovidgoyal 12-18-2020 08:56 AM

Well the first couple of lines of the eror message will happen if there was no running calibre to shutdown. The last lineis a bug and will be fixed in the next release. Note that if you want to avoid the first two lines use

calibre -s


instead of

calibre-debug -s

Bertrand 12-18-2020 10:05 AM

Quote:

Originally Posted by kovidgoyal (Post 4070775)
Note that if you want to avoid the first two lines use
calibre -s

instead of
calibre-debug -s

Noted. Thanks !


All times are GMT -4. The time now is 09:38 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.