jkehler / awslambda-psycopg2

1.12k stars 363 forks source link

psycopg2 PyUnicodeUCS4_DecodeUTF8 ERROR #62

Closed eugypalu closed 2 years ago

eugypalu commented 4 years ago

I've lambda function with python 3.6 When I deploy it, I get this error: "errorMessage": "Unable to import module 'lambda_function': /var/task/psycopg2/_psycopg.so: undefined symbol: PyUnicodeUCS4_DecodeUTF8"

python 3.6 psycopg2 for python 3.6 (renamed as psycopg2)

dreams-and-thoughts commented 4 years ago

I had the same error when using Lambda runtime Python 3.8 (Latest) with the 3.7 psycopg2 package. Changing Lambda runtime down to 3.7 fixed the issue.

paulhtremblay commented 3 years ago

I am getting this error, even when downgrading my lambda Python version.

vvaezian commented 3 years ago

I was using Python 3.8 in Lambda. I renamed the psycopg2-3.8 folder from this repository to psycopg2 and used it in my zip file (to upload to Lambda), and this fixed my issue.