restricted mode???

Robin Becker robin at
Wed Nov 4 11:49:00 CET 2009

A reportlab user running via mod_python+django (Python 2.5.2 and mod_python 
3.3.1) reports a strange intermittent error involving failure to read files 
which are known to be present.

After some debugging efforts we got this clearer error message

      File "/usr/lib/python2.5/site-packages/reportlab/lib/", line 810, 
in dump
         f = open(self.fn,'wb')

     IOError: file() constructor not accessible in restricted mode

this is not the  original error, but part of our efforts to debug; however, the 
original error was during an attempt to read a file so presumably open was not 
available there.

Googling the error indicates something to do with restricted 

I thought that restricted mode died ages ago.

Any ideas what could be causing this?
Robin Becker

More information about the Python-list mailing list