This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Button freezes Pythonista
@ccc I'll maybe let techteej to do that when he's happy with his version.
@techteej Import sound (just temporarily while you're testing, the beep will confirm the script is waiting for the video file) and then give ids to the form and submit button of form and submit. Then use this in your microphone button...
techteej last edited by
@tony This still crashes Pythonista.
@techteej It works here on iPad mini (original). If it doesn't work for you (from a clean start of Pythonista) then it may be to do with the threading issue. It's only a guess why the ui.delay of an empty function for zero time helps, all we can say for sure is 'it does because it does' on one device anyway.
When Pythonista gets into the threading issue... one run of a script is not necessarily the same as a second... so it's worth to try from a clean start of Pythonista, (if you haven't already). Otherwise I don't know what to say except it must be frustrating (been there!)
I am struggling to understand this code.
do_POST()never get called.
do_GET()only gets called once with self.path set to '/'.
What is supposed to happen after the user clicks "Use Video"?
@ccc That part is basically @omz's file transfer script. The flow goes...
First GET to the server is for the HTML.
The POST will happen when the video file is being submitted... maybe you haven't got to that point. In turn it will call 'get unused file name' to get a free one if the name of the uploaded file is in use.
So when you click "Use Video" does
When I check the code out of the repo and run it and tap the record button and select "video" and record a video and tap "Use Video" nothing happens. There is no video file stored in the local directory. The beep in the background continues every 2 seconds until Pythonista times out.
Are you using the current code in the repo? What is the name and full path of the video file that gets saved?
@ccc The repo is missing the step of adding ids to the form and submit button of form and submit respectively. The file is saved to the same directory as the script. For a video it's capturedvideo.MOV.
I just submitted a pull request with the two ids added.