Closed ocrasborn closed 4 months ago
We might need to debug this on the iMac on @vanlummelhuizen 's desk.
My mac computers are running MacOS 10.15.7 (very old but all the implementation stuff works fine) All the native video software is quite old so I can't test videos.
On my giant iPad, Signbank almost works well. Although the video previews don't move on the Gloss Search page. I tried Signbank there because my iPad runs the most recent Apple software. Probably after #988 it will all improve.
This may be related to #1014.
UPDATE: This has been modified.
It's probably related to this:
I think this is going to cause problems with control flow since if the object isn't found it generates a 404 not found and breaks the code, basically. Checking the object existence should be done before the form is processed (actually somehow from the template to this code.)
Here are some uploaded videos in sensevideo
-rwxrwx--- 1 ubuntu www-data 444914 Jul 28 10:18 1.mp4
-rw-r--r-- 1 ubuntu www-data 34643 Jul 28 10:18 1_small.mp4
-rwxrwx--- 1 ubuntu www-data 2106909 Aug 1 16:12 2.mp4
-rw-r--r-- 1 ubuntu www-data 2106909 Aug 1 16:12 2_DJ72n6X.mp4
-rw-r--r-- 1 ubuntu www-data 344397 Aug 1 16:12 2_small.mp4
-rwxrwx--- 1 ubuntu wwwsignbank 444914 Aug 3 12:42 4.mp4
-rwxrwx--- 1 ubuntu wwwsignbank 444914 Aug 3 12:41 4.mp4.bak3
-rw-r--r-- 1 ubuntu www-data 34643 Aug 3 12:42 4_small.mp4
Summary of discussion with @susanodd and @Jetske :
@ocrasborn can you try this again? @Jetske and @susanodd made some repairs to the code.
@Woseseltops:
- We don't know what the problem exactly, but @susanodd is thinking about database problems we're Django is trying to access something that has already been deleted
I'm thinking that the video hasn't been completely uploaded prior to the "create a sentence video object and put it into the database" has finished.
And perhaps the transaction doesn't extend to the scope of uploading a large file as part of the transaction.
@Jetske this is wrong:
In the gloss I'm debugging now, the request.path ends up set as follows:
` value="/dictionary/gloss/44048/8822?edit"
Here's something still wrong. I put the similar senses into a context variable, but here, as you see, it has not been evaluated:
sense_to_similar_senses = dict()
for sense in context['senses']:
sense_to_similar_senses[sense] = sense.get_senses_with_similar_sensetranslations_dict
context['sense_to_similar_senses'] = sense_to_similar_senses
print(sense_to_similar_senses)
{<Sense: over hoofd aaien, aai krijgen, hoofd strelen | >: <bound method Sense.get_senses_with_similar_sensetranslations_dict of <Sense: over hoofd aaien, aai krijgen, hoofd strelen | >>}
It's a bound method.
When I actually apply the method as
sense.get_senses_with_similar_sensetranslations_dict()
it does not complete.
Nevertheless, the detail view still does not appear in the browser. There are probably other such methods applied in the template that do not complete.
I'm able to upload a recorded video and sentence video on mac now. This is not live yet.
@ocrasborn is this still broken?
@ocrasborn can this be closed? Is it working for you now?
Some of the ids in the template elements had spaces (problem for Safari) and some urls had a spurious id element at the end (the ones for where to go after uploading, so the link was not correct.) Safari / Mac is more strict on these things.
If it still does not work (e.g., if you get a broken transaction because the video is too big) please give some more details of what went wrong.
Is this still a problem, @ocrasborn ?
See #627
@Jetske On Safari, it works, but in the error log (in PyCharm while running the server) it shows this message:
[Errno 2] No such file or directory: '/uprobe'
It also displays a complaint in the browser (whether to throw away the file). I just clicked dismiss.
But the error message, it's looking for something that's not there. Is a path set wrong?
@susanodd is that live or when you run it locally?
That's locally. Using the most recent code. I can see the logs in PyCharm so that's how I see it. I can't really test the live server. We'd need to use the Mac on @vanlummelhuizen 's desk. It's kind of difficult to look through the logs on the server. I suspect it's on Apple/Safari. It uploads okay, but during upload, there is a modal (from Safari) about the video software not having permission. (I can't make a screenshot of splash things.)
Is the folder uprobe
part of the CNGT scripts?
It doesn't appear anywhere in the code.
It must be used in one of the packages.
I vaguely recall something to do with getting the splash image.
That doesn't ring a bell. I do also get errors locally (a package problem) but then it uploads nonetheless. So yes, it might be part of CNGT scripts.
I found uprobe
referenced in some github repositories. Yeah, I'd guess it's used in the CNGT scripts for videos.
Is this still a problem?
I'm playing around with the senses/translations, finding that Safari & DuckDuckGo on Mac won't upload a video at all (nothing knew), but now Chrome on Mac also gives an error:
TransactionManagementError at /video/upload/ An error occurred in the current transaction. You can't execute queries until the end of the 'atomic' block.