Bug 732330 - ValueError when trying to pull some documents
Summary: ValueError when trying to pull some documents
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Zanata
Classification: Retired
Component: Component-PythonClient
Version: 1.4
Hardware: Unspecified
OS: Linux
high
high
Target Milestone: ---
: ---
Assignee: James Ni
QA Contact: Ding-Yi Chen
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-22 02:45 UTC by David Mason
Modified: 2011-10-28 08:17 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-10-28 08:17:34 UTC


Attachments (Terms of Use)

Description David Mason 2011-08-22 02:45:58 UTC
Description of problem:
Python client throws an exception when trying to pull a specific document from the server.

Version-Release number of selected component (if applicable):
Latest python client from github ( commit 8f49b0a83f7371b35cd02c886e6919c61d4ba3d8 )

How reproducible:
Always

Steps to Reproduce:
1.Set up the standard publican-demo from the maven client source
2.Download pot file from https://github.com/jeremyclark13/Techozoic-Fluid/blob/4fd198372f46d7ac961b97310f57e13be720a01a/languages/techozoic_fluid.pot into <project-dir>/pot/subdir/
3.in project home, run 'zanata push --project-type=publican --srcdir=./pot/subdir'
4.in project home, run 'zanata pull --project-type=publican'


  
Actual results:
Fetching the content of techozoic_fluid from Zanata server: 
Retrieving zh translation from server:
Traceback (most recent call last):
  File "/usr/bin/zanata", line 5, in <module>
    pkg_resources.run_script('zanata-python-client==1.2.5-23-g8f49-mod', 'zanata')
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 461, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1194, in run_script
    execfile(script_filename, namespace, namespace)
  File "/usr/lib/python2.6/site-packages/zanata_python_client-1.2.5_23_g8f49_mod-py2.6.egg/EGG-INFO/scripts/zanata", line 25, in <module>
    zanata.run()
  File "/usr/lib/python2.6/site-packages/zanata_python_client-1.2.5_23_g8f49_mod-py2.6.egg/zanataclient/zanata.py", line 1206, in run
    program_name=os.path.split(sys.argv[0])[1],
  File "/usr/lib/python2.6/site-packages/zanata_python_client-1.2.5_23_g8f49_mod-py2.6.egg/zanataclient/command.py", line 310, in handle_program
    command(command_options, args)
  File "/usr/lib/python2.6/site-packages/zanata_python_client-1.2.5_23_g8f49_mod-py2.6.egg/zanataclient/zanata.py", line 1170, in pull
    zanatacmd.pull_command(zanata, locale_map, project_id, iteration_id, filelist, lang_list, outpath, command_type)
  File "/usr/lib/python2.6/site-packages/zanata_python_client-1.2.5_23_g8f49_mod-py2.6.egg/zanataclient/zanatacmd.py", line 411, in pull_command
    publicanutil.save_to_pofile(pofile, result, pot)
  File "/usr/lib/python2.6/site-packages/zanata_python_client-1.2.5_23_g8f49_mod-py2.6.egg/zanataclient/publicanutil.py", line 294, in save_to_pofile
    po.save()
  File "/usr/lib/python2.6/site-packages/polib.py", line 419, in save
    contents = getattr(self, repr_method)()
  File "/usr/lib/python2.6/site-packages/polib.py", line 626, in __str__
    return ret + _BaseFile.__str__(self)
  File "/usr/lib/python2.6/site-packages/polib.py", line 303, in __str__
    ret.append(entry.__str__(self.wrapwidth))
  File "/usr/lib/python2.6/site-packages/polib.py", line 995, in __str__
    for fpath, lineno in self.occurrences:
ValueError: too many values to unpack



Expected results:
Fetching the content of techozoic_fluid from Zanata server: 
Retrieving zh translation from server:
Writing po file to /home/damason/zanata-demo/demo-publican/zh/techozoic_fluid.po

Additional info:

Comment 1 Sean Flanigan 2011-09-07 04:33:02 UTC
Assigning to Scrum product owner for prioritisation.

Comment 2 James Ni 2011-09-29 08:08:51 UTC
This bug had fixed on the upstream, and included in version 1.3.0 and 1.3.1

Comment 3 Ding-Yi Chen 2011-10-04 01:14:41 UTC
VERIFIED with Zanata version 1.4.1-SNAPSHOT (20111003-1737)
Python client 1.3.1


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