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
Hello. I'm trying to get account data but getting an error:
This is an example of the code I am using:
from googleads import oauth2
path_to_file='XXXXXXX'
application_name = "AAAAAAAA"
# Initialize the GoogleRefreshTokenClient using the credentials you received
# in the earlier steps.
oauth2_client = oauth2.GoogleServiceAccountClient(
key_file, oauth2.GetAPIScope('adwords'))
# Initialize the Ad Manager client.
client = adwords.AdWordsClient(oauth2_client, application_name)
selector = {
'fields': ['CustomerId', 'CanManageClients']
}
# get accounts
accounts = client.GetService('ManagedCustomerService').get(selector)
Full error:
Traceback (most recent call last):
File "module-folder/integrations/google_adwords.py", line 48, in
convert_lead()
File "module-folder/integrations/google_adwords.py", line 45, in convert_lead
accounts = service.get(selector)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/site-packages/googleads/common.py", line 994, in MakeSoapRequest
*packed_args, _soapheaders=soap_headers)['body']['rval']
File "/home/user/.virtualenvs/project-folder/lib/python3.7/site-packages/zeep/proxy.py", line 45, in call
kwargs,
File "/home/user/.virtualenvs/project-folder/lib/python3.7/site-packages/zeep/wsdl/bindings/soap.py", line 119, in send
operation, args, kwargs, client=client, options=options
File "/home/user/.virtualenvs/project-folder/lib/python3.7/site-packages/zeep/wsdl/bindings/soap.py", line 68, in _create
serialized = operation_obj.create(*args, **kwargs)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/site-packages/zeep/wsdl/definitions.py", line 215, in create
return self.input.serialize(*args, **kwargs)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/site-packages/zeep/wsdl/messages/soap.py", line 59, in serialize
header = self._serialize_header(headers_value, nsmap)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/site-packages/zeep/wsdl/messages/soap.py", line 326, in _serialize_header
headers_value = copy.deepcopy(headers_value)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 161, in deepcopy
y = copier(memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/site-packages/zeep/xsd/valueobjects.py", line 151, in deepcopy
new.values = copy.deepcopy(self.values)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 306, in _reconstruct
value = deepcopy(value, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 169, in deepcopy
rv = reductor(4)
TypeError: can't pickle CompiledFFI objects
Hi @lmatheus thanks for the question and apologies for my delayed response. As with #397 I'm not exactly sure what the issue is here so I'll need to do some investigating. Meanwhile could you let me know what version of Python you're using and what the context of running pip freeze are?
Hello. I'm trying to get account data but getting an error:
This is an example of the code I am using:
Full error:
Traceback (most recent call last):
File "module-folder/integrations/google_adwords.py", line 48, in
convert_lead()
File "module-folder/integrations/google_adwords.py", line 45, in convert_lead
accounts = service.get(selector)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/site-packages/googleads/common.py", line 994, in MakeSoapRequest
*packed_args, _soapheaders=soap_headers)['body']['rval']
File "/home/user/.virtualenvs/project-folder/lib/python3.7/site-packages/zeep/proxy.py", line 45, in call
kwargs,
File "/home/user/.virtualenvs/project-folder/lib/python3.7/site-packages/zeep/wsdl/bindings/soap.py", line 119, in send
operation, args, kwargs, client=client, options=options
File "/home/user/.virtualenvs/project-folder/lib/python3.7/site-packages/zeep/wsdl/bindings/soap.py", line 68, in _create
serialized = operation_obj.create(*args, **kwargs)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/site-packages/zeep/wsdl/definitions.py", line 215, in create
return self.input.serialize(*args, **kwargs)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/site-packages/zeep/wsdl/messages/soap.py", line 59, in serialize
header = self._serialize_header(headers_value, nsmap)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/site-packages/zeep/wsdl/messages/soap.py", line 326, in _serialize_header
headers_value = copy.deepcopy(headers_value)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 161, in deepcopy
y = copier(memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/site-packages/zeep/xsd/valueobjects.py", line 151, in deepcopy
new.values = copy.deepcopy(self.values)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 306, in _reconstruct
value = deepcopy(value, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/user/.virtualenvs/project-folder/lib/python3.7/copy.py", line 169, in deepcopy
rv = reductor(4)
TypeError: can't pickle CompiledFFI objects
This might be related to #397
The text was updated successfully, but these errors were encountered: