TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Need help!: Python [Errno 13] Permission denied: 'artsciimg.png'

1 点作者 bl00djack超过 11 年前
Hi guys, I really need help figuring out this error on Python. This python script works fine on my local computer, but when I push it to my server, it is showing error when the script tries to save an Image. Here&#x27;s my code:<p>def magic(usrInput):<p>.<p>.<p>.<p><pre><code> im = Image.new(&quot;RGB&quot;,(x,y)) for j in range(y): for i in range(x): </code></pre> .<p>.<p>.<p><pre><code> im.save(&quot;artsciimg.png&quot;) </code></pre> #End of code<p>And the error says: &quot;[Errno 13] Permission denied: &#x27;artsciimg.png&#x27;&quot;<p>My local PC is running on Windows, and my server is on Ubuntu. I really need to know what&#x27;s going on, the project is due in less than 36 hours :(

5 条评论

nkuttler超过 11 年前
The people in #python on the freenode IRC network are usually quite helpful. Try <a href="http://webchat.freenode.net/?channels=%23python&amp;uio=OT10cnVlde" rel="nofollow">http:&#x2F;&#x2F;webchat.freenode.net&#x2F;?channels=%23python&amp;uio=OT10cnVl...</a> if you don&#x27;t have a real IRC client.
casca超过 11 年前
Try im.save(&quot;&#x2F;tmp&#x2F;artsciimg.png&quot;). This will most likely show that it&#x27;s a local permission error.<p>Then identify which directory it&#x27;s trying to write to with os.system(&quot;pwd&quot;) and chmod 777 that directory.
评论 #6839926 未加载
mr_timppa超过 11 年前
U should check your server rights were you are writing image. Is there write permission (-rw-rw-r--). Check it like command ls -l your&#x2F;directory. If not add chmod a+r your&#x2F;directory
bl00djack超过 11 年前
I have tried chmod to all the folders, and files, it still doesn&#x27;t work :(
erekel超过 11 年前
man chown man chmod