Peter Otten <[email protected]> Wrote in message:
> Alan Gauld wrote:
>
>>
>> As it stands it is impossible to tell how tempfile.py relates to
>> cgi.FieldStorage() or even if the error is related to that
>> at all.
>
> Here's what the cgi.FieldStorage.make_file() method looks like
>
> def make_file(self, binary=None):
> # docstring omitted
> import tempfile
> return tempfile.TemporaryFile("w+b")
>
> and importing from within a method is generally a bad idea when threads are
> involved. However, I'm unable to provoke the error the OP is seeing.
>
> Shal, does the error occur every time or sporadically? Can you provide code
> to reproduce the error?
>
If indeed that's the problem, the solution could be as easy as
doing another import of that module BEFORE starting threads.
--
DaveA
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor