Bug 732330 - ValueError when trying to pull some documents
ValueError when trying to pull some documents
Product: Zanata
Classification: Community
Component: Component-PythonClient (Show other bugs)
Unspecified Linux
high Severity high
: ---
: ---
Assigned To: James Ni
Ding-Yi Chen
Depends On:
  Show dependency treegraph
Reported: 2011-08-21 22:45 EDT by David Mason
Modified: 2011-10-28 04:17 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-10-28 04:17:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description David Mason 2011-08-21 22:45:58 EDT
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:

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>
  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
  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
  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__
  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 00:33:02 EDT
Assigning to Scrum product owner for prioritisation.
Comment 2 James Ni 2011-09-29 04:08:51 EDT
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-03 21:14:41 EDT
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.