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

TypeError: QWebEngineView(parent: QWidget = None): argument 1 has unexpected type 'QWebEngineProfile' #1138

Closed
Akesaka-Hitsuki opened this issue Feb 3, 2024 · 10 comments

Comments

@Akesaka-Hitsuki
Copy link

Akesaka-Hitsuki commented Feb 3, 2024

Describe the bug
使用eaf-open-browser打开链接、eaf-open打开图片、org文件都会报类型错误

To Reproduce
使用最小化配置

(add-to-list 'load-path "~/.emacs.d/site-lisp/emacs-application-framework")
(require 'eaf)
(require 'eaf-browser)

使用emacs -Q -l ~/.emacs.d/mini.el后仍然报这个错(仅测试了browser

Expected behavior
正常打开浏览器、图片和org预览

Versions (please complete the following info):

  • Distro and DE/WM: wsl2 archlinux
  • Versions of Dependencies: python 3.10.13
  • M-x emacs-version: 29.2

Error logs

QStandardPaths: wrong permissions on runtime directory /run/user/1000/, 0755 instead of 0700
MESA: error: ZINK: vkCreateInstance failed (VK_ERROR_INCOMPATIBLE_DRIVER)
glx: failed to create drisw screen
failed to load driver: zink
qt.webenginecontext: 

GL Type: desktop
Surface Type: OpenGL
Surface Profile: CompatibilityProfile
Surface Version: 4.5
QSG RHI Backend: OpenGL
Using Supported QSG Backend: yes
Using Software Dynamic GL: no
Using Multithreaded OpenGL: yes

Init Parameters:
  *  application-name eaf.py 
  *  browser-subprocess-path /home/akesaka/.conda/envs/3.10/lib/python3.10/site-packages/PyQt6/Qt6/libexec/QtWebEngineProcess 
  *  create-default-gl-context  
  *  disable-features ConsolidatedMovementXY,InstalledApp,BackgroundFetch,WebOTP,WebPayments,WebUSB,PictureInPicture 
  *  disable-setuid-sandbox  
  *  disable-speech-api  
  *  disable-web-security  
  *  enable-features NetworkServiceInProcess,TracingServiceInProcess 
  *  enable-threaded-compositing  
  *  in-process-gpu  
  *  use-gl desktop 

Traceback (most recent call last):
  File "/home/akesaka/.emacs.d/site-lisp/emacs-application-framework/core/utils.py", line 56, in on_signal_received
    self._func(obj, *args, **kwargs)
  File "/home/akesaka/.emacs.d/site-lisp/emacs-application-framework/eaf.py", line 156, in new_buffer
    self.create_buffer(buffer_id, url, module_path, arguments)
  File "/home/akesaka/.emacs.d/site-lisp/emacs-application-framework/eaf.py", line 174, in create_buffer
    app_buffer = module.AppBuffer(buffer_id, url, arguments)
  File "/home/akesaka/.emacs.d/site-lisp/emacs-application-framework/app/browser/buffer.py", line 42, in __init__
    BrowserBuffer.__init__(self, buffer_id, url, arguments, False)
  File "/home/akesaka/.emacs.d/site-lisp/emacs-application-framework/core/webengine.py", line 838, in __init__
    self.add_widget(BrowserView(self.profile, buffer_id))
  File "/home/akesaka/.emacs.d/site-lisp/emacs-application-framework/core/webengine.py", line 46, in __init__
    super(QWebEngineView, self).__init__(profile)
TypeError: QWebEngineView(parent: QWidget = None): argument 1 has unexpected type 'QWebEngineProfile'

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

@manateelazycat
Copy link
Member

是不是更新 EAF 后没有重启Emacs?

我看你顶部有mesa错误, 像是显卡驱动的问题, 你更新前正常使用过吗? 还是一直都有问题?

@Akesaka-Hitsuki
Copy link
Author

当初安装的时候 从命令行启动emacs就会报这个错 但是因为能正常启动我就没管

@manateelazycat
Copy link
Member

EAF不支持命令行

@Akesaka-Hitsuki
Copy link
Author

不好意思刚有些太省略导致你误会了
刚说到命令行指的是刚安装emacs时通过命令行启动它报了mesa这个错 主要在gui下一般关注不到这个报错 所以提了命令行
但运行eaf时 emacs确实是gui的形式

@manateelazycat
Copy link
Member

GUI运行EAF会报错吗? 我刚刚测试了, 没有问题呀。

@Akesaka-Hitsuki
Copy link
Author

JK6P $ MWEN V1PF$LR MED

@manateelazycat
Copy link
Member

你在 emacs-application-framework 目录下, 使用 git pull ; ./install-eaf.py --app-drop-local-edit 更新整个EAF和所有应用, 我怀疑你的 EAF core 和 EAF browser 版本没有匹配。

@Akesaka-Hitsuki
Copy link
Author

@IXWEH50H 2ISH6V0M_CT

@manateelazycat
Copy link
Member

奇怪,我重现不了

@manateelazycat manateelazycat reopened this Feb 6, 2024
@manateelazycat
Copy link
Member

确实有这个API https://doc.qt.io/qt-6/qwebengineview.html#QWebEngineView-1

应该是你的Qt版本低于 6.4 的原因

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