googleads/googleads-python-lib

Performing actions fails in v201502 and above

Closed this issue · 6 comments

for anyone following along on this, the core issue / resolution has been accepted into the lib: https://bitbucket.org/jurko/suds/issues/81/suds-should-support-an-empty-object now awaiting a follow-up release to 0.7.

Hi all,

I was struggling with this during the past few hours and came up with a workaround that ended up being more convenient for me than manually downloading and installing the updated source (specifically, my code is running on AWS Lambda which makes it more difficult for me to apply changes to my runtime environment).

In case that helps someone :)
Would still love to see the change packaged and released (posted the same comment on the suds repository on BitBucket).

import suds.mx.appender


def _suds_mx_object_appender_append_workaround(self, parent, content):
    object = content.value
    child = self.node(content)
    parent.append(child)
    for item in object:
        cont = suds.mx.Content(tag=item[0], value=item[1])
        suds.mx.appender.Appender.append(self, child, cont)


suds.mx.appender.ObjectAppender.append = _suds_mx_object_appender_append_workaround

I know this issue is very old but I am getting the same error performing a lineitem action to archive. Is this issue resolved in v201705?

Yes, this has been resolved for some time via a patch to the suds-jurko library. That said, if you are using a different version/fork of suds or have made your own modifications, the patch may not be effective.

Thanks for your comment msaniscalchi
We are running suds-jurko (0.6) version installed via pip.
Can you point me to the correct way to update/upgrade my suds-jurko library? or get the patch? Here is what I tried already.

sudo pip install update suds-jurko

and the response:

The directory '/home/sonobi/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/sonobi/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting update
/usr/local/lib/python2.7/dist-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
SNIMissingWarning
/usr/local/lib/python2.7/dist-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Requirement already satisfied (use --upgrade to upgrade): suds-jurko in /usr/local/lib/python2.7/dist-packages
Installing collected packages: update
Successfully installed update-0.4.4

I am still getting the same error trying to archive lineitems. Any help you can give would be most appreciative!
Mark

Hi Mark,

You're not successfully updating suds-jurko. The correct command is:

sudo pip install --upgrade suds-jurko

Notice that is says "Requirement already satisfied (use --upgrade to upgrade): suds-jurko"
And then "Successfully installed update-0.4.4"

Your command, sudo pip install update suds-jurko, is telling pip into install the packages "update" and "suds-jurko" :).

Best,
Gabe