User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.220 Safari/535.1 zanata 1.3.1 on F15. Reproducible: Always Steps to Reproduce: 1.Run zanata publican push 2. 3. Actual Results: [jwulf@gaura Zanata_Translator_Quickstart]$ zanata push --project-type=publican Loading zanata project config from: /home/jwulf/Work/Zanata/Zanata_Translator_Quickstart/zanata.xml Loading zanata user config from: /home/jwulf/.config/zanata.ini zanata server: http://zanata-endeavour.lab.eng.bne.redhat.com:8080/ Traceback (most recent call last): File "/usr/bin/zanata", line 25, in <module> zanata.run() File "/usr/lib/python2.7/site-packages/zanataclient/zanata.py", line 1223, in run program_name=os.path.split(sys.argv[0])[1], File "/usr/lib/python2.7/site-packages/zanataclient/command.py", line 325, in handle_program command(command_options, args) File "/usr/lib/python2.7/site-packages/zanataclient/zanata.py", line 1018, in push get_version(url) File "/usr/lib/python2.7/site-packages/zanataclient/zanata.py", line 371, in get_version content = version.get_server_version() File "/usr/lib/python2.7/site-packages/zanataclient/zanatalib/versionservice.py", line 45, in get_server_version version = json.loads(content) File "/usr/lib64/python2.7/json/__init__.py", line 326, in loads return _default_decoder.decode(s) File "/usr/lib64/python2.7/json/decoder.py", line 360, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib64/python2.7/json/decoder.py", line 378, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded Expected Results: Zanata should push project to the server. When the username / apikey pair is incorrect, the following occurs: [jwulf@gaura Zanata_Translator_Quickstart]$ zanata publican push Loading zanata project config from: /home/jwulf/Work/Zanata/Zanata_Translator_Quickstart/zanata.xml Loading zanata user config from: /home/jwulf/.config/zanata.ini zanata server: http://zanata-endeavour.lab.eng.bne.redhat.com:8080 zanata python client version: 1.3.0, zanata server API version: 1.4-SNAPSHOT error: Please specify username and apikey in zanata.ini or with '--username' and '--apikey' options Note that the server version is correctly reported here. The error message produced when the apikey / username pair is correct suggests that retrieving the server version is the cause of the error.
Also zanata-python-client-1.3.0-1.fc15.noarch on F15
This bug is due to the '\n' or white space in URL, i have modify the source on upstream to trim the URL. Also, it is better to check the <url> tag in zanata.xml and make sure that URL doesn't include new line.
James, It looks like the data is invalid, did you change your source code to handle this by display error messages or try to remove the white space? If not, please close it as NOTABUG instead.
Hi Ding Yes, I have modified the source code to handle this by removing the white space or '\n', also giving a warning messages if URL contains white space or '\n'
VERIFIED with commit ab314cee446132875151823aaf9807c18c564ac2