jkehler / awslambda-psycopg2

1.12k stars 363 forks source link

PSYCOPG2 FOR 3.9 #71

Open abhimike17 opened 2 years ago

abhimike17 commented 2 years ago

Hi, I'm not able to use psycopg2 for 3.9. I get the ""Unable to import module 'lambda_function': No module named 'psycopg2'","

Please let me know if anyone has tested it

Thanks

TravisHoover commented 2 years ago

Have you tried copying the psycopg2-3.9 directory into your AWS Lambda project and rename it to psycopg2? I was getting this error when I upgraded to python3.9 and didn't update my psycopg2 directory.

ktalkington commented 1 year ago

renaming the directory to psycopg2 moved me forward but I am getting "module 'psycopg2' has no attribute 'connect'"

ktalkington commented 1 year ago

Well... it helps when zipping the "psycopg2" directory to use recursion to actually get files... head desk

aakashdusane commented 1 year ago

Well... it helps when zipping the "psycopg2" directory to use recursion to actually get files... head desk

what solution ended up working for you?

ktalkington commented 1 year ago

@aakashdusane Following the suggestion @TravisHoover offered (copy psycopg2-3.9 from repo, and renaming to psycopg2) and zipping the folder properly was the solution that worked for me