User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.120 Safari/535.2 [jwulf@gaura Zanata_Topic_Bucket]$ zanata push --project-type=po --username=admin --apikey=XXXX Loading zanata project config from: /tmp/scratch/Zanata/Zanata_Topic_Bucket/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.1, zanata server API version: 1.4.3-SNAPSHOT Project: Zanata-topics Version: 1 Username: admin Source language: en-US Copy previous translations:True 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 1047, in push tmlfolder = process_srcdir(command_options, command_type, project_config, default_folder) File "/usr/lib/python2.7/site-packages/zanataclient/zanata.py", line 467, in process_srcdir tmlfolder = check_pofile(tmlfolder, project_type) File "/usr/lib/python2.7/site-packages/zanataclient/zanata.py", line 447, in check_pofile sub_folder = os.path.join(tmlfolder, folder_type) UnboundLocalError: local variable 'folder_type' referenced before assignment Reproducible: Always
po push gives a different result (error): [jwulf@gaura Zanata_Topic_Bucket]$ zanata po push --username=admin --apikey=XXXX --srcdir pot/ Loading zanata project config from: /tmp/scratch/Zanata/Zanata_Topic_Bucket/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.1, zanata server API version: 1.4.3-SNAPSHOT Project: Zanata-topics Version: 1 Username: admin Source language: en-US Copy previous translations:True PO directory (originals):pot/ Importing source documents only Pushing the content of pot/Zanata_Topic_Bucket.pot to server: error: Unexpected Status, failed to push Pushing the content of pot/Chapter-All_the_Zanata_topics.pot to server: error: Unexpected Status, failed to push Pushing the content of pot/topics/361.pot to server: error: Unexpected Status, failed to push Pushing the content of pot/topics/368.pot to server: error: Unexpected Status, failed to push Pushing the content of pot/topics/371.pot to server: error: Unexpected Status, failed to push Pushing the content of pot/topics/504.pot to server: error: Unexpected Status, failed to push Pushing the content of pot/topics/370.pot to server: error: Unexpected Status, failed to push Pushing the content of pot/topics/503.pot to server: error: Unexpected Status, failed to push Pushing the content of pot/topics/362.pot to server: error: Unexpected Status, failed to push Pushing the content of pot/topics/369.pot to server: error: Unexpected Status, failed to push Pushing the content of pot/topics/502.pot to server: error: Unexpected Status, failed to push Pushing the content of pot/topics/366.pot to server: error: Unexpected Status, failed to push Pushing the content of pot/Preface.pot to server: error: Unexpected Status, failed to push Pushing the content of pot/Author_Group.pot to server: error: Unexpected Status, failed to push Pushing the content of pot/Revision_History.pot to server: error: Unexpected Status, failed to push Pushing the content of pot/Book_Info.pot to server: error: Unexpected Status, failed to push Pushing the content of pot/Errors.pot to server: error: Unexpected Status, failed to push
Same results with 1.3.2: zanata python client version: 1.3.2, zanata server API version: 1.4.3-SNAPSHOT
Hi Joshua, Thanks, there are two issues about the python client: 1) If the server doesn't enable the en-US, the python client will display an error, but i think the python client should give more precise message to user, i will try to fix it. 2) zanata push command use --project-type=gettext, not --project-type=po, I think that's the reason caused zanata push command failed, i will try to modify the code to make sure that python client give a error message if the project-type is not correct. Best Regards
Hi I have modified the code to fix this issue, please try commit 74e749a on git-hub to test this issue.
VERIFIED with 1.3.4