openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #23262
[Bug 930550] Re: 'import Image' instead of 'from PIL import Image'
** Description changed:
While 'import Image' works with the standard PIL installation, it is not
supported and not compatible Pillow, the friendly PIL fork.
PIL is imported correctly in all other places:
- find -name "*.py" -print0 |xargs -0 grep 'import Image'
+ find -name "*.py" -print0 |xargs -0 grep -e '\bimport\b.*\bImage\b'
*** IMPORTANT ***
python-imaging package depends on python-imaging-compat which provides "import Image".
However it will be dropped when "import Image" is fixed on Debian.
For details: http://lists.debian.org/debian-python/2013/02/msg00017.html
** Description changed:
While 'import Image' works with the standard PIL installation, it is not
supported and not compatible Pillow, the friendly PIL fork.
PIL is imported correctly in all other places:
find -name "*.py" -print0 |xargs -0 grep -e '\bimport\b.*\bImage\b'
*** IMPORTANT ***
python-imaging package depends on python-imaging-compat which provides "import Image".
However it will be dropped when "import Image" is fixed on Debian.
- For details: http://lists.debian.org/debian-python/2013/02/msg00017.html
+ For more details, see: http://lists.debian.org/debian-python/2013/02/msg00017.html
+
+ *** How to fix ***
+ Please use the following code instead of 'import Image':
+
+ try:
+ from PIL import Image
+ except ImportError:
+ import Image
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/930550
Title:
'import Image' instead of 'from PIL import Image'
Status in LiveWallpaper:
New
Status in OpenERP Addons (modules):
Fix Released
Status in QR Tools:
New
Bug description:
While 'import Image' works with the standard PIL installation, it is
not supported and not compatible Pillow, the friendly PIL fork.
PIL is imported correctly in all other places:
find -name "*.py" -print0 |xargs -0 grep -e '\bimport\b.*\bImage\b'
*** IMPORTANT ***
python-imaging package depends on python-imaging-compat which provides "import Image".
However it will be dropped when "import Image" is fixed on Debian.
For more details, see: http://lists.debian.org/debian-python/2013/02/msg00017.html
*** How to fix ***
Please use the following code instead of 'import Image':
try:
from PIL import Image
except ImportError:
import Image
To manage notifications about this bug go to:
https://bugs.launchpad.net/livewallpaper/+bug/930550/+subscriptions
References