zanata-python-client: Crash when pushing local translations
Description
Environment
None
Activity
Show:
Former user 20 April 2018 at 00:24
We are closing all the old issues to have more clarity in our backlog for Zanata project. Feel free to re-open or leave a comment if you require our attention on your Jira.
Ready for Release
Details
Details
Assignee
Sundeep Anand
Sundeep Anand(Deactivated)Reporter
John Doe
John DoeLabels
Components
Fix versions
Affects versions
Priority

More fields
Time tracking
More fields
Time trackingCreated 29 December 2015 at 02:55
Updated 27 June 2018 at 02:21
Resolved 4 January 2016 at 04:26
user@user-pc ~/my-project $ ../zanata-python-client/zanata po push --import-po [INFO] Loading zanata project config from: /home/user/my-project/zanata.xml [INFO] Loading zanata user config from: /home/user/.config/zanata.ini [INFO] zanata server: https://translate.zanata.org/zanata [INFO] zanata python client version: 1.4.0-8-g66250, zanata server API version: 3.7.3 [INFO] Project: my-project [INFO] Version: master [INFO] Project Type: gettext [INFO] Username: my_username [INFO] Source language: en-US [INFO] Reuse previous translation on server: False [INFO] Importing translation [INFO] Reading locale folders from po [INFO] merge option set to value auto [INFO] This will overwrite/delete any existing documents on the server. Are you sure (y/n)?y [INFO] Pushing the content of po/my-project.pot to server: [INFO] Pushing zh-CN translation for my-project to server: Traceback (most recent call last): File "../zanata-python-client/zanata", line 25, in <module> zanata.run() File "/home/user/zanata-python-client/zanataclient/zanata.py", line 732, in run program_name=os.path.split(sys.argv[0])[1], File "/home/user/zanata-python-client/zanataclient/command.py", line 348, in handle_program command(command_options, args) File "/home/user/zanata-python-client/zanataclient/zanata.py", line 388, in run_func command.run() File "/home/user/zanata-python-client/zanataclient/pushcmd.py", line 151, in run self.zanatacmd.push_command(filelist, tmlfolder, self.project_id, self.version_id, self.copytrans, self.plural_support, import_param) File "/home/user/zanata-python-client/zanataclient/zanatacmd.py", line 424, in push_command self.import_po(filename, transdir, project_id, iteration_id, lang_list, locale_map, merge, project_type) File "/home/user/zanata-python-client/zanataclient/zanatacmd.py", line 314, in import_po self.commit_translation(project_id, iteration_id, request_name, pofile, lang, body, merge) File "/home/user/zanata-python-client/zanataclient/zanatacmd.py", line 133, in commit_translation result = self.zanata_resource.documents.commit_translation(project_id, iteration_id, request_name, lang, body, merge) File "/home/user/zanata-python-client/zanataclient/zanatalib/docservice.py", line 105, in commit_translation headers['X-Auth-User'] = self.projects.username AttributeError: 'ProjectService' object has no attribute 'username'