Getting NameError: global name 'ListType' is not defined with example python

262 views
Skip to first unread message

Helen Lau

unread,
Feb 20, 2014, 12:51:14 AM2/20/14
to adwor...@googlegroups.com
Hi,

I've installed adspygoogle on my local VM server.  I'm getting the following msg when running any example py.  Any idea how to fix this?  Thanks in advance!

/googleads-python-lib$ python  examples/adspygoogle/adwords/v201306/basic_operations/add_campaigns.py

Traceback (most recent call last):

  File "examples/adspygoogle/adwords/v201306/basic_operations/add_campaigns.py", line 149, in <module>

    main(client)

  File "examples/adspygoogle/adwords/v201306/basic_operations/add_campaigns.py", line 56, in main

    budget_id = budget_service.Mutate(budget_operations)[0]['value'][0][

  File "/vagrant/venv/local/lib/python2.7/site-packages/adspygoogle/common/GenericApiService.py", line 292, in CallMethod

    self._SetHeaders()

  File "/vagrant/venv/local/lib/python2.7/site-packages/adspygoogle/adwords/GenericAdWordsService.py", line 122, in _SetHeaders

    soap_headers = SOAPpy.Types.headerType(attrs=header_attrs)

  File "/vagrant/venv/local/lib/python2.7/site-packages/adspygoogle/SOAPpy/Types.py", line 1338, in __init__

    structType.__init__(self, data, "Header", typed, attrs)

  File "/vagrant/venv/local/lib/python2.7/site-packages/adspygoogle/SOAPpy/Types.py", line 1250, in __init__

    anyType.__init__(self, data, name, typed, attrs)

  File "/vagrant/venv/local/lib/python2.7/site-packages/adspygoogle/SOAPpy/Types.py", line 74, in __init__

    if type(name) in (ListType, TupleType):

NameError: global name 'ListType' is not defined

Ray Tsang (AdWords API Team)

unread,
Feb 27, 2014, 5:35:03 PM2/27/14
to adwor...@googlegroups.com
Helen,

I've followed up privately.  In short - this could be caused by case insensitive file system or python setting.  Please make sure the file system is case sensitive.

Thanks!

--
Ray Tsang (AdWords API Advisor)
Reply all
Reply to author
Forward
0 new messages