Voila button not working

Your code seems to work in a JupyterLab cell and Voila in my hands in that in Voila I get a copy of the data my csv file put in the directory I specify, saved as copied_file.csv.

In my case, I had to change your read excel line to the following because I was using a CSV file and not an excel file.

df = pd.read_csv(input_file.value)

The one thing that doesn’t quite work is that your File saved in message goes to the log when I first execute it in JupyterLab. It seems to go off to nowhere in Voila. This handling is as it should be because you aren’t assigning it to the widgets output handling necessary for modern use of ipywidgets upon which Voila is based, see this thread, especially the last post.

Since you write in three you want, “Print in the app: 'File saved in {output directory}”, I’ll see what I’d suggest in a separate reply so it doesn’t get buried. However, I wanted to point out that no where in your post did you say what you saw not working. And so I cannot be sure your experience is the same as mine here. And as people trying to help you, we shouldn’t be left to dissect these things and guess what you mean. In other words, the title of ‘Voila button not working’ and ’ Unfortunately, the buttons are not working as expected’ are insufficient. You may be experiencing something completely different and so what I’ve seen isn’t reproducing what you are experiencing. Please read Getting good answers to your questions and use it as a guide going forward.


Minor aside now, since your code does seem to work it is rather moot but I’ll point out…:

What aspect is based on that as a starting point? I cannot see any semblance of similarity in the code. If that one you linked to works then actually step through slowly changing it to match your needs.