--> -->
 
 
<type 'exceptions.OSError'>
Python 2.5.1: /System/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python
Sat Jul 4 23:16:24 2009

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

 /Users/ajh/Sites/cgi-bin/index.py in ()
  511   dirpath=os.path.dirname(htmlpath)
  512   if not os.path.isdir(dirpath):
  513     os.makedirs(dirpath,0777)
  514   htmlfile2=open(htmlpath,'w')
  515   for line in pid.stdout.readlines():
os = <module 'os' from '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/os.py'>, os.makedirs = <function makedirs at 0x40630>, dirpath = '/home/ajh/local/localhost/htmls/trains/asia/china'
 /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/os.py in makedirs(name='/home/ajh/local/localhost/htmls/trains/asia/china', mode=511)
  163     if head and tail and not path.exists(head):
  164         try:
  165             makedirs(head, mode)
  166         except OSError, e:
  167             # be happy if someone already created the path
global makedirs = <function makedirs at 0x40630>, head = '/home/ajh/local/localhost/htmls/trains/asia', mode = 511
 /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/os.py in makedirs(name='/home/ajh/local/localhost/htmls/trains/asia', mode=511)
  163     if head and tail and not path.exists(head):
  164         try:
  165             makedirs(head, mode)
  166         except OSError, e:
  167             # be happy if someone already created the path
global makedirs = <function makedirs at 0x40630>, head = '/home/ajh/local/localhost/htmls/trains', mode = 511
 /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/os.py in makedirs(name='/home/ajh/local/localhost/htmls/trains', mode=511)
  163     if head and tail and not path.exists(head):
  164         try:
  165             makedirs(head, mode)
  166         except OSError, e:
  167             # be happy if someone already created the path
global makedirs = <function makedirs at 0x40630>, head = '/home/ajh/local/localhost/htmls', mode = 511
 /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/os.py in makedirs(name='/home/ajh/local/localhost/htmls', mode=511)
  170         if tail == curdir:           # xxx/newdir/. exists if xxx/newdir exists
  171             return
  172     mkdir(name, mode)
  173 
  174 def removedirs(name):
global mkdir = <built-in function mkdir>, name = '/home/ajh/local/localhost/htmls', mode = 511

<type 'exceptions.OSError'>: [Errno 13] Permission denied: '/home/ajh/local/localhost/htmls'