Skip to content

Camelot on GitHub Actions

To run Camelot on GitHub Actions, you need the following lines in your YAML steps:

- name: Install camelot and the specific version of PyPDF2 we need
  run: pip install PyPDF2==2.12.1 "camelot-py[cv]"

You can see the full file here.

Errors

Ghostscript errors

You shouldn't get these, especially if you're using runs-on: ubuntu-latest. But if you get an error about missing ghostscript you can install the dependencies mentioned in the Camelot docs like this:

- name: Install camelot dependencies
  run: sudo apt install ghostscript python3-tk -y 

E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)

Fixed by adding sudo to the apt install command. Again, you probably shouldn't need to install ghostscript!

PdfFileReader is deprecated and was removed in PyPDF2 3.0.0. Use PdfReader instead.

Fixed by asking for a specific version of PyPDF2. In our case, we're going to use 2.12.1.