asammdf icon indicating copy to clipboard operation
asammdf copied to clipboard

cannot import name 'QWebEngineScrip' from 'PySide6.QtWebEngineCore'

Open slowglow opened this issue 1 year ago • 5 comments

Python version

Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)] on win32 'os=Windows-10-10.0.22621-SP0' 'numpy=1.25.2' 'asammdf=7.3.16'

Code

MDF version

Code snippet

(readmdf-3.10) D:\readmdf_pdm\readmdf>asammdf

Traceback

ldf is not supported xls is not supported xlsx is not supported yaml is not supported Traceback (most recent call last): File "D:\readmdf_pdm\readmdf.venv\lib\site-packages\asammdf\gui\widgets\gps.py", line 9, in from pyqtlet2 import L, leaflet, MapWidget File "D:\readmdf_pdm\readmdf.venv\lib\site-packages\pyqtlet2_init_.py", line 8, in from .mapwidget import MapWidget File "D:\readmdf_pdm\readmdf.venv\lib\site-packages\pyqtlet2\mapwidget.py", line 5, in from qtpy.QtWebEngineWidgets import QWebEngineView, QWebEnginePage File "D:\readmdf_pdm\readmdf.venv\lib\site-packages\qtpy\QtWebEngineWidgets.py", line 64, in from PySide6.QtWebEngineCore import ( ImportError: cannot import name 'QWebEngineScrip' from 'PySide6.QtWebEngineCore' (D:\readmdf_pdm\readmdf.venv\lib\site-packages\PySide6\QtWebEngineCore.pyd)

Description

Trying to start the GUI as described in the online documentation. 'QWebEngineScrip' cannot be found, presumably, because the name is mistyped. Should be 'QWebEngineScript' ending with a 't'.

slowglow avatar Oct 23 '23 08:10 slowglow

force install the GUI with the pinned dependecies

pip  install -I asammdf[gui]

danielhrisca avatar Oct 23 '23 10:10 danielhrisca

Indeed, I used pdm to install the packages when I asked the question. After receiving your suggestion, I installed with pip on a clean WinPython install. The error message on GUI startup disappeared, which is great! However, after opening an MDF file and selecting anything other than plot for visualizing the channel data, results in more errors related to widgets.

For example dragging a channel to the visualization pane and then selecting 'Numeric' produces the following error trace, which seems to be related to PySide6:


Error: <class 'TypeError'> 'PySide6.QtWidgets.QHeaderView.sectionResizeMode' called with wrong argument types: PySide6.QtWidgets.QHeaderView.sectionResizeMode(ResizeMode) Supported signatures: PySide6.QtWidgets.QHeaderView.sectionResizeMode(int)

Details: 2023-10-24, 11:11:44


<class 'TypeError'> 'PySide6.QtWidgets.QHeaderView.sectionResizeMode' called with wrong argument types: PySide6.QtWidgets.QHeaderView.sectionResizeMode(ResizeMode) Supported signatures: PySide6.QtWidgets.QHeaderView.sectionResizeMode(int)


File "D:\asammdf\WPy310\python-3.10.11.amd64\lib\site-packages\asammdf\gui\widgets\mdi_area.py", line 1072, in add_window return self._add_numeric_window(names) File "D:\asammdf\WPy310\python-3.10.11.amd64\lib\site-packages\asammdf\gui\widgets\mdi_area.py", line 1995, in _add_numeric_window numeric = Numeric([], parent=self, mode="offline") File "D:\asammdf\WPy310\python-3.10.11.amd64\lib\site-packages\asammdf\gui\widgets\numeric.py", line 1170, in init self.channels = NumericViewer(backend) File "D:\asammdf\WPy310\python-3.10.11.amd64\lib\site-packages\asammdf\gui\widgets\numeric.py", line 1045, in init self.set_styles() File "D:\asammdf\WPy310\python-3.10.11.amd64\lib\site-packages\asammdf\gui\widgets\numeric.py", line 1063, in set_styles self.dataView.verticalHeader().sectionResizeMode(QtWidgets.QHeaderView.ResizeMode.Fixed)


I hope this is helpful information about porting to PySide6. If not, please consider closing this issue.

slowglow avatar Oct 24 '23 02:10 slowglow

Thanks for reporting this.

You can use the development branch code until a new release will be available on PyPI.

pip install https://github.com/danielhrisca/asammdf/archive/development.zip

danielhrisca avatar Oct 24 '23 06:10 danielhrisca

Hello,I met a issue during convert asammdf progamm to exe by pyinstaller 6.5.0 ,after the exe has been packaged successfully,the exex can be runned successfully,but when use the tabular window function ,it shows the error as the picture show below: image error Attention:before I convert it to exe,tabular window function of asammdf can be runned successfully The issue is urgent,pls give me a suggestion as soon as possible,thx!

Yiwen-Sun avatar Mar 22 '24 07:03 Yiwen-Sun