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
I have been working with Python Cloud Functions for Firebase for a few weeks now and we are having an issue when it comes to float params with FloatParam.
The first one is that params types (string, int, boolean, float ...) cannot be read outside of a function implementation (i.e functions annotated with @tasks_fn.on_task_dispatched or @https_fn.on_call for example)
Second one is, whenever I move the reading part inside of Callable/Queue function implementation, my env var value got wrapped into an array (only for float params), then I got the following error when the CF tries to start up in Cloud Run:
File "/layers/google.python.pip/pip/lib/python3.12/site-packages/firebase_functions/params.py", line 353, in value
return float(_os.environ[self.name])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: could not convert string to float: '["0.0"]'
NB: That "array wrapping" behaviour for floats is not happening locally with emulators.
The text was updated successfully, but these errors were encountered:
I have been working with Python Cloud Functions for Firebase for a few weeks now and we are having an issue when it comes to float params with
FloatParam
.Basic code to reproduce:
# .env MY_FLOAT=0.0
From that setup, I have 2 issues:
@tasks_fn.on_task_dispatched
or@https_fn.on_call
for example)The text was updated successfully, but these errors were encountered: