How to watch my builded flet app logs? #4075
Replies: 2 comments 2 replies
-
you can use |
Beta Was this translation helpful? Give feedback.
-
I also encountered this problem, when I built my app (Flet Build), it was simply blank, or at times - froze. Have a look at how to setup the Python logging function (basic example below), it will output to a text file (if setup to do so), and you can use it just as you would print statements in the terminal. You are going to need to insert a lot of logging code to isolate the issues and why it is that your program doesn't work correctly. Some of mine were in my actual code, but a lot of them were imports that were failing. You haven't said what isn't working properly, but when I built on macos, binaries and runtime compiled elements from Torch were not being properly packaged by serious_python. I would suspect something as sophisticated as ffmpeg is encountering similar issues given it's a C library. In the second code snippet, is how I found the libraries that were not being correctly imported - by wrapping them in a try loop, and logging the exceptions.
Using the above, I was able to see where the imports stopped working, and which lines of my code weren't working. |
Beta Was this translation helpful? Give feedback.
-
Question
I am currently building a video conversion app using Flet. Internally, I am using a Python module that calls ffmpeg.
The app works perfectly when I run it with flet run, but after building it with flet build macos and running the generated app, it seems to encounter an error and does not function properly.
I would like to check the logs (such as print statements) from the code, but is there a way to view the logs of the app after it has been built?
Code sample
No response
Error message
No response
------------------------------------------------------
Beta Was this translation helpful? Give feedback.
All reactions