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

SABARWAL, SHAL ss3141 at att.com
Wed May 28 23:06:37 CEST 2014


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
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/20140528/9ebc6f68/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cgi.py
Type: application/octet-stream
Size: 34505 bytes
Desc: cgi.py
URL: <http://mail.python.org/pipermail/tutor/attachments/20140528/9ebc6f68/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mimetools.py
Type: application/octet-stream
Size: 7168 bytes
Desc: mimetools.py
URL: <http://mail.python.org/pipermail/tutor/attachments/20140528/9ebc6f68/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tempfile.py
Type: application/octet-stream
Size: 18061 bytes
Desc: tempfile.py
URL: <http://mail.python.org/pipermail/tutor/attachments/20140528/9ebc6f68/attachment-0005.obj>


More information about the Tutor mailing list