Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UserService.getCurrentUser gives NETWORK_CODE_REQUIRED Error #230

Closed
mattpr opened this issue Oct 12, 2017 · 1 comment
Closed

UserService.getCurrentUser gives NETWORK_CODE_REQUIRED Error #230

mattpr opened this issue Oct 12, 2017 · 1 comment
Assignees

Comments

@mattpr
Copy link

mattpr commented Oct 12, 2017

API v201708

According to the pydocs (http://googleads.github.io/googleads-python-lib/):

network_code: A string identifying the network code of the network you are
accessing. All requests other than getAllNetworks and getCurrentUser
calls require this header to be set.

This doesn't seem to be the case anymore?

$ ./dfp.py
Press Ctrl-C to quit.
No handlers could be found for logger "suds.client"
Traceback (most recent call last):
  File "./dfp.py", line 161, in <module>
    main(dfp_client, api_version)
  File "./dfp.py", line 148, in main
    user = getAPIUser(dfp_client, api_version)
  File "./dfp.py", line 32, in getAPIUser
    user = service.getCurrentUser()
  File "/usr/local/lib/python2.7/site-packages/googleads/common.py", line 753, in MakeSoapRequest
    self._datetime_packer) for arg in args])
  File "/usr/local/lib/python2.7/site-packages/suds/client.py", line 521, in __call__
    return client.invoke(args, kwargs)
  File "/usr/local/lib/python2.7/site-packages/suds/client.py", line 581, in invoke
    result = self.send(soapenv)
  File "/usr/local/lib/python2.7/site-packages/suds/client.py", line 619, in send
    description=tostr(e), original_soapenv=original_soapenv)
  File "/usr/local/lib/python2.7/site-packages/suds/client.py", line 670, in process_reply
    raise WebFault(fault, replyroot)
suds.WebFault: Server raised fault: '[AuthenticationError.NETWORK_CODE_REQUIRED @ ]'
$ python --version
Python 2.7.13
$ pip show googleads
Name: googleads
Version: 8.0.0
Summary: Google Ads Python Client Library
Home-page: https://github.com/googleads/googleads-python-lib
Author: Mark Saniscalchi
Author-email: api.msaniscalchi@gmail.com
License: Apache License 2.0
Location: /usr/local/lib/python2.7/site-packages
Requires: pysocks, PyYAML, httplib2, pytz, suds-jurko, xmltodict, oauth2client
@grivescorbett
Copy link
Contributor

Thanks for reporting this :). The docs are incorrect, getCurrentUser requires a network code. I'll fix it in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants