thin-client-config-agent fails in pycurl with TypeError: string argument expected, got 'bytes'

Bug #1152222 reported by David Barth
40
This bug affects 10 people
Affects Status Importance Assigned to Milestone
pycurl (Ubuntu)
Invalid
High
Michael Terry
thin-client-config-agent (Ubuntu)
Fix Released
High
Unassigned

Bug Description

When using thin-client-config-agent, the recent release of the pycurl package breaks the Remote Login feature.

The following test shows the error:

echo -n "test" | /usr/bin/thin-client-config-agent <email address hidden>
TypeError: string argument expected, got 'bytes'
Exception: <class 'pycurl.error'>
(23, 'Failed writing header')
{ "Error": "Contact your administrator" }

This is the regression as of version 7.19.0-5ubuntu6 of the package.

Previously, on quantal and up to raring 7.19.0-5ubuntu3 the expected result was:
Invalid username or password
{ "Error": "Invalid username or password" }

Related branches

tags: added: regression-release
tags: added: raring
Changed in pycurl (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Changed in pycurl (Ubuntu):
assignee: nobody → Dmitrijs Ledkovs (xnox)
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Hmm.... blocked by bug 1163609

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

I'm not sure if this is a bug in pycurl. I see a few fixes w.r.t. python3 bytes/string handling in pycurl uploaded by mterry (see https://launchpad.net/ubuntu/+source/pycurl/+changelog ). My naïve expectation is that "over the wire" we always pass and receive Bytes, and it's our job to encode/decode that before sending/receiving. Attaching a hacking patch, which makes thin-client-config-agent work against pycurl in raring. Not sure if it will work against quantal and earlier as well. Assigning to Mterry the pycurl portion of the bug report & asking to review merge proposal as well.

Changed in pycurl (Ubuntu):
assignee: Dmitrijs Ledkovs (xnox) → Michael Terry (mterry)
summary: - pycurl fails with TypeError: string argument expected, got 'bytes'
+ thin-client-config-agent fails in pycurl with TypeError: string argument
+ expected, got 'bytes'
Changed in thin-client-config-agent (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Changed in pycurl (Ubuntu):
status: Confirmed → Invalid
Changed in thin-client-config-agent (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Barry Warsaw (barry) wrote :

BTW, LP: #1163609 is really LP: #1124508. I've uploaded a fix for that in curl.

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

This bug was fixed in the package thin-client-config-agent - 0.7

---------------
thin-client-config-agent (0.7) raring; urgency=low

  [ Dmitrijs Ledkovs ]
  * Port to use BytesIO with raring's pycurl. (LP: #1152222)
  * Bump Standards Version to 3.9.4.

  [ David Barth]
  * Fix test suite for above.
 -- Dmitrijs Ledkovs <email address hidden> Wed, 03 Apr 2013 17:22:33 +0100

Changed in thin-client-config-agent (Ubuntu):
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.