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
Uploading a file b0rken under Python3 #148
Comments
Unsurprisingly, the same error occurs if I first add the file with |
Also unsurprisingly, |
Likewise |
Btw. if you haven't seen it, using |
Thanks, that is actually what I was using to get the traceback above. |
Let me try to summarize what leads to this error:
Why did this not happen before ?
For a quick verification of my theory I did the following change.
And yes, the error above went away and the image was added successfully. |
@hannosch Can you recall why we thought we needed |
I actually added the Without overriding I didn't go as far as disabling the I wonder if we do get a ResoureWarning for an unclosed file if we disable |
I don't get it why they added So in both cases the garbage collector has the task to identify that they have to be closed. The only difference I can see is that Here is a link to the original issue http://bugs.python.org/issue18394 and the only reason I can see there is "getting rid of the warning" If you read some of the comments other web frameworks do it like Zope. So right now I see the following solutions:
I'm somehow in favour of the second option, because it is closer to what the python people suggest. The first option is like "I know better". |
+1, that sounds like the better idea to me. Bottle did the same and keeps the fieldstorage instance around longer (bottlepy/bottle#567). |
id
andtitle
blank, and select a file using the file browser.Traceback:
The text was updated successfully, but these errors were encountered: