-
Notifications
You must be signed in to change notification settings - Fork 33
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
Upgrade flet version to latest #224
Conversation
…hing back from settings
…w instances after 6 redirects
@T0jan Mind telling me if you find any issue with this branch? Intent is to upgrade the flet version to the latest hopefully without breaking things 😄 |
@eeintech I assume you rebuilt it for flet-0.22.0? They seem to have included a lot of libraries since 0.19.0 which can't be easily installed on non-debian/fedora linux which is certainly a choice. As I am using Arch privately I was only able to get Ki-nTree running with flet-0.19.0 but it doesn't show anything in the window except the top bar. I will try to check on my work machines next week, where I have more mainstream OS to work with. |
For Flet
@second-string Thanks please let me know if you find anything weird after setting up the full part creation flow 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is some issue here, confirmed on windows, ubuntu 20 and ubuntu 22:
Ki-nTree/kintree/gui/views/main.py
Lines 151 to 156 in 96771e9
def reset_field(field): | |
if isinstance(field, ft.ProgressBar): | |
field.value = 0 | |
else: | |
field.value = None | |
field.update() |
As soon as I try to search for a second part (or the same part on a different supplier) there is an unrecoverable UI crash:
Traceback (most recent call last):
File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "~/.local/lib/python3.10/site-packages/flet_core/page.py", line 528, in wrapper
handler(*args)
File "~/workspace/github/Ki-nTree/kintree/gui/views/main.py", line 300, in run_search
self.reset_view(e, ignore=['part_number', 'supplier'])
File "~/workspace/github/Ki-nTree/kintree/gui/views/main.py", line 289, in reset_view
return super().reset_view(e, ignore=ignore, hidden=hidden_fields)
File "~/workspace/github/Ki-nTree/kintree/gui/views/main.py", line 162, in reset_view
reset_field(value)
File "~/workspace/github/Ki-nTree/kintree/gui/views/main.py", line 156, in reset_field
field.update()
File "~/.local/lib/python3.10/site-packages/flet_core/control.py", line 293, in update
assert self.__page, "Control must be added to the page first."
AssertionError: Control must be added to the page first.
Linux installations need an additional package to be installed before flet>0.19 can work, for debian based systems the package is covered by APT:
sudo apt -y install libmpv1
requirements.txt needs to be updated. Apart from the the obvious flet requirement the Inventree API should be updated also to the latest version (13.3, have checked all functions and found no issues):
Line 4 in 96771e9
inventree>=0.12.1,<1.0 |
Thanks @T0jan for the review, I will try to get the PR updated soon. Maybe this should be |
I also get the same |
Yeah I meant the UI getting unresponsive with 'unrecoverable UI crash'. Program stays open but no no part can be searched anymore. |
ah I see. my UI is still responsive (as in, buttons still show the hover state if I hover over them, etc). If I switch to a different tab on the left hand column, then switch back, the original tab will work again for another search. |
Oh that's true on my systems as well as I just noticed. so there is probably just an update missing after the search is done? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be all fixed now thanks!
No description provided.