Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

跑readme中的案例报错 #113

Closed
CharlesKeeling65 opened this issue Apr 11, 2023 · 9 comments
Closed

跑readme中的案例报错 #113

CharlesKeeling65 opened this issue Apr 11, 2023 · 9 comments

Comments

@CharlesKeeling65
Copy link

Describe the bug
A clear and concise description of what the bug is.
跑readme中的案例报错
examples\gallery> python demo.py


demo.py 9
from app.view.main_window import MainWindow

main_window.py 14
from .basic_input_interface import BasicInputInterface

basic_input_interface.py 4
from qfluentwidgets import (PushButton, ToolButton, PrimaryPushButton, HyperlinkButton,

ImportError:
cannot import name 'EditableComboBox' from 'qfluentwidgets'

Environment

  • OS: Windows
  • DPI scaling: 125%
  • Python: 3.8.8 64-bit]
  • PyQt: 6.5.0
  • PyQt-Fluent-Widgets: 0.6.3

tmpD63C

@CharlesKeeling65 CharlesKeeling65 added the bug Something isn't working label Apr 11, 2023
@zhiyiYo
Copy link
Owner

zhiyiYo commented Apr 11, 2023

版本太低了,建议到 pypi 官网下载最新版

@zhiyiYo zhiyiYo closed this as completed Apr 11, 2023
@zhiyiYo zhiyiYo removed the bug Something isn't working label Apr 11, 2023
@CharlesKeeling65
Copy link
Author

版本太低了,建议到 pypi 官网下载最新版

我更新之后,这个demo.py还是报错,其他的demo.py都能运行,就是gallery的这个还是不行
demo.py 9
from app.view.main_window import MainWindow

main_window.py 18
from .material_interface import MaterialInterface

material_interface.py 3
from qfluentwidgets.components.widgets.acrylic_label import AcrylicLabel

acrylic_label.py 9
from ...common.image_utils import gaussianBlur

image_utils.py 8
from scipy.ndimage.filters import gaussian_filter

init.py 130
from . import _distributor_init

_distributor_init.py 59
WinDLL(os.path.abspath(filename))

init.py 381 init
self._handle = _dlopen(self._name, mode)

FileNotFoundError:
Could not find module 'E:\Anaconda3\envs\spiderenvs\lib\site-packages\scipy.libs\libbanded5x.3OIBJ6VWWPY6GDLEMSTXSIPCHHWASXGT.gfortran-win_amd64.dll' (or one of its dependencies). Try using the full path with constructor syntax.
tmpCB60

@zhiyiYo
Copy link
Owner

zhiyiYo commented Apr 11, 2023

建一个新的虚拟环境试试?

@CharlesKeeling65
Copy link
Author

CharlesKeeling65 commented Apr 11, 2023

建一个新的虚拟环境试试?

创了新环境,也还是不行,报错QWidget: Must construct a QApplication before a QWidget,而且menu/demo.py,也没法跑了,报错如下:

Traceback (most recent call last):
  File "F:\005_Programming\PyQt6项目\PyQt-Fluent-Widgets-PyQt6\examples\menu\demo.py", line 25, in contextMenuEvent
    menu = RoundMenu(parent=self)
  File "E:\Anaconda3\envs\pyqt_envs\lib\site-packages\qfluentwidgets\components\widgets\menu.py", line 179, in __init__
    super().__init__(parent=parent)
TypeError: QWidget(parent: typing.Optional[QWidget] = None, flags: Union[Qt.WindowFlags, Qt.WindowType] = Qt.WindowFlags()): argument 'parent' has unexpected type 'Demo'

类似的combo_box/demo.py,也是QWidget: Must construct a QApplication before a QWidget

@zhiyiYo
Copy link
Owner

zhiyiYo commented Apr 11, 2023

用的 pyqt6 版本是多少?我平时测试都是用的 6.4.2

@zhiyiYo
Copy link
Owner

zhiyiYo commented Apr 11, 2023

要不换成 pyqt6.4.2试试

@CharlesKeeling65
Copy link
Author

用的 pyqt6 版本是多少?我平时测试都是用的 6.4.2

我的是6.5.0

@zhiyiYo
Copy link
Owner

zhiyiYo commented Apr 11, 2023

@CharlesKeeling65
试试 6.4.2

@CharlesKeeling65
Copy link
Author

CharlesKeeling65 commented Apr 12, 2023

Name: PyQt6
Version: 6.4.2
Summary: Python bindings for the Qt cross platform application toolkit
Home-page: https://www.riverbankcomputing.com/software/pyqt/
Author: Riverbank Computing Limited
Author-email: info@riverbankcomputing.com
License: GPL v3
Location: e:\anaconda3\envs\pyqt_envs\lib\site-packages
Requires: PyQt6-Qt6, PyQt6-sip
Required-by:

换成6.4.2 还是和上面的错误一样

(pyqt_envs) PS F:\005_Programming\PyQt6项目\PyQt-Fluent-Widgets-PyQt6\examples\gallery> python demo.py
QWidget: Must construct a QApplication before a QWidget

而且我的PyQt-Fluent-Widgets版本信息是

Name: PyQt-Fluent-Widgets
Version: 0.6.9
Summary: A fluent design widgets library based on PyQt5
Home-page: https://github.com/zhiyiYo/PyQt-Fluent-Widgets
Author: zhiyiYo
Author-email: shokokawaii@outlook.com
License: GPLv3
Location: e:\anaconda3\envs\pyqt_envs\lib\site-packages
Requires: darkdetect, PyQt5, PyQt5-Frameless-Window
Required-by:

好像和最新的那个issue里那个人的版本不一样,他是0.6.10,我好像更新不了

问题解决了,我当时下载成PyQt-Fluent-Widgets,重新下了PyQt6-Fluent-Widgets就可以了,感谢作者!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants