Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on May 11, 2026. It is now read-only.

fix: correct method name in get_events (closes AttributeError)#224

Open
Sertug17 wants to merge 1 commit into
Polymarket:main from
Sertug17:fix/get-events-parse-method-name
Open

fix: correct method name in get_events (closes AttributeError) #224
Sertug17 wants to merge 1 commit into
Polymarket:main from
Sertug17:fix/get-events-parse-method-name

Conversation

@Sertug17

@Sertug17 Sertug17 commented Apr 14, 2026
edited by cursor Bot
Loading

Copy link
Copy Markdown

Problem

get_events() calls self.parse_event() on line 115, but this method
does not exist on GammaMarketClient. The correct method name is
self.parse_pydantic_event().

This causes a runtime AttributeError whenever get_events() is called
with parse_pydantic=True.

Fix

Replace self.parse_event(market_event_obj) with
self.parse_pydantic_event(market_event_obj) on line 115.

Reproduction

gamma = GammaMarketClient()
gamma.get_events(parse_pydantic=True) # AttributeError: 'GammaMarketClient' object has no attribute 'parse_event'

Note

Low Risk
Low risk one-line bugfix that only changes which method is invoked when parse_pydantic=True, preventing a runtime AttributeError. Behavior remains the same aside from correctly returning parsed PolymarketEvent objects instead of crashing.

Overview
Fixes GammaMarketClient.get_events(parse_pydantic=True) by calling parse_pydantic_event() instead of a non-existent parse_event() method, eliminating a runtime AttributeError and restoring pydantic parsing for /events responses.

Reviewed by Cursor Bugbot for commit 0ee83b1. Bugbot is set up for automated code reviews on this repo. Configure here.

get_events called self.parse_event() which does not exist on
GammaMarketClient. The correct method is self.parse_pydantic_event().
This caused a runtime AttributeError when parse_pydantic=True.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to Polymarket Agents. Thank you for creating your first PR. Cheers!

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

Reviewers

1 more reviewer

@github-actions github-actions[bot] github-actions[bot] left review comments

Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /