'import Image' instead of 'from PIL import Image'
Bug #930550 reported by
Mohammad Alhashash
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
LiveWallpaper |
Fix Released
|
Undecided
|
Unassigned | ||
Odoo Addons (MOVED TO GITHUB) |
Fix Released
|
Low
|
Unassigned | ||
QR Tools |
Fix Released
|
Undecided
|
Ramiro Algozino |
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\
*** IMPORTANT ***
python-imaging package depends on python-
However it will be dropped when "import Image" is fixed on Debian.
For more details, see: http://
*** How to fix ***
Please use the following code instead of 'import Image':
try:
from PIL import Image
except ImportError:
import Image
Related branches
lp:~vbkaisetsu/livewallpaper/fix-import-image
- Maximilian Schnarr: Pending requested
-
Diff: 17 lines (+6/-1)1 file modifiedplugins/photoslide/photoslide.py (+6/-1)
tags: | removed: of point sale |
description: | updated |
no longer affects: | livewallpaper |
summary: |
- 'import Image' instead of 'from PIL import Image' in point_of_sale.py + 'import Image' instead of 'from PIL import Image' |
description: | updated |
description: | updated |
Changed in livewallpaper: | |
status: | New → Fix Released |
Changed in qr-tools: | |
assignee: | nobody → Ramiro Algozino (algozino) |
milestone: | none → 1.4 |
Changed in qr-tools: | |
status: | New → Fix Released |
To post a comment you must log in.
Hello,
You're right, the pos module was breaking our convention of cleanly importing PIL.
Your patch was merged in trunk addons at revision 6554 (rev-id: <email address hidden>)
Thanks a lot for taking the time to report it and provide a patch for the issue at the same time!