TypeError in Tour with Python 3.10
See original GitHub issueIssue Report Checklist
- Searched the issues page for similar reports
- [ X] Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
- [ X] Reproduced the issue after updating with
conda update spyder
(orpip
, if not using Anaconda) - [not appliable ] Could not reproduce inside
jupyter qtconsole
(if console-related) - [ X] Tried basic troubleshooting (if a bug/error)
- [not appliable ] Restarted Spyder
- [ X] Reset preferences with
spyder --reset
- [ not appliable] Reinstalled the latest version of Anaconda
- [ not appliable] Tried the other applicable steps from the Troubleshooting Guide
- [ X] Completed the Problem Description, Steps to Reproduce and Version sections below
Problem Description
Spyder does not start/work with python 3.10. The error returned is:
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'
What steps reproduce the problem?
- Upgrade to (or install) python 3.10
- follow the steps to install Spyder using pip (python3 -m venv spyder-env -> source spyder-env/bin/activate -> pip3 install spyder)
- launch Spyder with the commmand spyder
What is the expected output? What do you see instead?
Expected: to start the Spyder IDE I see the error
Paste Traceback/Error Below (if applicable)
Traceback (most recent call last):
File "/home/fellype/progs_nao_instalaveis/spyder-env/bin/spyder", line 8, in <module>
sys.exit(main())
File "/home/fellype/progs_nao_instalaveis/spyder-env/lib64/python3.10/site-packages/spyder/app/start.py", line 236, in main
mainwindow.main(options, args)
File "/home/fellype/progs_nao_instalaveis/spyder-env/lib64/python3.10/site-packages/spyder/app/mainwindow.py", line 1992, in main
mainwindow = create_window(MainWindow, app, splash, options, args)
File "/home/fellype/progs_nao_instalaveis/spyder-env/lib64/python3.10/site-packages/spyder/app/utils.py", line 281, in create_window
main.setup()
File "/home/fellype/progs_nao_instalaveis/spyder-env/lib64/python3.10/site-packages/spyder/app/mainwindow.py", line 875, in setup
PLUGIN_REGISTRY.register_plugin(self, PluginClass,
File "/home/fellype/progs_nao_instalaveis/spyder-env/lib64/python3.10/site-packages/spyder/api/plugin_registration/registry.py", line 274, in register_plugin
instance = self._instantiate_spyder5_plugin(
File "/home/fellype/progs_nao_instalaveis/spyder-env/lib64/python3.10/site-packages/spyder/api/plugin_registration/registry.py", line 152, in _instantiate_spyder5_plugin
plugin_instance = PluginClass(main_window, configuration=CONF)
File "/home/fellype/progs_nao_instalaveis/spyder-env/lib64/python3.10/site-packages/spyder/api/plugins/new_api.py", line 294, in __init__
self._container = container = self.CONTAINER_CLASS(
File "/home/fellype/progs_nao_instalaveis/spyder-env/lib64/python3.10/site-packages/spyder/plugins/tours/container.py", line 48, in __init__
self._tour_dialog = OpenTourDialog(
File "/home/fellype/progs_nao_instalaveis/spyder-env/lib64/python3.10/site-packages/spyder/plugins/tours/widgets.py", line 1074, 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'
Versions
- Spyder version: 5.1.5 (from pip)
- Python version: 3.10.0 (from OS)
- Qt version: 5.15.3 (from OS)
- PyQt version: 5.12.3 (from pip)
- Operating System name/version: Slackware Linux - current (pre 15.0)
Additional info: Spyder was working fine with python 3.9.7 in the same environment
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Built-in Exceptions — Python 3.11.1 documentation
A TypeError is raised if note is not a string. New in version 3.11. A list of the notes of this exception, which...
Read more >error when starting spyder on ubuntu 22.04 - qt - Stack Overflow
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....
Read more >Float to int conversion in Qt and Python 3.10 on Fedora 35 beta.
TypeError : setFixedWidth(self, int): argument 1 has unexpected type ... In pretty sure it's a bug in Fedora's Python 3.10 auto conversion of ......
Read more >Ubuntu 20.04 Python 3.10 pip import error
I have python versions 3.6 - 3.9 installed on my system. This problem only occurs with python version 3.10 . What's the cause...
Read more >getting error in Odoo15 with Python 3.10 | Odoo
It includes hundreds of business apps: CRM; e-Commerce; Accounting; Inventory; PoS; Project management; MRP. Take the tour.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is a Python 3.10 “issue” after all. The deprecation has been added in Python 3.8 [1] and is enforced in 3.10 [2].
[1] https://bugs.python.org/issue36048 [2] https://bugs.python.org/issue37999
Output from
pip list
command in the virtual environment I’ve installed spyder: PyQt5 5.12.3 PyQt5-sip 12.9.0Qt version is 5.15.3, the one shipped with Slackware The version of PyQt5 installed in OS is 5.15.2