You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I receive this error:
EventsEndpoint.search() takes 1 positional argument but 2 were given
When running the "Calling the PredictHQ API and Fetching Events" cell, any help?
The text was updated successfully, but these errors were encountered:
@MattNot In the cell where you call the events API for the first time, you'll need to make two changes:
you'll need to use **parameters in the function call to pass the unpacked dictionary to the function
update event.to_dict() to event.model_dump()
The full cell should look like this:
results= []
# Iterating through all the events that match our criteria and adding them to our resultsforeventinphq.events.search(**parameters).iter_all():
results.append(event.model_dump())
# Converting the results to a DataFrameevent_df=pd.DataFrame(results)
These were updates that we rolled out with our most recent update of the SDK. I'll make a PR with these updates! Thanks for raising this with us and feel free to reach out if you're still running into any issues! 😄
Following the https://github.com/predicthq/phq-data-science-docs/blob/master/attended-events/part_1_data_engineering.ipynb
I receive this error:
EventsEndpoint.search() takes 1 positional argument but 2 were given
When running the "Calling the PredictHQ API and Fetching Events" cell, any help?
The text was updated successfully, but these errors were encountered: