You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
functions-framework breaks import paths for the google-cloud-functions SDK package #184
functions-framework is incompatible with the google-cloud-functions SDK package, unless google-cloud-functions is installed with a separate install command AFTER functions-framework is installed.
As I understand it, this is not possible to do within the context of Google Cloud Functions, where packages get installed automatically from the requirements.txt file.
The reason is that functions-framework overwrites several important files in google/cloud/functions_v1, google/cloud/functions, and google/cloud/functions_v1beta2 that are required to make the google-cloud-functions SDK package work as intended.
For example: functions-framework overwrites google/cloud/functions_v1/__init__.py upon install, which breaks the ability to import packages in the normal, documented ways.
changed the title [-]functions-framework breaks the google-cloud-functions SDK package[/-][+]functions-framework breaks import paths for the google-cloud-functions SDK package[/+]on Apr 29, 2022
Activity
jyork03 commentedon Apr 29, 2022
For anyone that might be stuck on this in the meantime, you can import the client and functions directly:
[-]functions-framework breaks the google-cloud-functions SDK package[/-][+]functions-framework breaks import paths for the google-cloud-functions SDK package[/+]grant commentedon Jun 24, 2022
Overwritten: https://github.com/GoogleCloudPlatform/functions-framework-python/blob/master/src/google/cloud/functions_v1/__init__.py
0x0elliot commentedon Mar 21, 2024
Here is how i quickly fixed this problem for myself (with no hassle), for anyone who finds this bug in the wild: