Re: [Django] #6054: PIL import error

2010-02-13 Thread Django
#6054: PIL import error
-+--
  Reporter:  nesh| Owner:  nobody
Status:  reopened| Milestone:
 Component:  Validators  |   Version:  SVN   
Resolution:  |  Keywords:  PIL   
 Stage:  Design decision needed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  1 
Needs_better_patch:  0   |  
-+--
Comment (by Keryn Knight):

 Confirming that, under OSX 10.5.8, using easy_install to install either
 1.16 or the more recent 1.1.7 release of PIL, django breaks in a couple of
 ways. Specifically, I've been unable to use syncdb if I have an ImageField
 present in any INSTALLED_APPS model. This is because, as others have
 stated, Django only looks for a PIL package from which it can import the
 Image module.

 This is obviously, in itself, not a Django problem, but a easy_install/PIL
 combination problem (its worth noting that using
 [http://pip.openplans.org/ pip] to install PIL results in a PIL package in
 site-packages), but it is somewhat of a show stopper for people who might
 be beginning development, as, to their awareness, they have installed PIL
 entirely correctly. Whether or not this is likely to affect production
 scenarios, I don't know, but I support the suggestions & attempts to patch
 the imports to look for Image ''et al'' in both locations outlined in the
 original ticket.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #6054: PIL import error

2010-01-07 Thread Django
#6054: PIL import error
-+--
  Reporter:  nesh| Owner:  nobody
Status:  reopened| Milestone:
 Component:  Validators  |   Version:  SVN   
Resolution:  |  Keywords:  PIL   
 Stage:  Design decision needed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  1 
Needs_better_patch:  0   |  
-+--
Changes (by hozn):

  * status:  closed => reopened
  * resolution:  invalid =>

Comment:

 (As other have noted) installing the latest (1.1.7) version of PIL using
 {{{easy_install}}} results in the {{{from PIL import Image}}} failing
 ({{{import Image}}} works).

 While I agree that this is probably a PIL packaging problem (or ambiguous
 documentation on their part), from the perspective of making Django "just
 work", it (Django) should really try both imports.  This is a trivial
 change and will make people who want to use setuptools to install Django
 and dependencies far less frustrated.  The current limitation means that
 you can't just create a setup.py for your project with deps on Django and
 PIL and expect it to actually work.  For me that's enough to prohibit use
 of ImageField.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.




Re: [Django] #6054: PIL import error

2009-10-30 Thread Django
#6054: PIL import error
-+--
  Reporter:  nesh| Owner:  nobody
Status:  closed  | Milestone:
 Component:  Validators  |   Version:  SVN   
Resolution:  invalid |  Keywords:  PIL   
 Stage:  Design decision needed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  1 
Needs_better_patch:  0   |  
-+--
Comment (by junkafarian):

 In the mean time, a quick fix which saves you screwing around with
 multiple core django files and will allow both recognised PIL import
 behaviours:

 {{{
 >>> import Image
 }}}
 and
 {{{
 >>> from PIL import Image
 }}}

 is to write a PIL.py file in the egg directory which imports the necessary
 PIL modules. For Django which requires "Image" and "!ImageFile" as pointed
 out by haloween the following command should suffice:

 {{{
 junkafarian:~ junkafarian$ echo "import Image, ImageFile" >> /path/to/env
 /site-packages/PIL-[version].egg/PIL.py
 }}}

 The major problem with this hack is that you will need to include all the
 modules you require for the project in the import statement (which may be
 more than just "Image" and "!ImageFile")

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #6054: PIL import error

2009-10-07 Thread Django
#6054: PIL import error
-+--
  Reporter:  nesh| Owner:  nobody
Status:  closed  | Milestone:
 Component:  Validators  |   Version:  SVN   
Resolution:  invalid |  Keywords:  PIL   
 Stage:  Design decision needed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  1 
Needs_better_patch:  0   |  
-+--
Comment (by rbanffy):

 Or, perhaps, the error message given on validate could warn about this
 issue until it's solved.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #6054: PIL import error

2009-10-07 Thread Django
#6054: PIL import error
-+--
  Reporter:  nesh| Owner:  nobody
Status:  closed  | Milestone:
 Component:  Validators  |   Version:  SVN   
Resolution:  invalid |  Keywords:  PIL   
 Stage:  Design decision needed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  1 
Needs_better_patch:  0   |  
-+--
Changes (by rbanffy):

  * keywords:  => PIL

Comment:

 The PIL docs are ambiguous. In the
 [http://www.pythonware.com/library/pil/handbook/introduction.htm
 tutorial], it uses "import Image". I would guess this is a bug in the
 tutorial, anyway, but I guess we should warn them.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #6054: PIL import error

2009-04-05 Thread Django
#6054: PIL import error
-+--
  Reporter:  nesh| Owner:  nobody
Status:  closed  | Milestone:
 Component:  Validators  |   Version:  SVN   
Resolution:  invalid |  Keywords:
 Stage:  Design decision needed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  1 
Needs_better_patch:  0   |  
-+--
Changes (by russellm):

  * status:  reopened => closed
  * resolution:  => invalid

Comment:

 `from PIL import Image` is a completely legal (and
 [http://www.pythonware.com/library/pil/handbook/image.htm documented]) way
 of importing PIL. If this doesn't work, then your version of PIL isn't
 installed correctly. If PIL isn't installed correctly, Django can't be
 expected to fix up the mess. The fix here is for you to fix your PIL
 install.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #6054: PIL import error

2009-04-04 Thread Django
#6054: PIL import error
-+--
  Reporter:  nesh| Owner:  nobody
Status:  reopened| Milestone:
 Component:  Validators  |   Version:  SVN   
Resolution:  |  Keywords:
 Stage:  Design decision needed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  1 
Needs_better_patch:  0   |  
-+--
Changes (by haloween):

  * status:  closed => reopened
  * resolution:  invalid =>
  * needs_tests:  0 => 1
  * stage:  Unreviewed => Design decision needed

Comment:

 >> This isn't a Django problem.

 In my opinion, this is a django issue. If there are two options of
 accessing a module both of them should be supported. [[BR]]
 On a shared host if the "non PIL" option is only one avaliable you can't
 do anything. The fix requires ONLY 3 places updated.

 core\files\image.py , core\management\validation.py , forms\fields.py

 {{{
  try: import Image
  except ImportError:
  from PIL import Image
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---