Skip to content

Fix: resolve gql dependency error by pinning version in mcp_rl (Fixes…#248

Open
CtrlAltDefeat21 wants to merge 1 commit into
patchy631:mainfrom
CtrlAltDefeat21:fix-mcp-rl-dependency
Open

Fix: resolve gql dependency error by pinning version in mcp_rl (Fixes…#248
CtrlAltDefeat21 wants to merge 1 commit into
patchy631:mainfrom
CtrlAltDefeat21:fix-mcp-rl-dependency

Conversation

@CtrlAltDefeat21

@CtrlAltDefeat21 CtrlAltDefeat21 commented Jun 29, 2026

Copy link
Copy Markdown

Description

This PR resolves the ImportError: cannot import name 'TransportConnectionFailed' that occurs when running the mcp_rl.ipynb notebook in Google Colab.

The issue stems from a dependency mismatch where weave expects TransportConnectionFailed to be exposed, but the environment pulls an incompatible beta version of gql (3.6.0b4).

Changes Made

  • Modified the initialization cell in mcp_rl.ipynb to explicitly pin gql>=4.0.0 using uv pip install before other dependencies are pulled.

Fixes #234

Summary by CodeRabbit

  • Chores
    • Updated the notebook’s setup step to install the required packages more reliably.
    • Added a version constraint for a dependency and kept installation output quieter.

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 544195b8-7985-4874-86a4-f398d1a6578f

📥 Commits

Reviewing files that changed from the base of the PR and between cfd74dc and 74665fd.

📒 Files selected for processing (1)
  • art_mcp_rl/mcp_rl.ipynb

📝 Walkthrough

Walkthrough

The notebook's dependency installation cell is updated to include gql>=4.0.0 alongside fastmcp in the uv pip install command, fixing an import error caused by an older gql version being resolved.

Changes

Notebook Dependency Fix

Layer / File(s) Summary
Add gql>=4.0.0 constraint
art_mcp_rl/mcp_rl.ipynb
Install cell adds gql>=4.0.0 alongside fastmcp to ensure a compatible version is used.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A rabbit hopped in, fixed the import with glee,
gql was old, version four sets it free,
No more TransportConnectionFailed despair,
Just fastmcp and gql floating through air,
🐇✨ dependency fixed, now runs without care!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: pinning gql in mcp_rl to fix the dependency error.
Linked Issues check ✅ Passed The notebook now installs gql>=4.0.0 to address the TransportConnectionFailed ImportError in Colab.
Out of Scope Changes check ✅ Passed The diff only changes the dependency install step and stays aligned with the gql fix.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Ruff (0.15.20)
art_mcp_rl/mcp_rl.ipynb

Unexpected end of JSON input


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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.

mcp_rl.ipynb file dependecy error in google colab

1 participant