Hi Mike, Thanks for your reply. I haven't changed anything else, I am processing the MS updates, but I don't think this is the problem, as this all worked fine before the migration to 1.2.1, also if I call the script directly (outside Django) it works fine. My view looks like this: .. import createKML .. def my_view(request, arg): ... createKML.createKML(arg) ...
In the createKML.py the problem arises in: ... import os ... def createKML(id): ... os.mkdir("D:/path/to/mysite/templates/maps/"+str(id)) writefile = "D:/path/to/mysite/templates/maps/"+str(id)+"/"+str(id) + ".kml" f = open(writefile, 'wb') ... I hope this helps? On 14 aug, 21:55, Mike Dewhirst <mi...@dewhirst.com.au> wrote: > On 15/08/2010 12:10am, Mark Mooij wrote: > > > Hi all, > > > I recently migrated from Django 1.1.1 to 1.2.1. In 1.1.1 I had an > > application which imports an external python script in which a > > directory and some files are created. Since the migrate this doesn't > > work anymore, I get a number of IOErrors because the files (and > > directory) that should be created can't be found. I've tried changing > > my directories and slashes (I'm using Windows), but no success. > > Have you changed anything else? > > For example, are you processing the Microsoft Windows update patches > which (for WinXP) insert extra permission steps? Have you changed your > OS from XP to Win7? > > Can you post the source of the script? > > > > > > > Can't I use the os python functions anymore in Django 1.2.1? In the > > documentation I've read about Managing files in models but I prefer to > > handle this through my external script. > > > I hope anybody can help me. > > > Thanks, > > Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.