Re: Find the original asset when getting error: CANNOT_MODIFY_ASSET_NAME when uploading duplicate image

2022-02-15 Thread Luciano Santana
Has anyone tried upgrading the API to version 10? We are currently using 
the legacy Adwords API and we cannot do the upgrade at the moment.

On Friday, February 11, 2022 at 11:32:50 PM UTC+1 adsapi wrote:

> Hi Luciano,
>
> Right now, parsing the error message is the way to handle this error. I'll 
> work with the team to try and introduce a better way to expose this error.
>  
>
> Cheers
> Anash
>
>
> ref:_00D1U1174p._5004Q2Hyur3:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/0a995874-5c25-4526-aebc-59cf17d19654n%40googlegroups.com.


Re: Find the original asset when getting error: CANNOT_MODIFY_ASSET_NAME when uploading duplicate image

2022-02-15 Thread Luciano Santana
Someone wrote me in private asking which API version we were using. And 
that's a very good point.

For this specific action, we're actually still using the legacy Google 
AdWords API (v201809). So, if you don’t have the asset ID information in 
the error message, you can’t use the same workaround as us.

Just to share a detail I’ve noticed, I see that in the Google Ads API v.10 
release from Feb 9th a change was introduced as you can read on the latest 
release note of Google Ads API 
.

*"if an asset with a different name having the same content already exists 
then the asset uploaded will be silently dropped."*

What we’re experiencing is that the asset is dropped with an error, not 
silently. In my point of view, silently dropping would mean returning the 
previously existing asset as response. Maybe this is working properly if 
you specify API version 10. I suppose that the change was 
accidentally/incorrectly released also for previous API versions, 
preventing the upload of duplicated assets but not “silently handling” for 
clients with API < 10.

If anyone out there could easily test this hypothesis by doing the API 
upgrade, and confirming if this solves the issue or not, that would be 
helpful to pinpoint the cause of the issue for the Google team and maybe 
find a quick solution for the community.

On Friday, February 11, 2022 at 11:32:50 PM UTC+1 adsapi wrote:

> Hi Luciano,
>
> Right now, parsing the error message is the way to handle this error. I'll 
> work with the team to try and introduce a better way to expose this error.
>  
>
> Cheers
> Anash
>
>
> ref:_00D1U1174p._5004Q2Hyur3:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/96172fcf-2f4a-433e-b18b-acc1485783a8n%40googlegroups.com.


Re: Find the original asset when getting error: CANNOT_MODIFY_ASSET_NAME when uploading duplicate image

2022-02-15 Thread Luciano Santana
For some reason, my last message was deleted. I'm pasting the core 
information of the message again below. 

Just to share a detail I’ve noticed, I see that in the Google Ads API v.10 
release from Feb 9th a change was introduced as you can read on the latest 
release note of Google Ads API 
.

*if an asset with a different name having the same content already exists 
then the asset uploaded will be silently dropped.*

What we’re experiencing is that the asset is dropped with an error, not 
silently. In my point of view, silently dropping would mean returning the 
previously existing asset as response.
Maybe this is working properly if you specify API version 10. I suppose 
that the change was accidentally/incorrectly released also for previous API 
versions, preventing the upload of duplicated assets but not “silently 
handling” for clients with API < 10.

If anyone out there could easily test this hypothesis by doing the API 
upgrade, that would be helpful to pinpoint the cause of the issue and maybe 
find a solution.

On Friday, February 11, 2022 at 11:32:50 PM UTC+1 adsapi wrote:

> Hi Luciano,
>
> Right now, parsing the error message is the way to handle this error. I'll 
> work with the team to try and introduce a better way to expose this error.
>  
>
> Cheers
> Anash
>
>
> ref:_00D1U1174p._5004Q2Hyur3:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/561dd696-dcc9-4427-b8f0-eaff63ecb0c2n%40googlegroups.com.


Re: Find the original asset when getting error: CANNOT_MODIFY_ASSET_NAME when uploading duplicate image

2022-02-11 Thread Luciano Santana
Hi everyone,

In our case, we actually get an asset ID on the error message, as you can 
see below. I've redacted the original values with  to prevent 
sharing sensitive information.

