[Tutor] cgi.FieldStorage() causing thread.error: can't allocate lock

SABARWAL, SHAL ss3141 at att.com
Sun Jun 1 09:05:45 CEST 2014


Folks,
Appreciate any more insight into this problem. ?
The error occurs not frequently, and would still like to understand and resolve it.
Thanks
Shal

From: SABARWAL, SHAL
Sent: Wednesday, May 28, 2014 5:07 PM
To: 'tutor at python.org'
Subject: RE: cgi.FieldStorage() causing thread.error: can't allocate lock

Hi,
Sorry for getting back so late on this. First time user of the mailing list, so was not aware of the protocol.
Anyway the problem occurs not frequently. Haven't been able to recreate it on demand.

The calling application(applicationCode.py) has a basic -  form = cgi.FieldStorage()

I have attached cgi.py, mimetools.py and tempfile.py

The error is pointed out at the import statement as below
File "applicationCode.py", line 4, in <module>
    import cgi
File "/usr/local/lib/python2.7/cgi.py", line 51, in <module>
    import mimetools
  File "/usr/local/lib/python2.7/mimetools.py", line 6, in <module>
    import tempfile
  File "/usr/local/lib/python2.7/tempfile.py", line 83, in <module>
    _once_lock = _allocate_lock()

Thanks
Shal
From: SABARWAL, SHAL
Sent: Friday, May 23, 2014 7:57 AM
To: tutor at python.org<mailto:tutor at python.org>
Subject: cgi.FieldStorage() causing thread.error: can't allocate lock

Wondering if anyone came across this error in using form = cgi.FieldStorage()
import tempfile
                    File /tempfile.py", line 83, in <module> _once_lock = _allocate_lock()
                        thread.error: can't allocate lock

puthon version 2.7, on HP-UX 11.11
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140601/27492c64/attachment.html>


More information about the Tutor mailing list