nschloe / tiptop

:desktop_computer: Command-line system monitoring
MIT License
1.78k stars 70 forks source link

TypeError: App.run() got an unexpected keyword argument 'log' #109

Open 0x0elliot opened 1 year ago

0x0elliot commented 1 year ago

Happened with me on 2nd run. Was just playing around on the first run :)

tiptop
Traceback (most recent call last):
  File "/opt/homebrew/bin/tiptop", line 8, in <module>
    sys.exit(run())
             ^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/tiptop/_app.py", line 100, in run
    TiptopApp.run(log=args.log)
TypeError: App.run() got an unexpected keyword argument 'log'
Ovsyanka commented 1 year ago

The reason behind this error is that you have incompatible version of the textual library.

The tiptop depends on textual >=0.1.15, <0.2 and in textual 0.2.0 there is change in App.run() function, it doesn't accept log argument anymore. So any newer version will give you this error.

It is the packaging issue, so I suggest you to describe how did you install the application and to create the issue for the packager.

Personally I faced with the same error in the AUR package tiptop-cli and seems like it doesn't respect dependency versions. At the moment I have local/python-textual 0.40.0-1

As I see in the README.md, the only recommended way of installing is using pip. I have successful installation using pipx too.

0x0elliot commented 1 year ago

hey! thanks for your reply @Ovsyanka

i installed everything with just a normal pip install

i would like to make sure this doesn't bother anyone from using tiptop again. let me make a quick PR for this.