BingAds / BingAds-Python-SDK

Other
116 stars 162 forks source link

Import throw error "instance() takes at least 1 argument (0 given)" #5

Closed alicor closed 9 years ago

alicor commented 9 years ago

Hi, when I import bingads it throws this error: "instance() takes at least 1 argument (0 given)"

>>> from bingads import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "[MYPATH]\.venv\lib\site-packages\bingads\__init__.py", line 6, in <module>
    import bingads.bulk  # noqa
  File "[MYPATH]\.venv\lib\site-packages\bingads\bulk\__init__.py", line 8, in <module>
    from .file_reader import *
  File "[MYPATH]\.venv\lib\site-packages\bingads\bulk\file_reader.py", line 2, in <module>
    from .entities.bulk_entity import BulkEntity
  File "[MYPATH]\.venv\lib\site-packages\bingads\bulk\entities\__init__.py", line 13, in <module>
    from .ad_extensions import *
  File "[MYPATH]\.venv\lib\site-packages\bingads\bulk\entities\ad_extensions\__init__.py", line 3, in <module>
    from .bulk_call_ad_extensions import *
  File "[MYPATH]\.venv\lib\site-packages\bingads\bulk\entities\ad_extensions\bulk_call_ad_extensions.py", line 9, in <module>
    _CallAdExtension = type(_CAMPAIGN_OBJECT_FACTORY.create('CallAdExtension'))
  File "[MYPATH]\.venv\lib\site-packages\bingads\service_client.py", line 286, in _create_with_cache
    copied_obj = _suds_objects_deepcopy(obj)
  File "[MYPATH]\.venv\lib\site-packages\bingads\service_client.py", line 275, in _suds_objects_deepcopy
    new = origin_type()
TypeError: instance() takes at least 1 argument (0 given)

I'm running on Python 2.7, with bingads 9.3.2

freiz commented 9 years ago

Hi, Alicor

Would you check if you also have installed the other forked suds library?

you can check by running

pip list | grep suds

The requirement is there is one row like

suds-jurko (0.6)

if there are more rows, please uninstall other suds variants, because they share the same namepsace 'suds'.

alicor commented 9 years ago

Ok, I had also suds (0.4) installed. I removed both suds and suds-jurko and re-installed suds-jurko to make it works

Thank you so much for your quick reply!