Bug 702192 - zanata version info produces AttributeError:
zanata version info produces AttributeError:
Status: CLOSED CURRENTRELEASE
Product: Zanata
Classification: Community
Component: Component-PythonClient (Show other bugs)
1.3-alpha-1
All Linux
low Severity low
: ---
: ---
Assigned To: James Ni
Ding-Yi Chen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-04 21:55 EDT by Kenichi Takemura
Modified: 2014-08-04 18:03 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-11-29 01:15:20 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Kenichi Takemura 2011-05-04 21:55:59 EDT
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-04 22:22:17 EDT
Also happens on RHEL 6 with zanata-python-client-1.2.3-1.el6.noarch
Comment 2 James Ni 2011-05-04 22:50:38 EDT
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-05 21:30:02 EDT
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-05 21:57:59 EDT
Verified and the package got Karma-ed..

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

Note You need to log in before you can comment on or make changes to this bug.