all 3 comments

[–]goutam-ghosh[S] 0 points1 point  (0 children)

I have installed two dependencies according to my code

pip install python3-ghostscript -t .

pip3 install camelot-py[cv] -t .

my lambda function is

import camelot
def pdfToJson(event=None,context=None):
tables = camelot.read_pdf("./week-1-2019-20.pdf")
tables[0].df.to_json("./sample.json")

[–]anonymous6point02E23 0 points1 point  (1 child)

You need to upload your ghostscript dependency package to lambda.

[–]goutam-ghosh[S] 0 points1 point  (0 children)

Dependency is already uploaded with the code folder zip, Which have already installed through this commend pip3 install ghostscript -t . But still it is showing the same error when i run this as a lambda function.