kraanzu / smassh

Smassh your Keyboard, TUI Edition
GNU General Public License v3.0
1.41k stars 50 forks source link

[BUG] Crash on installing with `scoop` #85

Closed Ryuo1 closed 1 month ago

Ryuo1 commented 8 months ago

Describe the bug 🐛

using pip in windows, installed from scoop. I get this error after I install smassh from pip:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\anshu\scoop\apps\python\current\Scripts\smassh.exe\__main__.py", line 4, in <module>
  File "C:\Users\anshu\scoop\apps\python\current\Lib\site-packages\smassh\__init__.py", line 3, in <module>
    from smassh.ui.tui import Smassh
  File "C:\Users\anshu\scoop\apps\python\current\Lib\site-packages\smassh\ui\__init__.py", line 1, in <module>
    from .tui import Smassh
  File "C:\Users\anshu\scoop\apps\python\current\Lib\site-packages\smassh\ui\tui.py", line 2, in <module>
    from textual import on
  File "C:\Users\anshu\scoop\apps\python\current\Lib\site-packages\textual\__init__.py", line 9, in <module>
    from . import constants
  File "C:\Users\anshu\scoop\apps\python\current\Lib\site-packages\textual\constants.py", line 10, in <module>
    from typing_extensions import Final, TypeGuard
  File "C:\Users\anshu\scoop\apps\python\current\Lib\site-packages\typing_extensions.py", line 1174, in <module>
    class TypeVar(typing.TypeVar, _DefaultMixin, _root=True):
TypeError: type 'typing.TypeVar' is not an acceptable base type

To Reproduce 🐣

  1. use windows (not linux)
  2. use pip from scoop
  3. install smassh from pip
  4. try to open smassh from the terminal
  5. cry that this error would not have existed on arch linux

Expected behavior 🤔

it work

Screenshots 🧐

No response

Your operating system name

Windows

Your operating system version

23H2

Additional context 📝

No response

kraanzu commented 8 months ago

Hi @Ryuo1, from the error I see that the TUI lib caused the crash and has nothing to do with smassh

I have no idea about Scoop but I'll look into it. Can you also share your Python version? Thanks

cry that this error would not have existed on Arch Linux

lmao yes

Ryuo1 commented 8 months ago

Python 3.12.2

kraanzu commented 8 months ago

Can you try running this in your python3.12 shell:

from typing_extensions import Final, TypeGuard
Ryuo1 commented 8 months ago
Python 3.12.2 (tags/v3.12.2:6abddd9, Feb  6 2024, 21:26:36) [MSC v.1937 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from typing_extensions import Final, TypeGuard
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\anshu\scoop\apps\python\current\Lib\site-packages\typing_extensions.py", line 1174, in <module>
    class TypeVar(typing.TypeVar, _DefaultMixin, _root=True):
TypeError: type 'typing.TypeVar' is not an acceptable base type
kraanzu commented 8 months ago

Ok so it's a known issue ( see https://github.com/python/typing_extensions/issues/243) And most likely because you're using Python 3.12

I've updated the deps, can you retry?

pip install git+https://github.com/kraanzu/smassh.git
kraanzu commented 2 months ago

Closing this as stale

github-actions[bot] commented 1 month ago

Did we solve your problem?

Glad we could help! Don't forget to star the repository! – @kraanzu