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: 'type' object is not subscriptable after upgrade to 1.0.0b1 #136

Closed
Kedarius opened this issue Mar 7, 2023 · 4 comments · Fixed by #138
Closed

TypeError: 'type' object is not subscriptable after upgrade to 1.0.0b1 #136

Kedarius opened this issue Mar 7, 2023 · 4 comments · Fixed by #138
Labels
bug Something isn't working
Milestone

Comments

@Kedarius
Copy link

Kedarius commented Mar 7, 2023

I've upgraded to 1.0.0b1 with
pip install -U kintree --pre
and now kintree does not start:

Traceback (most recent call last):
  File "c:\program files\python38\lib\runpy.py", line 193, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\program files\python38\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Program Files\Python38\Scripts\kintree.exe\__main__.py", line 4, in <module>
  File "c:\program files\python38\lib\site-packages\kintree\kintree_gui.py", line 3, in <module>
    from .gui.gui import kintree_gui
  File "c:\program files\python38\lib\site-packages\kintree\gui\gui.py", line 3, in <module>
    from .views.common import update_theme, handle_transition
  File "c:\program files\python38\lib\site-packages\kintree\gui\views\common.py", line 178, in <module>
    class SwitchWithRefs(ft.Switch):
  File "c:\program files\python38\lib\site-packages\kintree\gui\views\common.py", line 185, in SwitchWithRefs
    refs: list[ft.Ref] = None,
TypeError: 'type' object is not subscriptable

I've tried to remove my configuration but it did not help.

@eeintech
Copy link
Contributor

eeintech commented Mar 7, 2023

Hello @Kedarius

I haven't been able to reproduce your issue... I am not sure what is the problem 😕

Do you mind to comment out that line 185 in the c:\program files\python38\lib\site-packages\kintree\gui\views\common.py file and re-try?

@Kedarius
Copy link
Author

Kedarius commented Mar 7, 2023

Hi @eeintech ,
commenting out did not help as it said
NameError: name 'refs' is not defined
however setting it to [] helped (I also needed to do the same on line 215). See the attached file with modifications.
common.zip

@eeintech
Copy link
Contributor

eeintech commented Mar 8, 2023

@Kedarius Thanks, I will try to understand the underlying of this issue and fix it, thanks for the report.

@eeintech eeintech added the bug Something isn't working label Mar 8, 2023
@eeintech eeintech added this to the 1.0.0 milestone Mar 8, 2023
eeintech added a commit that referenced this issue Mar 10, 2023
@eeintech eeintech mentioned this issue Mar 10, 2023
@eeintech
Copy link
Contributor

@Kedarius I found the issue (this type hinting was not supported in Python=3.8) and added a GUI test to catch it next time 😄
It will be fixed with 1.0.0b2!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants