在Ubuntu上启动Spyder时的错误22.04

发布于 2025-01-26 03:34:01 字数 1952 浏览 2 评论 0 原文

我刚刚升级了我的Ubuntu。我在Spyder上有一个错误:

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Traceback (most recent call last):
  File "/usr/bin/spyder", line 33, in <module>
    sys.exit(load_entry_point('spyder==4.2.1', 'gui_scripts', 'spyder')())
  File "/usr/lib/python3/dist-packages/spyder/app/start.py", line 213, in main
    mainwindow.main(options, args)
  File "/usr/lib/python3/dist-packages/spyder/app/mainwindow.py", line 3624, in main
    mainwindow = create_window(app, splash, options, args)
  File "/usr/lib/python3/dist-packages/spyder/app/mainwindow.py", line 3482, in create_window
    main.setup()
  File "/usr/lib/python3/dist-packages/spyder/app/mainwindow.py", line 803, in setup
    self.completions = CompletionManager(self)
  File "/usr/lib/python3/dist-packages/spyder/plugins/completion/plugin.py", line 97, in __init__
    plugin_client = Plugin(self.main)
  File "/usr/lib/python3/dist-packages/spyder/plugins/completion/kite/plugin.py", line 50, in __init__
    self.installer = KiteInstallerDialog(
  File "/usr/lib/python3/dist-packages/spyder/plugins/completion/kite/widgets/install.py", line 287, in __init__
    self._integration_widget = KiteIntegrationInfo(self)
  File "/usr/lib/python3/dist-packages/spyder/plugins/completion/kite/widgets/install.py", line 58, in __init__
    image = image.scaled(image_width, image_height, Qt.KeepAspectRatio,
TypeError: arguments did not match any overloaded call:
  scaled(self, int, int, aspectRatioMode: Qt.AspectRatioMode = Qt.IgnoreAspectRatio, transformMode: Qt.TransformationMode = Qt.FastTransformation): argument 1 has unexpected type 'float'
  scaled(self, QSize, aspectRatioMode: Qt.AspectRatioMode = Qt.IgnoreAspectRatio, transformMode: Qt.TransformationMode = Qt.FastTransformation): argument 1 has unexpected type 'float'

我发现与特定应用程序交易的所有解决方案都开发了我的不同用户,而不是与升级或Ubuntu相关的概率。

I have just upgrade my ubuntu. I have this error on spyder:

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Traceback (most recent call last):
  File "/usr/bin/spyder", line 33, in <module>
    sys.exit(load_entry_point('spyder==4.2.1', 'gui_scripts', 'spyder')())
  File "/usr/lib/python3/dist-packages/spyder/app/start.py", line 213, in main
    mainwindow.main(options, args)
  File "/usr/lib/python3/dist-packages/spyder/app/mainwindow.py", line 3624, in main
    mainwindow = create_window(app, splash, options, args)
  File "/usr/lib/python3/dist-packages/spyder/app/mainwindow.py", line 3482, in create_window
    main.setup()
  File "/usr/lib/python3/dist-packages/spyder/app/mainwindow.py", line 803, in setup
    self.completions = CompletionManager(self)
  File "/usr/lib/python3/dist-packages/spyder/plugins/completion/plugin.py", line 97, in __init__
    plugin_client = Plugin(self.main)
  File "/usr/lib/python3/dist-packages/spyder/plugins/completion/kite/plugin.py", line 50, in __init__
    self.installer = KiteInstallerDialog(
  File "/usr/lib/python3/dist-packages/spyder/plugins/completion/kite/widgets/install.py", line 287, in __init__
    self._integration_widget = KiteIntegrationInfo(self)
  File "/usr/lib/python3/dist-packages/spyder/plugins/completion/kite/widgets/install.py", line 58, in __init__
    image = image.scaled(image_width, image_height, Qt.KeepAspectRatio,
TypeError: arguments did not match any overloaded call:
  scaled(self, int, int, aspectRatioMode: Qt.AspectRatioMode = Qt.IgnoreAspectRatio, transformMode: Qt.TransformationMode = Qt.FastTransformation): argument 1 has unexpected type 'float'
  scaled(self, QSize, aspectRatioMode: Qt.AspectRatioMode = Qt.IgnoreAspectRatio, transformMode: Qt.TransformationMode = Qt.FastTransformation): argument 1 has unexpected type 'float'

All the solution that I have found deal with specific application developed my different user and not for probel related to upgrade or ubuntu.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

反话 2025-02-02 03:34:01

作为一个快速解决方法,只需评论文件中的行:

/usr/lib/python3/dist-packages/spyder/plugins/completion/kite/widgets/install.py.py

58

#image = image.scaled(image_width, image_height, Qt.KeepAspectRatio, Qt.SmoothTransformation)

143

#install_gif.setScaledSize(QSize(image_width, image_height))

244-247

#copilot_label.setPixmap(
            #    copilot_image.scaled(image_width, image_height,
            #                         Qt.KeepAspectRatio,
            #                         Qt.SmoothTransformation))

As a quick workaround just comment out the lines in File:

/usr/lib/python3/dist-packages/spyder/plugins/completion/kite/widgets/install.py

58

#image = image.scaled(image_width, image_height, Qt.KeepAspectRatio, Qt.SmoothTransformation)

143

#install_gif.setScaledSize(QSize(image_width, image_height))

244-247

#copilot_label.setPixmap(
            #    copilot_image.scaled(image_width, image_height,
            #                         Qt.KeepAspectRatio,
            #                         Qt.SmoothTransformation))
鹿港巷口少年归 2025-02-02 03:34:01

spyder维护者在这里)Ubuntu 22.04提供的Spyder软件包( 4.2.1 ,于2020年12月发布)与随附的Python版本( 3.10 )。

但是,该错误是在2022年3月发布的Spyder 5.3.0 中解决的。 我们的文档

(Spyder maintainer here) The Spyder package provided by Ubuntu 22.04 (4.2.1, released in December 2020) is broken with the Python version that comes with it (3.10).

However, this error was fixed in Spyder 5.3.0, released in March 2022. So, to solve this problem please uninstall the Spyder that comes with Ubuntu and install it with pip in a virtualenv, as explained in our documentation.

木格 2025-02-02 03:34:01

我遇到了完全相同的问题,对以下两个项目进行了搜索:

“ spyder” +“ mainwindow.py,line 3624”#aka aka a parter ofer message

我在spyder的github上找到了错误报告#16571:与Python 3.10“一起游览,将Python 3.10确定为罪魁祸首。

在Debian + Waptitude中,我将Python 3从3.10降至3.9版,再次推出了Spyder,并解决了问题!

I had the exact same problem, did a search with the following two items :

"spyder" + "mainwindow.py, line 3624" # aka a piece of the error message

I found the bug report #16571 on spyder's github : "TypeError in Tour with Python 3.10", which identified python 3.10 as the culprit.

In Debian + aptitude I downgraded python 3 from 3.10 to the 3.9 version, launched Spyder again and...problem solved !

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文