*[AssetError{super=AssetError.CANNOT_MODIFY_ASSET_NAME @ 
operations[0].operand.assetName; trigger:'There is an existing asset that 
represents the same content as the asset to be added, but with a different 
name: the input asset has name ''; and the existing asset has name 
'****' and ID . Remove the existing asset first if you 
would like to change the name of the asset.', 
reason=CANNOT_MODIFY_ASSET_NAME}]*

Our solution was to parse the error message string in order to capture the 
existing asset ID and use that ID to post the ads. It is not ideal, because 
if tomorrow they change the error message it will make our parser useless. 
But it is an acceptable workaround until someone from Google provides a 
proper alternative. This is also more viable than "manually" generating 
changes on the assets, like cropping, as suggested earlier.

I hope that is helpful. 

Question to Google Ads team, is it intentional to delegate this handling to 
the client? In case yes, I propose at least to provide the existing Asset 
data in a more structured way, together with the Error object. 
Alternatively, why not simple returning the existing Asset instead of 
throwing an error on our way? 

On Friday, February 11, 2022 at 12:27:39 PM UTC+1 google@innogames.com 
wrote:

> Hi all, 
>
> we have this issue as well since 2 days.
> We're using SDK v.16.0.2 which uses API v.9
> It stops us from uploading any image which has ever been uploaded to our 
> accounts before because of the clashing asset names.
> It would be great if you could take care. 
>
> Thanks and best regards
>
> On Friday, 11 February 2022 at 00:56:45 UTC+1 timo...@gmail.com wrote:
>
>> Yeah modifying image by changing pixel color or cropping kinda works as 
>> ugly hack but google should fix this.
>> No way this is acceptable, what's worst we have more than 100K assets and 
>> we dont know which asset is what,
>> so ability to find an asset and replace it, makes sense however current 
>> release does not address this issue.
>>
>> Thanks
>> Tim
>>
>>
>> On Friday, February 11, 2022 at 3:34:07 AM UTC+13 ed...@gsmediagroup.net 
>> wrote:
>>
>>>
>>> Hi everyone. I have some strange and quick solution for this problem. I 
>>> CROP(cut) every uploaded image with some random width and height. And only 
>>> after that i upload that CROPED image as asset, and that image seems like 
>>> new unique image.
>>> Ex. in PYTHON
>>>
>>> # For 1.91:1 ratio
>>> ratio = 191/100
>>>
>>> # Width and height of image to crop
>>> width = random.randint(600, 1024)
>>> height = round(width / ratio)
>>>
>>> # Width and height for square images
>>> squareDim = random.randint(300, height)
>>>
>>> After crop the image I was create asset with that image and set name of 
>>> Asset some unqiue name str(uuid.uuid4()).
>>>
>>> Thanks!
>>> On Thursday, February 10, 2022 at 4:10:37 PM UTC+4 
>>> m.m...@doveconviene.com wrote:
>>>

 Hello, we have the same problem starting this morning. We have not 
 changed anything on our code. What is the correct procedure for uploading 
 an asset? We have all campaigns stopped for this reason.

 Thanks
 Il giorno giovedì 10 febbraio 2022 alle 10:22:54 UTC+1 
 timo...@gmail.com ha scritto:

> Hi Mark,
>
> I understand but this has immediate impact on our ability to run 
> campaigns, we are losing revenue, and can't find work around for this 
> issue.
> Main issue is that we have uploaded a lot of images and now we can't 
> even tell which are in conflict, and that makes it a big issue.
> So any work around in meantime would be much welcomed.
>
> Thanks
>
> On Thursday, February 10, 2022 at 8:47:46 PM UTC+13 adsapi wrote:
>
>> Hello Everyone,
>>
>> Thanks for the following up on this thread.
>>
>> Currently, a feature request has been raised for this; however, 
>> please note that there is no guarantee if this will be supported in the 
>> API 
>> soon. That said, please continue to follow our blog 
>>  for 
>> updates.
>>
>> Regards,
>> [image: Google Logo] 
>> Mark Kevin 
>> Google Ads API Team 
>>   
>>
>> ref:_00D1U1174p._5004Q2Hyur3:ref
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this