freqtrade / ftui

FTUI - a terminal-based Freqtrade UI client
MIT License
57 stars 5 forks source link

Run problem on AWS EC2 #5

Closed beratyildizulak closed 2 months ago

beratyildizulak commented 2 months ago

hi,

firstly thanks for your project to share.

I try running ftui on aws ec2 ubuntu. I connected the server via ssh. But I got error as below :

~/ftui$ ftui -y ftui.yaml
Traceback (most recent call last):
  File "/home/ubuntu/ftui/.venv/bin/ftui", line 5, in <module>
    from ftui.ftui import main
  File "/home/ubuntu/ftui/ftui/ftui.py", line 66, in <module>
    class FreqText(App):
  File "/home/ubuntu/ftui/.venv/lib/python3.10/site-packages/textual/message_pump.py", line 107, in __new__
    class_obj = super().__new__(cls, name, bases, class_dict, **kwargs)
  File "/home/ubuntu/ftui/.venv/lib/python3.10/site-packages/textual/app.py", line 694, in __init_subclass__
    raise ValueError(
ValueError: MODES should contain a Screen type or callable, not an instance (got instance of DashboardScreen for 'dashboard')

Do you have any comment?

xmatthias commented 2 months ago

well i can reproduce this easliy (apparently independent of the environment - at least it appears that way at first).

What's causing it is not immediately clear - but we'll take a look for sure.

As a quick workaround - you can run pip install -e "texctual<0.77.0" (with the virtual environment activated).

xmatthias commented 2 months ago

@beratyildizulak can you please try reinstalling the latest version? i've just released version 0.1.3 - aimed to provide a quick-fix to your issue (though it's a workaround - not a long-term fix).

@froggleston i've had to pin textual to <0.77 for now. it's caused by the following line in the changelog to 0.77 - and will need investigation eventually - though i lack experience with textual per se to be of great help here.

Disallowed Screen instances in App.SCREENS and App.MODES

source

froggleston commented 2 months ago

The underlying cause is described here: https://github.com/Textualize/textual/issues/4893

I'm trying to work out how to refactor the app to take this into account, but @xmatthias 's solution will work for now.

froggleston commented 2 months ago

All issues addressed, will be fixed next release.

beratyildizulak commented 2 months ago

Sorry for late reply. Thanks for your interest. The problem is fixed with "commit 2ceaa60a91c6c3bc0c1e69dc536497ccb1a1e9c0".

froggleston commented 2 months ago

Thanks for letting us know! All fixes are in the latest release: https://github.com/freqtrade/ftui/releases/tag/0.1.4