Download widget?

Your adapted code works in launches from MyBinder.
Are you sure you don’t have pop-up blocker or virus blocker on?

And please when you have a public repo you are working in trying to get things to work on MyBInder, share the link to the repo and the launch URL. It makes it much easier for others to test what you are working on in the same environment as you.

I just tested it by launching via here (it’s using your repo here) and then switching to classic mode using the ‘Help’ menu of JupyterLab. (‘Help’ > ‘Launch Classic Notebook’ .) Then in classic mode I made a new notebook using the ‘New’ dropdown on the upper, right side and pasted in your code. Then I click on the Voila button on the toolbar above. In the Voila rendering, I was able to create and download .docx files with whatever I typed in the text input form. I do note that the correct .docx extension gets added when saving to my machine even though I cannot see it when I specify the file name in the download panel.

Wait, as long as you don’t try to run you code in JupyterLab, switching to the Voila interface from inside the JupyterLab interface allows your adapted code to work, too.

The only weirdness I see is that by using old versions of things in your requirements.txt, you’ve somehow broken things working in JupyterLab. (It’s always best to leave things unpinned and check if things work. And then if you know you need specific versions, then try pinning and see if things still work.) But that sort of makes since you are using a year-old version of Voila and ipywidgets version 7 had a lot of issues fixed in ipywidgets version 8. And that weirdness could be tied to the newer use of a different default server where ‘jupyter-notebook’ vs. ‘jupyter-server’, see here. Or a combination since you are trying to use old stuff that maybe isn’t fully compatible.

1 Like