Skip to content

Commit 0cb9b02

Browse files
authored
Merge pull request #24 from googlemaps-samples/fix/strip-secrets-whitespace
fix(notebooks): strip whitespace from secret inputs
2 parents e637076 + 5e2442e commit 0cb9b02

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

places_insights/notebooks/custom_location_scores/places_insights_custom_location_scores.ipynb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@
150150
"\n",
151151
"# 1. Retrieve Secrets\n",
152152
"try:\n",
153-
" GCP_PROJECT_ID = userdata.get('GCP_PROJECT_ID')\n",
154-
" GMP_API_KEY = userdata.get('GMP_API_KEY')\n",
153+
" GCP_PROJECT_ID = userdata.get('GCP_PROJECT_ID').strip()\n",
154+
" GMP_API_KEY = userdata.get('GMP_API_KEY').strip()\n",
155155
" print(f\"✅ Secrets retrieved for project: {GCP_PROJECT_ID}\")\n",
156156
"except userdata.SecretNotFoundError as e:\n",
157157
" raise ValueError(\"Missing Secrets! Please add 'GCP_PROJECT' and 'GMP_API_KEY' to Colab Secrets.\") from e\n",
@@ -474,7 +474,6 @@
474474
")\n",
475475
"\n",
476476
"# 3. Create Custom Legend HTML\n",
477-
"# Positioned at Bottom-Right to avoid the Google Logo at Bottom-Left.\n",
478477
"legend_html = '''\n",
479478
" <div style=\"position: fixed; bottom: 50px; right: 50px; width: 180px; height: 110px;\n",
480479
" border:2px solid grey; z-index:9999; font-size:14px; background-color:white; opacity:0.9; padding: 10px; font-family: sans-serif;\">\n",

0 commit comments

Comments
 (0)