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

Pillow and other corrected PIL forks support. #34

Closed
GoogleCodeExporter opened this issue Mar 25, 2015 · 11 comments
Closed

Pillow and other corrected PIL forks support. #34

GoogleCodeExporter opened this issue Mar 25, 2015 · 11 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. install Pillow instead of PIL, through pypi
2. do any operation involving pyfpdf
3. pyfpdf throws an exception saying that it can't find any package named 
"Image"

What is the expected output? What do you see instead?
The expected output is for the operation to go through an continue.

What version of the product are you using? On what operating system?
Latest copy from pypi. Ubuntu 11.10

Please provide any additional information below.
My understanding is that PIL doesn't directly support setup-tools or the like, 
even though it is on pypi. Your code supports the pypi version of PIL by just 
using "import Image", when it really should be "from PIL import Image" (which 
sadly does't with on the pypi version). The code, in turn, does not work with 
Pillow, and (though I haven't tested this yet) it won't work with manually 
installed or corrected versions of PIL.

The catch-all solution is to use one more try/except so that it tries importing 
PIL both ways. I have included a patch file with my changes.

Original issue reported on code.google.com by hardy.ke...@gmail.com on 7 Dec 2012 at 11:09

Attachments:

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

Here's the patch.

Original comment by hardy.ke...@gmail.com on 7 Dec 2012 at 11:18

  • Added labels: ****
  • Removed labels: ****

Attachments:

@GoogleCodeExporter
Copy link
Author

Thanks, do you want to commit yourself?
I've given you commit access.

Original comment by reingart@gmail.com on 8 Dec 2012 at 3:52

  • Changed state: Accepted
  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Issue 40 has been merged into this issue.

Original comment by reingart@gmail.com on 15 Jan 2013 at 3:43

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Indeed, issue 40 is the same problem and indicates the problem. The proposed 
patch will solve this.

Original comment by mjmare31...@gmail.com on 15 Jan 2013 at 5:51

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

ok, the patch is commited, could you test it? thanks

Original comment by reingart@gmail.com on 15 Jan 2013 at 11:09

  • Changed state: Started
  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Seems to work

Original comment by mjmare31...@gmail.com on 16 Jan 2013 at 9:06

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Thanks!

Original comment by reingart@gmail.com on 16 Jan 2013 at 2:57

  • Changed state: Fixed
  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Noob question: How can I add this patch to my FPDF already installed library? 
Should I just edit the /usr/bin/phyton2.6/site-packages/fpdf/fpdf.py? If so, 
after editing the file should I compile it again?

Thanks

Original comment by rcornej...@gmail.com on 23 Jul 2014 at 8:33

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Yes, you can change fpdf.py directly. Remember to delete any compiled/optimized 
file (.pyc / .pyo so it get compiled again).
If it is under usr bin , you would need to do this as an administrator (root, 
with sudo / su)

Original comment by reingart@gmail.com on 23 Jul 2014 at 8:55

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

thanks

Original comment by rcornej...@gmail.com on 24 Jul 2014 at 3:31

  • Added labels: ****
  • Removed labels: ****

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant