xdevplatform / twitter-python-ads-sdk

A Twitter supported and maintained Ads API SDK for Python.
https://twitterdev.github.io/twitter-python-ads-sdk/
MIT License
189 stars 106 forks source link

TypeError: async_stats_job_result() takes 2 positional arguments but 3 were given #229

Closed mcoirad-gmmb closed 5 years ago

mcoirad-gmmb commented 5 years ago

When I run

job_status = LineItem.async_stats_job_result(account, job_id)

In the analytics.py example, I get:

TypeError: async_stats_job_result() takes 2 positional arguments but 3 were given

it seems the function does not accept both arguments. It works when you pass it only the account variable, though, but without the job I'm not sure whats being returned.

smaeda-ks commented 5 years ago

@mcoirad-gmmb Please pass your parameter as a Keyword argument.

- job_status = LineItem.async_stats_job_result(account, job_id)
+ job_status = LineItem.async_stats_job_result(account, job_ids=job_id)
mcoirad-gmmb commented 5 years ago

Thank you! I made a PR for the example.

smaeda-ks commented 5 years ago

@mcoirad-gmmb Right, we need to update the example. Feel free to open a new PR so we can merge it. Thanks