L
L
lvOICel2020-02-10 18:23:10
Python
lvOICel, 2020-02-10 18:23:10

How to fix error when compiling python application: "Unable to find PyQt5\Qt\translations\qtwebengine_locales"?

I am writing a small python window application using PyQt5. When compiling with pyinstaller, it gives the following:

(base) E:\vOICe\dbtest>pyinstaller --onefile db.py
117 INFO: PyInstaller: 3.6
117 INFO: Python: 3.7.4 (conda)
119 INFO: Platform: Windows-10-10.0.17763-SP0
...
10116 INFO: Processing module hooks...
10117 INFO: Loading module hook "hook-encodings.py"...
10262 INFO: Loading module hook "hook-pydoc.py"...
10264 INFO: Loading module hook "hook-PyQt5.py"...
...
17950 INFO: Loading module hook "hook-PyQt5.QtTest.py"...
18483 INFO: Loading module hook "hook-PyQt5.QtWebEngineWidgets.py"...
Unable to find "E:\anaconda\lib\site-packages\PyQt5\Qt\translations\qtwebengine_locales" when adding binary and data files.

./translations contains 7 webengine localization files. It is not included in the project. How to fix? What's wrong? The internet is silent about this.
Imports in the project, if it helps:
from io import BytesIO
import sqlite3
import sys
from PyQt5.Qt import (QFont)
from PyQt5.QtWidgets import (
    QApplication, QWidget, QPushButton,
    QLabel, QLineEdit, QTextEdit, QGridLayout, QComboBox,
    QFileDialog, QTableWidget, QTableWidgetItem, QHeaderView)
from PyQt5.QtGui import (QPixmap, QRegExpValidator)
from PyQt5.QtCore import (Qt, QRegExp)
from datetime import (datetime)


UPD: Everything compiled on another machine. I see one option - to carry out a full reinstall on the main machine. Any ideas where the error is coming from?

UPD 2: After reinstalling the problem remained. Through pip in ./anaconda, localization files specifically for WebEngine are not installed (localization of other plugins is available).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lvOICel, 2020-02-11
@lvOICel

A separate installation of WebEngine helped through:
pip install pyqtwebengine

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question