473,407 Members | 2,320 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

saving file permission denied on windows

I'm making a small program which takes a folder with images and
generates optimized normal-sized images and thumbnails using Python
Imaging Lbrary (PIL). The problem is here:
.....
os.mkdir(self.output)
.....
img = Image.open(os.path.join(self.dir,file))
img = img.resize(self.imgSize)
# and here comes the error
img.save(self.output, "JPEG", optimize=1)

IOError: [Errno 13] Permission Denied
"D:\\Szymek\\python\\pythumb\\images\\proba"

I don't know what's going on, I didn't have any problems with it in the
past. I tried to save it to a pre-made directory but the effect is the
same, so I don't think it's connected with os.mkdir.

May 15 '06 #1
4 23120
Have you checked the persmissions to the folder? You can look from the
properties of the folder to see.

May 15 '06 #2
The permission is OK I guess... I don't see anything about permission
there, but I tried to save to maaaaaany other catalogs even to C:\ and
D:\ and it raised the same error

May 15 '06 #3
zo****@gmail.com wrote:
I'm making a small program which takes a folder with images and
generates optimized normal-sized images and thumbnails using Python
Imaging Lbrary (PIL). The problem is here:
....
os.mkdir(self.output)
....
img = Image.open(os.path.join(self.dir,file))
img = img.resize(self.imgSize)
# and here comes the error
img.save(self.output, "JPEG", optimize=1)

IOError: [Errno 13] Permission Denied
"D:\\Szymek\\python\\pythumb\\images\\proba"

I don't know what's going on, I didn't have any problems with it in the
past. I tried to save it to a pre-made directory but the effect is the
same, so I don't think it's connected with os.mkdir.

I think you have a logic problem.

You can't save to a folder name, you must save to a file. Note
that O/S is saying that permission is denied to the folder name
stored in self.output:

"D:\\Szymek\\python\\pythumb\\images\\proba"

You most likely meant:

img.save(os.path.join(self.output, file), "JPEG", optimize=1)

-Larry Bates
May 15 '06 #4
That's right! I just didn't notice it.
Thank you

May 16 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Richard Muller | last post by:
Hi, I new to ASP. I have a problem with an ASP script opening a file for writing on my server. Here's how I got to this error: I downloaded a neat FileUpload ASP example from...
3
by: Yitzhak | last post by:
I am having "Permission denied" error while calling LogEvent method of WScript.Shell component. Basically, ASP page calls Windows Script Host Shell component to log events to the OS Application...
1
by: terrorix | last post by:
I want to save uploaded file to disk. I have this construction: HttpPostedFile myFile = ((HttpRequest)Request).Files; if (myFile != null) { string fn =...
3
by: David Thielen | last post by:
Hi; I created a virtual directory in IIS 6.0 and my asp.net app runs fine. But when it tries to write a file I get: Access to the path is denied. - C:\Inetpub\wwwroot\RunReportASP\images ...
2
by: jdlists | last post by:
I'm running python on windows and have a program that watches a directory and acts on files as they come into the directory. After processing is complete, i delete the file, or in this case...
11
by: trs-ggcsea | last post by:
Hi, I am reading a file from a UNC path in my Visual studio 2005 C# (.NET 2) program and getting an access denied exception. I am unsure if this access denied is due to the .NET security...
1
by: igotyourdotnet | last post by:
Ok, here is the issue: I have 2 web pages one does a file upload to a database and the other page does a FTP to a server, both pages use the c:\temp directory. The page that uploads to a database...
5
by: Brian | last post by:
Hi I have a problem in opening url using 'file'. I searched many other discussion groups and tried suggestions, but could not resolve this problem. e.g <?php $myfile =...
3
by: unauthorized | last post by:
I'm running a PHP 5.1 on an Apache 2.2 server under Windows XP which I use to develop my web apps. Currently, I am trying to add "upload" functionality to my project, but for some reason, when the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.