Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imageio has permission problems as WSGI user on Amazon Web Server #106

Closed
amalgamatedclyde opened this issue Dec 16, 2014 · 13 comments
Closed

Comments

@amalgamatedclyde
Copy link

everything was running great but imageio killed me! (not that i am ungrateful for your excellent module!!!)

@Zulko
Copy link
Owner

Zulko commented Dec 16, 2014

Ok. I'm calling @almarklein into the discussion. Can you give more details about what you do, when the error occurs, and what it says, so that we can find a solution ?

In the meantime the best would be not to use imageio: if you write GIFs, ask for program="ImageMagick". For the ffmpeg, replace 'ffmpeg-imageio' by 'auto-detect' in config_defaults.py prior to install. This way everything should work as before. Tell me if it works for you. If you still meet problems we will find a way to silence imageio with a try/except block.

@amalgamatedclyde
Copy link
Author

i can send you my AWS logs. the error occurs at the time when my app imports moviepy modules. it's running Amazon Linux and ImageMagick is installed. i don't need imageio, so i can fall back to the earlier moviepy version, but i have been running a stable configuration on AWS for weeks until the recent commits, so i wanted to mention this.

@Zulko
Copy link
Owner

Zulko commented Dec 16, 2014

Ok, so it seems that we will need a try/except block. However I really need the error returned by Python so that I can safely filter it out. It should be something like "OSError: blablabla" or SystemError or something like that. Yeah maybe the AWS logs will contain that, can you paste them on Gist maybe ?

@amalgamatedclyde
Copy link
Author

@Zulko
Copy link
Owner

Zulko commented Dec 16, 2014

The relevant line is : OSError: [Errno 2] No such file or directory: '/home/wsgi/.imageio'
Looks like something we could fix. I'll leave it to @almarklein for suggestions. Thanks for the report !

@amalgamatedclyde
Copy link
Author

my pleasure!

@amalgamatedclyde
Copy link
Author

i should look at the code. it's just os.makedir trying to operate where the web user doesn't have permission. the rest of our file operations are working, like VideoFileClip.save()

@almarklein
Copy link

Thanks for the report and for bringing me in. Interesting use-case; I never considered that writing in the home dir would be prohibited. Is there another place where we could download necessary resources to, or is the only time we can download/install stuff at installation time?

Previously, were you using the system-level version of ffmpeg?

@amalgamatedclyde
Copy link
Author

i'm using a pre-compiled binary of ffmpeg because i am running on Amazon Elastic Beanstalk. servers are created on-the-fly as traffic increases. the web user can only write to the location where the finished video files are stored. in theory i could give this user write permission for /home, but Amazon EC2 doesn't build the installation that way so there could be a good reasonclyde

-------- Original Message --------
Subject: Re: [moviepy] imageio has permission problems as WSGI user on
Amazon Web Server (#106)
From: Almar Klein notifications@github.com
Date: Tue, December 16, 2014 3:22 am
To: Zulko/moviepy moviepy@noreply.github.com
Cc: amaglamatedclyde clyde@amalgamated-clyde.com

Thanks for the report and for bringing me in. Interesting use-case; I never considered that writing in the home dir would be prohibited. Is there another place where we could download necessary resources to, or is the only time we can download/install stuff at installation time? Previously, were you using the system-level version of ffmpeg? —Reply to this email directly or view it on GitHub.

@almarklein
Copy link

Thanks. And the pre-compiled ffmpeg library, is it on PATH?

@almarklein
Copy link

I fixed this by resorting to /var/tmp when ~/ is not possible. I plan to release a new version next week.

@amalgamatedclyde
Copy link
Author

excellent!

-------- Original Message --------
Subject: Re: [moviepy] imageio has permission problems as WSGI user on
Amazon Web Server (#106)
From: Almar Klein notifications@github.com
Date: Fri, January 30, 2015 7:29 am
To: Zulko/moviepy moviepy@noreply.github.com
Cc: amaglamatedclyde clyde@amalgamated-clyde.com

I fixed this by resorting to /var/tmp when ~/ is not possible. I plan to release a new version next week. —Reply to this email directly or view it on GitHub.

@keikoro
Copy link
Collaborator

keikoro commented Feb 18, 2017

Looks like this was solved on imageio's side. Closing.

@keikoro keikoro closed this as completed Feb 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants