Cloud Function - error when I changed Python3.7 to Python 3.11

Hello

I have a Cloud Function that is running with python3.7, now I need to change to Python3.11. When I did this change my Cloud Function returns this follow error:

errorGroups[1]
insertId"6620fc57000ae4dc700d90a4"
labels{3}
logName"projects/p-data-integration/logs/cloudfunctions.googleapis.com%2Fcloud-functions"
receiveTimestamp"2024-04-18T10:56:23.811869064Z"
resource{2}
severity"ERROR"
textPayload"Traceback (most recent call last): File "/layers/google.python.pip/pip/lib/python3.11/site-packages/flask/app.py", line 2529, in wsgi_app response = self.full_dispatch_request()"
timestamp"2024-04-18T10:56:23.713948Z"
trace"projects/p-data-integration/traces/2e46eba30e7e40f449386e52d99c056c"
I believe that the error is because some package that I need to use. My requirement.txt as the following packages:
# Function dependencies, for example:
# package>=version
mysql.connector >= 2.2.9
google-cloud
#google-cloud-storage==2.8.0
google-cloud-storage
#google==3.0.0
google
google-api-python-client>=2.0
pandas
pandas_gbq
datetime
# time

Can you help me please?

 

2 1 101
1 REPLY 1

You have google-cloud in your requirements.txt file but the page for it says

WARNING: The google-cloud Python package is deprecated. On June 18, 2018, this package will no longer install any other packages. Please install the product-specific google-cloud-* packages needed for your application.

Same link also has a maximum python support of Python 3.6. It looks like you're saying you were using Python 3.7 and everything worked. It's possible that the difference between 3.6 & 3.7 wasn't significant enough to affect the running of the package but changes in Python 3.11 are significant enough.

 

......NoCommandLine ......
https://nocommandline.com
        Analytics & GUI for 
App Engine & Datastore Emulator