Bug 702192

Summary: zanata version info produces AttributeError:
Product: [Retired] Zanata Reporter: Kenichi Takemura <ktakemur>
Component: Component-PythonClientAssignee: James Ni <jni>
Status: CLOSED CURRENTRELEASE QA Contact: Ding-Yi Chen <dchen>
Severity: low Docs Contact:
Priority: low    
Version: 1.3-alpha-1CC: ebaak, sflaniga, zanata-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-29 06:15:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kenichi Takemura 2011-05-05 01:55:59 UTC
Description of problem:

Command '$ zanata version info' does not work in my environment.

$ zanata project info   
Loading zanata/flies project config from from /home/ktakemur/Zanata/IEEETestPlan/zanata.xml
Loading zanata/flies user config from /home/ktakemur/.config/zanata.ini
zanata/flies server: http://10.64.12.214:8080/zanata
zanata python client version: 1.2.3, zanata/flies server API version: 1.3-alpha-1
Project ID:          IEEETestPlan
Project Name:        IEEETestPlan
Project Type:        IterationProject
Project Description: IEEETestPlan
[ktakemur@baldhills IEEETestPlan]$ zanata version info
Loading zanata/flies project config from from /home/ktakemur/Zanata/IEEETestPlan/zanata.xml
Loading zanata/flies user config from /home/ktakemur/.config/zanata.ini
zanata/flies server: http://10.64.12.214:8080/zanata
zanata python client version: 1.2.3, zanata/flies server API version: 1.3-alpha-1
Version ID:          1.0
Traceback (most recent call last):
  File "/usr/bin/zanata", line 26, in <module>
    client.run()
  File "/usr/lib/python2.7/site-packages/zanataclient/zanata.py", line 1481, in run
    self._get_iteration()
  File "/usr/lib/python2.7/site-packages/zanataclient/zanata.py", line 321, in _get_iteration
    print ("Version Name:        %s")%iteration.name
AttributeError: 'Iteration' object has no attribute 'name'


Version-Release number of selected component (if applicable):
zanata-python-client-1.2.3-1.fc14.noarch

How reproducible:
100%

Steps to Reproduce:
1. Install zanata-python-client by yum on Fedora14 x86_64
2. Run zanata version info
3.
  
Actual results:
AttributeError: 'Iteration' object has no attribute 'name'

Expected results:
Version info displayed.

Additional info:

Comment 1 Sean Flanigan 2011-05-05 02:22:17 UTC
Also happens on RHEL 6 with zanata-python-client-1.2.3-1.el6.noarch

Comment 2 James Ni 2011-05-05 02:50:38 UTC
The reason for this issue is the server have changed the structure of 'Version', there is no 'version name' and 'version description' any more. 

If you use 'zanata version info' on translate.jboss.org which running 1.2 version of zanata: "zanata version info --url=https://translate.jboss.org", the client works well and give correct info.

So i think i will modify the zanata version info to make it compatible with all the version of zanata server. And it is better not use version info command on new server with zanata client 1.2.3.

Best Regards

Comment 3 James Ni 2011-05-06 01:30:02 UTC
Hi Kenichi,

I build a new package 1.2.4 to fix this issue, you can find it on 
https://admin.fedoraproject.org/updates/zanata-python-client-1.2.4-1.fc14?_csrf_token=f6ade6ebe68d25c4ed193e01f216913458eae029
I also build the new package for other platforms

If you test and prove that version 1.2.4 fix that issue, could you help to mark a stable Karma? Thanks

Best Regards

Comment 4 Kenichi Takemura 2011-05-06 01:57:59 UTC
Verified and the package got Karma-ed..

I am curious... didn't we need fedora bug for this problem?