Wow. This actually worked for me. Thanks!

On Monday, October 24, 2011 3:29:59 PM UTC-6, Chris Clark wrote:
>
> Thilo-Alexander Ginkel wrote:
> > On Mon, Feb 14, 2011 at 23:01, Christian Hammond <chip...@chipx86.com> 
> wrote:
> >   
> >> I don't believe they're stored temporarily anywhere. If so, it's 
> internal to
> >> Django and I don't know it off-hand.
> >>
> >> The only thing I've ever seen permission-wise is when there's a 
> directory
> >> within media/uploaded that doesn't have the proper write permissions 
> for the
> >> server.
> >>     
> >
> > Hm... Actually, after doing some more testing I think that permissions
> > aren't an issue as GIF files can be uploaded properly. I also can't
> > imaging why libpng should be loadable from the command line, but not
> > from the Apache process...
> >   
>
> Arise zombie thread, live again! ;-)
>
> OK, so it turns out after years of happily running with RB we've hit 
> this too. I KNOW this used to work (as my image testing when we first 
> deployed was with PNG files).
>
> Our problem appears to be identical to this, regular RB install (i.e. 
> easy_install based) which always seems to pull down PIL even though it 
> is already installed (we're running Ubuntu server and I always ensure 
> the debian PIL package is installed that has full image support). We 
> could only attach new GIF screen shots to reviews.
>
> Using PIL in a Python terminal always worked (i.e. open the supposedly 
> bad image via Image.open), but RB/Django would always fail with:
>
> ------ Cut here ------
>
>
>   Upload Screenshot
>
> One or more fields had errors
> Caption:                 
> Path:                 
>
>     * Upload a valid image. The file you uploaded was either not an
>       image or a corrupted image.
>
> ------ Cut here ------
>
> On a hunch I thought I'd have a look at what PIL instances are on the 
> file system (e.g. all the eggs that easy_install pulled down), after 
> upgrading a few times over the years we had 2.
>
>
> reviews:~$ find / -name \*PIL\* 2>/dev/null
> /usr/share/pyshared/PIL.pth
> /usr/share/pyshared/PIL
> /usr/share/pyshared/PIL/PIL-1.1.6.egg-info
> /usr/lib/python2.5/site-packages/PIL.pth
> /usr/lib/python2.5/site-packages/PIL-1.1.6-py2.5-linux-i686.egg
> /usr/lib/python2.5/site-packages/PIL-1.1.6-py2.5-linux-i686.egg/PIL
> /usr/lib/python2.5/site-packages/PIL
> /usr/lib/python2.5/site-packages/PIL/PIL-1.1.6.egg-info
> /usr/lib/python2.4/site-packages/PIL
>
>
> ... So I removed all the PIL eggs (remember I already have PIL installed):
>
>     sudo rm -rf 
> /usr/lib/python2.5/site-packages/PIL-1.1.6-py2.5-linux-i686.egg 
> /usr/lib/python2.5/site-packages/PIL/PIL-1.1.6.egg-info
>
> Followed by a reviewboard restart:
>
>     sudo /etc/init.d/apache2 restart
>
> And we can now attach PNGs and not just GIFs. So what out for 
> easy_install and PIL.
>
> I know pip purports to support removal (and would probably be a better 
> solution) so this is not a recommendation of resolution! I'm just 
> sharing what I found on my system, don't go deleting files if you don't 
> know the impact/dependencies!
>
> Chris
>
>

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Reply via email to