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

Creating PDF Report #134

Open
vivoviv opened this issue Nov 9, 2021 · 0 comments
Open

Creating PDF Report #134

vivoviv opened this issue Nov 9, 2021 · 0 comments

Comments

@vivoviv
Copy link

vivoviv commented Nov 9, 2021

:: Creating PDF Report
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/PIL/ImageFile.py", line 496, in _save
fh = fp.fileno()
io.UnsupportedOperation: fileno

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/PIL/Image.py", line 430, in _getencoder
encoder = getattr(core, encoder_name + "_encoder")
AttributeError: module 'PIL._imaging' has no attribute 'jpeg2k_encoder'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/weasyprint/document.py", line 256, in _save_jpeg2000
pillow_image.save(image_file, format='JPEG2000', optimize=optimize)
File "/usr/lib/python3/dist-packages/PIL/Image.py", line 2102, in save
save_handler(self, fp, filename)
File "/usr/lib/python3/dist-packages/PIL/Jpeg2KImagePlugin.py", line 290, in _save
ImageFile._save(im, fp, [("jpeg2k", (0, 0) + im.size, 0, kind)])
File "/usr/lib/python3/dist-packages/PIL/ImageFile.py", line 501, in _save
e = Image._getencoder(im.mode, e, a, im.encoderconfig)
File "/usr/lib/python3/dist-packages/PIL/Image.py", line 433, in _getencoder
raise OSError("encoder %s not available" % encoder_name)
OSError: encoder jpeg2k not available

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/PIL/ImageFile.py", line 496, in _save
fh = fp.fileno()
io.UnsupportedOperation: fileno

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/PIL/Image.py", line 430, in _getencoder
encoder = getattr(core, encoder_name + "_encoder")
AttributeError: module 'PIL._imaging' has no attribute 'jpeg2k_encoder'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "eagle-eye.py", line 229, in
main(skipFB=args.skipfb, FBUrls=[], jsonRep=jsonRepFile, dockerMode=aDocker, dockerName=aName)
File "eagle-eye.py", line 175, in main
makeReport(name, rev_links, predictions, validatedInstaNames)
File "/home/python/git/EagleEye/report/report.py", line 37, in makeReport
doc.write_pdf('{0}_Report.pdf'.format(name))
File "/usr/local/lib/python3.8/dist-packages/weasyprint/init.py", line 180, in write_pdf
self.render(
File "/usr/local/lib/python3.8/dist-packages/weasyprint/document.py", line 1157, in write_pdf
page.paint(stream, scale=scale)
File "/usr/local/lib/python3.8/dist-packages/weasyprint/document.py", line 767, in paint
draw_page(self._page_box, stream)
File "/usr/local/lib/python3.8/dist-packages/weasyprint/draw.py", line 69, in draw_page
draw_stacking_context(stream, stacking_context)
File "/usr/local/lib/python3.8/dist-packages/weasyprint/draw.py", line 182, in draw_stacking_context
draw_stacking_context(stream, child_context)
File "/usr/local/lib/python3.8/dist-packages/weasyprint/draw.py", line 159, in draw_stacking_context
draw_box_background_and_border(
File "/usr/local/lib/python3.8/dist-packages/weasyprint/draw.py", line 73, in draw_box_background_and_border
draw_background(stream, box.background)
File "/usr/local/lib/python3.8/dist-packages/weasyprint/draw.py", line 341, in draw_background
draw_background_image(stream, layer, bg.image_rendering)
File "/usr/local/lib/python3.8/dist-packages/weasyprint/draw.py", line 423, in draw_background_image
layer.image.draw(group, image_width, image_height, image_rendering)
File "/usr/local/lib/python3.8/dist-packages/weasyprint/images.py", line 56, in draw
image_name = stream.add_image(
File "/usr/local/lib/python3.8/dist-packages/weasyprint/document.py", line 320, in add_image
image_file = self._save_jpeg2000(pillow_image, optimize)
File "/usr/local/lib/python3.8/dist-packages/weasyprint/document.py", line 261, in _save_jpeg2000
pillow_image.save(
File "/usr/lib/python3/dist-packages/PIL/Image.py", line 2102, in save
save_handler(self, fp, filename)
File "/usr/lib/python3/dist-packages/PIL/Jpeg2KImagePlugin.py", line 290, in _save
ImageFile._save(im, fp, [("jpeg2k", (0, 0) + im.size, 0, kind)])
File "/usr/lib/python3/dist-packages/PIL/ImageFile.py", line 501, in _save
e = Image._getencoder(im.mode, e, a, im.encoderconfig)
File "/usr/lib/python3/dist-packages/PIL/Image.py", line 433, in _getencoder
raise OSError("encoder %s not available" % encoder_name)
OSError: encoder jpeg2k not available

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

No branches or pull requests

1 participant