BUG - Cannot Update Ad with Custom Pinterest SDK Client
まだ誰も着手していません。
評価
調査の方向性
Search for the Ad.update_fields entry point shown in the issue and trace its call to self._update. Reproduce an update using a custom Pinterest SDK Client, then verify that the client is not passed into AdUpdateRequest and that the update completes without authentication or type errors.
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
When using a custom Pinterest SDK Client, I am unable to make updates to an ad, ad group, or campaign
To Reproduce
Currently, I am using a custom Pinterest SDK Client to authenticate, meaning the default client is unauthenticated. The client is initialized successfully, and I am able to fetch an ad successfully using ad = Ad(account_id, ad_id, client=self.client). However, once I run ad.update_fields(status=new_status) this operation fails saying I am not authenticated.
I then attempted to use ad.update_fields(status=new_status, client=self.client), however this results in a type error. After doing some digging, this error seems to originate from this code block
def update_fields(self, **kwargs) -> bool:
"""
Update Ad fields suing any arguments
Returns:
bool: If Ad fields were updated successfully
"""
if "creative_type" in kwargs:
kwargs["creative_type"] = CreativeType(kwargs["creative_type"])
if "status" in kwargs:
kwargs["status"] = EntityStatus(kwargs["status"])
return self._update(
params={
"ad_account_id": self._ad_account_id,
"ad_update_request": [
AdUpdateRequest(
id=self._id,
**kwargs
)
]
},
api=AdsApi,
update_fn=AdsApi.ads_update,
**kwargs
)
as passing a client object in here causes it to be passed into both AdUpdateRequest and self._update due to the use of **kwargs. After cloning the repo and making a change to include client=None in the update_fields function definition and client=client in the self._update function parameters, the function works as expected.
Expected behavior
I should be able to update ad status with a custom Pinterest SDK Client
Screenshots
Additional Details (please complete the following information):
- OS and Version: MacOS Sequoia Version 15.4.1
- SDK Version: 0.2.4
- 主要言語
- Python
- スター
- 85
- フォーク
- 40
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pinterest/pinterest-python-sdk のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
-
enhancement
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
-
BUG - <AdGroup for Retargeting Campaign Throws Value Error on init>再び着手できるかも @dfana01 が 567 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug
pinterest/pinterest-python-sdk#144 · 担当者 1 名 ·
-
AttributeError: 'BoardSection' object has no attribute '_generated_api_get_fn_args'再び着手できるかも @dfana01 が 567 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug
pinterest/pinterest-python-sdk#130 · 担当者 1 名 ·
-
BUG - SDK Client pin creation fails but endpoint is working再び着手できるかも @dfana01 が 567 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug
pinterest/pinterest-python-sdk#128 · コメント 1 件 · 担当者 1 名 ·
pinterest/pinterest-python-sdk の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
SR_SECURITY_DESCRIPTOR.fromString drops the SACL when no DACL is present対応中かも @paul7436 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
equinor/fmu-sumo-uploader#302 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
modelscope/evalscope#1821 ·
メンテナーはふだん 1 日以内に返信
-
Sanity on ansible-core devel fails: ignore-2.23.txt references the removed import-3.9 test対応中かも @yurnov が今日担当しました。 オープンneeds_triage
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
ansible-collections/kubernetes.core#1275 ·
メンテナーはふだん 1 日以内に返信