New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug in filexfer example: filename should be fp? #1083
Comments
jlaine
added a commit
to jlaine/aiortc
that referenced
this issue
May 21, 2024
The example "worked" due to a global variable, but this was not the desired code. Thanks to @angererc for spotting this!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I must admit I didn't try to run the code. Just random stranger on the internet who was reading the example. It appears to me that the 'filename' parameter in run_answer on line 34 should be 'fp'. A) because main() passes the file pointer, not the name, and B) because fp is referenced on line 48, which without having tried it myself I assume will cause an exception.
https://github.com/aiortc/aiortc/blob/e9c13eab915ddc27f365356ed9ded0585b9a1bb7/examples/datachannel-filexfer/filexfer.py#L34C37-L34C45
The text was updated successfully, but these errors were encountered: