Thanks for the quick response.  Yes, I did do some searching and ran
across the post about NFS (and yes I am using an NFS mount).  However,
I can solve the problem by bypassing the `save` method like so:

from django.core.files import File

f = open('my_filename.jpg', 'w')
myfile = File(f)
myfile.write(image.read())
sm.image = myfile

I suppose this method works because it bypasses the `save` method's
use of the lock.

On Aug 19, 12:16 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Mon, 2008-08-18 at 16:05 -0700, wnielson wrote:
> > I've been running into an issue while trying to upgrade my code to use
> > Django's new file handling system.  When I try to use the `save`
> > method of a `ImageField` instance, I get an `IOError: [Errno 37] No
> > locks available`.  The file gets created but nothing is ever written
> > to it.  Here is a basic example that illustrates the issue I keep
> > running into.
>
> We need some more details about your particular setup. Are you trying to
> save to an NFS mounted filesystem? A bit of searching on Google for that
> error message (which hopefully you also did before posting to the
> mailing list, right?) shows that it's possible there.
>
> If you're not using an NFS_mounted system as the destination, what sort
> of OS and filesystem are you trying to save to? Do things change if you
> target the file saves to somewhere else that is more or less guaranteed
> to be locally mounted (e.g. /tmp on a Unix system)?
>
> Regards,
> Malcolm
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to