Skip to content

Fix Colab notebook import typo and missing await - #172

Open
Omarinho12345 wants to merge 1 commit into
tinyfish-io:mainfrom
Omarinho12345:fix/161-colab-notebook-typos
Open

Omarinho12345 wants to merge 1 commit into
tinyfish-io:mainfrom
Omarinho12345:fix/161-colab-notebook-typos

Conversation

@Omarinho12345

Copy link
Copy Markdown

Fixes #161.

The Colab notebook imported user_data but used userdata, so Cell 6 failed. I changed the import to userdata.

Cell 8 passed browser.new_page() without await, so I added the missing await.

I checked the notebook JSON is valid and both code cells compile.

@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f04bfe72-d64d-4171-8a09-2d9fe7d72bde
📥 Commits

Reviewing files that changed from the base of the PR and between d1ef95b and d987ece.

📒 Files selected for processing (1)
  • examples/python/run_script_online_in_google_colab/main.ipynb

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The Colab notebook now imports userdata and uses it to retrieve AGENTQL_API_KEY. It also awaits browser.new_page() before passing the page to agentql.wrap_async.

Priority: ➖ Normal

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to d987e

The notebook now uses the Colab secret lookup and awaits page creation before wrapping the page. No actionable merge risk remains, assuming the API key is configured in Colab.

Architecture Summary

Architecture risk: 🔵 Low · up to d987e

The change affects 1 system.

Changed systems: examples

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — examples (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in examples/python/run_script_online_in_google_colab/main.ipynb: The notebook replaces the user_data import with userdata and formats the AGENTQL_API_KEY environment assignment; the retrieval call uses userdata.get.
  • observed — Modified behavior in examples/python/run_script_online_in_google_colab/main.ipynb: The browser setup now awaits browser.new_page() before passing the resulting page to agentql.wrap_async, replacing the call that passed the unawaited coroutine.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies both notebook fixes: the Colab import typo and the missing await.
Description check ✅ Passed The description directly explains the two notebook errors, the applied fixes, and the reported validation steps.
Linked Issues check ✅ Passed The PR changes the notebook named in issue #161. Cell 6 imports google.colab.userdata and uses userdata.get('AGENTQL_API_KEY'). Cell 8 awaits browser.new_page() before passing the page to `agent…
Out of Scope Changes check ✅ Passed The PR changes only examples/python/run_script_online_in_google_colab/main.ipynb. The changes correct the two errors requested by issue #161 and adjust assignment spacing. No unrelated implementatio…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

resolve userdata ImportError, NameError, and unawaited new_page in Colab notebook

1 participant