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

Compatibility with Spyder 6 #345

Open
dalthviz opened this issue Aug 25, 2023 · 1 comment
Open

Compatibility with Spyder 6 #345

dalthviz opened this issue Aug 25, 2023 · 1 comment

Comments

@dalthviz
Copy link
Member

Description of your problem

What steps will reproduce the problem?

  1. Install spyder-terminal
  2. Use Spyder 6 from source (e6140b132conda l)

What is the expected output? What do you see instead?

Launch normally and have the plugin available. Instead:

<class 'spyder_terminal.terminalplugin.TerminalPlugin'>: get_font() missing 1 required positional argument: 'font_type'
Traceback (most recent call last):
  File "e:\acer\documentos\spyder\spyder otros\carlos\spyder\spyder\app\mainwindow.py", line 795, in setup
    plugin_instance = PLUGIN_REGISTRY.register_plugin(
  File "e:\acer\documentos\spyder\spyder otros\carlos\spyder\spyder\api\plugin_registration\registry.py", line 345, in register_plugin
    instance = self._instantiate_spyder5_plugin(
  File "e:\acer\documentos\spyder\spyder otros\carlos\spyder\spyder\api\plugin_registration\registry.py", line 196, in _instantiate_spyder5_plugin
    plugin_instance.initialize()
  File "e:\acer\documentos\spyder\spyder otros\carlos\spyder\spyder\api\plugins\new_api.py", line 679, in initialize
    self.on_initialize()
  File "C:\Users\dalth\anaconda3\envs\spyder-dev\lib\site-packages\spyder_terminal\terminalplugin.py", line 74, in on_initialize
    self.update_font()
  File "C:\Users\dalth\anaconda3\envs\spyder-dev\lib\site-packages\spyder_terminal\terminalplugin.py", line 106, in update_font
    font = self.get_font()
TypeError: get_font() missing 1 required positional argument: 'font_type'
Traceback (most recent call last):
  File "C:\Users\dalth\anaconda3\envs\spyder-dev\lib\site-packages\spyder_terminal\widgets\main_widget.py", line 304, in __wait_server_to_start
    self.create_new_term(give_focus=False)
  File "C:\Users\dalth\anaconda3\envs\spyder-dev\lib\site-packages\spyder_terminal\widgets\main_widget.py", line 364, in create_new_term
    self, self.port, path=path, font=self.font.family(),
AttributeError: 'NoneType' object has no attribute 'family'

Versions and main components

  • Terminal Version: 1.2.2
  • Spyder version: 6.0.0.dev0 e6140b132 (conda)
  • Python version: 3.9.17 64-bit
  • Qt version: 5.15.2
  • PyQt5 version: 5.15.7
  • Operating System: Windows-10-10.0.19045-SP0

Should we try to fix this setting a default value over the Spyder side or changing things here @ccordoba12 ?

@ccordoba12
Copy link
Member

Things need to be fixed here. It seems this is related to the changes I introduced in spyder-ide/spyder#20933, but the fix doesn't seem hard: just use the SpyderFontType enum to select the appropriate font in self.get_font.

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