please help with python program

Tim Golden mail at timgolden.me.uk
Thu May 14 03:49:28 EDT 2009


chedderslam wrote:
> IOError: [Errno 13] Permission denied: u'D:/My Music/Ani DiFranco/
> Canon/Disc 1\\folder.jpg'
> 
> I have removed the read-only attribute on the folder, and added
> "Everyone" with full control for security.  Not sure what else to do.
> I would really like to get this working so any help would be
> appreciated.

FWIW, read-only on a folder has no appreciable effect. It's generally
used by the Windows shell to indicate that the folder is "special"
(eg My Documents, My Music etc). It doesn't stop you writing files
in that directory.

Not sure how much Windows-fu you have, so apols if any of
this is teaching my grandmother to suck eggs...

I'm not familiar with the app you mention but make sure that the
user it's running under (which may be your own) has permissions
to write the file you're trying to save in the location in
question. Ie, as that user, do this in Python:

  open (u'D:/My Music/Ani DiFranco/Canon/Disc 1\\folder.jpg', "w")

to see if you get the same result. If you do, access the [Security]
tab on the folder itself, select [Advanced] and then the 
[Effective Permissions] tab to make sure what the permissions
really are. As a rule, "My xxx" folders tend to have more 
restrictive permissions as they are tied to a specific user.
This only matters, obviously, if the app is not running as
your own user.

TJG



More information about the Python-list mailing list