simplestreams failing on release feed - TypeError

Bug #1241711 reported by Neil Wilson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
simplestreams
Fix Released
Medium
Unassigned
simplestreams (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

New 13.10 installation, with simplestreams package and a copy of the 'hook-debug' script in bin in the home directory.

When I run

sstream-sync --max 1 --verbose --hook=bin/debug http://cloud-images.ubuntu.com/releases

I get

Traceback (most recent call last):
  File "/usr/bin/sstream-sync", line 163, in <module>
    main()
  File "/usr/bin/sstream-sync", line 156, in main
    tmirror.sync(smirror, cfg['path'])
  File "/usr/lib/python3/dist-packages/simplestreams/mirrors/__init__.py", line 85, in sync
    return self.sync_index(reader, path, data, content)
  File "/usr/lib/python3/dist-packages/simplestreams/mirrors/__init__.py", line 230, in sync_index
    self.sync(reader, path=epath)
  File "/usr/lib/python3/dist-packages/simplestreams/mirrors/__init__.py", line 83, in sync
    return self.sync_products(reader, path, data, content)
  File "/usr/lib/python3/dist-packages/simplestreams/mirrors/__init__.py", line 358, in sync_products
    self.insert_products(path, target, content)
  File "/usr/lib/python3/dist-packages/simplestreams/mirrors/command_hook.py", line 141, in insert_products
    content=content, extra={'path': path})
  File "/usr/lib/python3/dist-packages/simplestreams/mirrors/command_hook.py", line 201, in call_hook
    tfile.write(content)
TypeError: 'str' does not support the buffer interface

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: simplestreams 0.1.0~bzr318-0ubuntu1
ProcVersionSignature: User Name 3.11.0-12.19-generic 3.11.3
Uname: Linux 3.11.0-12-generic x86_64
ApportVersion: 2.12.5-0ubuntu2
Architecture: amd64
Date: Fri Oct 18 16:22:19 2013
MarkForUpload: True
PackageArchitecture: all
SourcePackage: simplestreams
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Neil Wilson (neil-aldur) wrote :
Revision history for this message
Scott Moser (smoser) wrote :

Neil,
  Thanks for the bug I'll take a look at this.
 the simple fix is opening the file as 'w' rather than 'wb', but i need to look to make sure that is sane.

Scott Moser (smoser)
Changed in simplestreams:
status: New → Confirmed
Changed in simplestreams (Ubuntu):
status: New → Confirmed
Changed in simplestreams:
importance: Undecided → Medium
Changed in simplestreams (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Scott Moser (smoser) wrote :

also reproducible with
./tools/tenv sstream-sync --max 1 --verbose --hook=./tools/hook-debug ./examples/foocloud/streams/v1/index.json

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package simplestreams - 0.1.0~bzr323-0ubuntu1

---------------
simplestreams (0.1.0~bzr323-0ubuntu1) trusty; urgency=low

  * New upstream snapshot.
    * fix bug with sstream-sync (LP: #1241711)
    * fix bug in glance mirror (LP: #1243433)
    * fix odd behavior bug when filtering. The result was that if you
      had ever run with a filter, subsequent runs with modified filter
      would not see different results (LP: #1238227).
 -- Scott Moser <email address hidden> Tue, 22 Oct 2013 19:35:38 -0400

Changed in simplestreams (Ubuntu):
status: Confirmed → Fix Released
Scott Moser (smoser)
Changed in simplestreams:
status: Confirmed → Fix Committed
Revision history for this message
Scott Moser (smoser) wrote : Fixed in simplestreams version 0.1.0.

This bug is believed to be fixed in simplestreams in version 0.1.0. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in simplestreams:
status: Fix Committed → 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.