View Single Post
Old 10-18-2019, 12:24 PM   #1
mastertea
Junior Member
mastertea began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Oct 2019
Device: Kobo Libra H2O
Importing QJSEngine from PyQt5.QtQml, not found

So I'm current writing a plugin and need a way to convert javascript code to python and came to a solution by using [QJSEngine] class, however after testing the code in calibre I found out that the module [PyQt5.QtQml] couldn't be found. I got the following error:
"ImportError: No module named QtQml"

I looked into calibre installed dir and within it I found that it did include [Qt5Qml.dll] lib however didn't include the python wrapper file.

My question are:
1. Is there a reason for not include the python wrapper file for [Qt5Qml.dll] or is [QJSEngine] class is located in a different module within calibre?

2. Is there another way of access javascript code from python using only calibre included libraries?

I'm using calibre on windows.

Edit: Testing on calibre 4.2

Last edited by mastertea; 10-18-2019 at 12:27 PM.
mastertea is offline   Reply With Quote