Python SQLite3 fails on Github Actions but not on local

Viewed 275

I'm setting up CI using Github Actions and SQLite3 it's failing to insert on Github Actions but not on a local machine.

The line that fails is:

conn.execute("INSERT INTO sessions VALUES (?, ?, FALSE, NULL, ?)", [new_auth_token, device_id, expire_date])

This line is executed a few times in diferent tests succesfully, but then it fails in the rest of the tests (Always the same tests fail) with the next error.

sqlite3.OperationalError: no such column: FALSE

I'm using python3.8 and I've tried it on my computer with a fresh install of python and clone of the repository, but it never fails locally, only on GithuActions.

1 Answers

What fixed the problem for me is in my YAML workflow, replacing

runs-on: ubuntu-latest 

with

runs-on: ubuntu-20.04

ubuntu-latest uses Ubuntu 18.04 and the SQLite version seems to be old and have an issue.

Related