(2.4b1)`bzr plugins` fails with TypeError in writelines

Bug #754082 reported by IWATA Hidetaka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Martin Packman

Bug Description

In bzr 2.4b1, `bzr plugins` crashes with following traceback.

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 926, in exception_to_return_code
  File "bzrlib\commands.pyo", line 1126, in run_bzr
  File "bzrlib\commands.pyo", line 691, in run_argv_aliases
  File "bzrlib\commands.pyo", line 713, in run
  File "bzrlib\cleanup.pyo", line 135, in run_simple
  File "bzrlib\cleanup.pyo", line 165, in _do_with_cleanups
  File "bzrlib\commands.pyo", line 1141, in ignore_pipe
  File "bzrlib\builtins.pyo", line 4653, in run
  File "bzrlib\ui\text.pyo", line 542, in writelines
TypeError: arg must be a sequence object

Output of `bzr version` is:
Bazaar (bzr) 2.4b1
  Python interpreter: C:\Program Files\Bazaar\python26.dll 2.6.6
  Python standard library: C:\Program Files\Bazaar\lib\library.zip
  Platform: Windows-7-6.1.7600
  bzrlib: C:\Program Files\Bazaar\lib\library.zip\bzrlib
  Bazaar configuration: C:\Users\iwata\AppData\Roaming\bazaar\2.0
  Bazaar log file: C:\Users\iwata\Documents\.bzr.log

Related branches

Revision history for this message
Martin Pool (mbp) wrote :

Thanks for the report. I can't reproduce this on Linux. What happens with 'bzr --no-plugins plugins'?

tags: added: plugin traceback
summary: - (2.4b1)`bzr plugins` does not work
+ (2.4b1)`bzr plugins` fails with TypeError in writelines
Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
IWATA Hidetaka (hid-iwata) wrote :

`bzr --no-plugins plugins` raises same exception.

wrapped_stream is encodings.cp932.StreamWriter, and it seems that encodings.***.StreamWriter.writelines does not accept generator.

Revision history for this message
Martin Packman (gz) wrote :

You can reproduce this on Unix (provided you have the relevant locale installed) with:

    LANG=jp_JP.EUC-JP ./bzr --no-plugins plugins

The Python UTF-8 and ISO-8859-* codecs don't have this issue.

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 754082] Re: (2.4b1)`bzr plugins` fails with TypeError in writelines

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/14/2011 01:05 AM, Martin [gz] wrote:
> You can reproduce this on Unix (provided you have the relevant locale
> installed) with:
>
> LANG=jp_JP.EUC-JP ./bzr --no-plugins plugins
>
> The Python UTF-8 and ISO-8859-* codecs don't have this issue.
>

Now that is pretty ugly. Having the codec change the behavior is pretty
harsh.

I wonder if encodings.iso_8859_1.StreamWriter does accept generators,
and hence we generally don't see this.

Anyway, adding list(generator) would be fine with me, I don't think it
needs to be a generator.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2mos8ACgkQJdeBCYSNAANk2gCgkpXNrHqWBcr8C0z1F3pk7jK5
dMoAn1EDwKJ75IZtEMwjksZ0MM3LML17
=Lqr2
-----END PGP SIGNATURE-----

Martin Packman (gz)
Changed in bzr:
assignee: nobody → Martin [gz] (gz)
status: Confirmed → In Progress
Martin Packman (gz)
Changed in bzr:
milestone: none → 2.4b3
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.