File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 2121
2222import httpx
2323
24+ from replicate ._utils ._logs import logger
2425from replicate .lib ._files import FileEncodingStrategy
2526from replicate .lib ._predictions_run import Model , Version , ModelVersionIdentifier
2627from replicate .types .prediction_create_params import PredictionCreateParamsWithoutVersion
@@ -103,8 +104,8 @@ def _get_api_token_from_environment() -> str | None:
103104 if str (key ).upper () == "REPLICATE_API_TOKEN" :
104105 return str (value ) if value is not None else value
105106
106- except Exception : # Catch all exceptions to ensure robust fallback
107- pass
107+ except Exception as e : # Catch all exceptions to ensure robust fallback
108+ logger . debug ( "Failed to retrieve API token from cog.current_scope(): %s" , e )
108109
109110 return os .environ .get ("REPLICATE_API_TOKEN" )
110111
You can’t perform that action at this time.
0 commit comments