BingAds / BingAds-Python-SDK

Other
117 stars 162 forks source link

TypeError: instance() takes at least 1 argument (0 given) #18

Closed carlosmolinet closed 8 years ago

carlosmolinet commented 8 years ago

Hello, I see the following error when importing the ServiceClient module (it used to work fine until today):

File "BingGeoLocationPerformance.py", line 1, in <module>
    from bingads.service_client import ServiceClient
  File "C:\Python27\lib\site-packages\bingads\__init__.py", line 6, in <module>
    import bingads.bulk  # noqa
  File "C:\Python27\lib\site-packages\bingads\bulk\__init__.py", line 11, in <module>
    from .file_reader import *
  File "C:\Python27\lib\site-packages\bingads\bulk\file_reader.py", line 2, in <module>
    from .entities.bulk_entity import BulkEntity
  File "C:\Python27\lib\site-packages\bingads\bulk\entities\__init__.py", line 11, in <module>
    from .bulk_campaign import *
  File "C:\Python27\lib\site-packages\bingads\bulk\entities\bulk_campaign.py", line 8, in <module>
    _ShoppingSetting = type(_CAMPAIGN_OBJECT_FACTORY.create('ShoppingSetting'))
  File "C:\Python27\lib\site-packages\bingads\service_client.py", line 343, in _create_with_cache
    copied_obj = _suds_objects_deepcopy(obj)
  File "C:\Python27\lib\site-packages\bingads\service_client.py", line 332, in _suds_objects_deepcopy
    new = origin_type()
TypeError: instance() takes at least 1 argument (0 given)

Any idea? Thanks!

imagineful commented 8 years ago

Hi, @carlosmolinet Thanks for your feedback, I tried to test bulk test locally with both SI and Production account in version 10.4.4, did not repro your errors. Could you provide more information to us for further investigation? e.g. any changes/upgrade for bingads sdk on your side? What's the bingads sdk version you are using?

Thanks. Li.

carlosmolinet commented 8 years ago

I am using the latest version 10.4.4 and no changes on my side, I tried uninstaling and installing the module again without luck.

The same code worked fine yesterday, and works fine on another machine.

Thanks!

imagineful commented 8 years ago

Hi, @carlosmolinet, I still could not repro this error, and since it's working on your other machine, I think it's more likely to be an environment related issue.

imagineful commented 8 years ago

close issue. if anything else please feel free to reopen it or open a new issue. thanks.

siyazhang commented 7 years ago

@carlosmolinet I had the same issue and was able to resolve this by: https://github.com/BingAds/BingAds-Python-SDK/issues/5