json - Why am I getting a unicode-related ValidationError for python script on one server but not on another? -


i'm running python script retrieve data adwords api, , runs on centos server. using same configuration file , script on ubuntu server, unicode error. there configuration setting need change?

traceback (most recent call last):   file "adwords_sync.py", line 230, in <module>     adwords = adwords(config)   file "adwords_sync.py", line 37, in __init__     self.client = adwordsclient(headers=config.api_headers, config=config.api_config, path=config.api_config['home'])   file "lib/python2.6/site-packages/adspygoogle/adwords/adwordsclient.py", line 153, in __init__     sanitycheck.validateconfigxmlparser(self._config['xml_parser'])   file "lib/python2.6/site-packages/adspygoogle/common/sanitycheck.py", line 96, in validateconfigxmlparser     raise validationerror(msg) adspygoogle.common.errors.validationerror: invalid input <type 'unicode'> '1', expecting 1 or 2 of type <str>. 

the configuration file json file:

{   ...   "api_config": {     "home": "/srv/logs/pylons",     "log_home": "/srv/logs/pylons",     "soap_lib": "2",     "xml_parser": "1",     ...   } } 

what causing line "1" throw unicode error on ubuntu server (but not centos server)?

check python, adsygoogle, , simplejson versions on each server. i'm guessing 1 of them out of sync on 1 of servers, causing adwords accept unicode strings on 1 not other (or causing simplejson parse generate unicode strings on 1 , not other.)

failing that, can cast values str(), before passing adwords config parser?


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -