Uploading a file via script (using launchpadlib) results in truncated file.

Bug #1777535 reported by Christopher Lee
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
launchpadlib
New
Undecided
Unassigned

Bug Description

When adding a file to a milestone using launchpadlib we are seeing that a byte is being truncated from one of the files.

The file in question is the juju core source tarball[1]. If we upload the same file manually using the web UI it works as expected.

[1] i.e. https://launchpad.net/juju/2.4/2.4-rc2/+download/juju-core_2.4-rc2.tar.gz

Revision history for this message
Colin Watson (cjwatson) wrote :

I suspect that (a) the file in question ends with a carriage return byte and (b) you're using Python 3 to do the upload. Could you confirm or deny these two things?

Revision history for this message
Christopher Lee (veebers) wrote :

a) I'm not sure, what's the best way to test this?

b) this using python 2.7.12

Revision history for this message
Tim Penhey (thumper) wrote :

@Colin, I grabbed the file that Chris mentioned in the bug bug report, and the last character is in fact a carriage return (0x0d).

Can we please get some movement on this as it is the only thing currently blocking our release automation?

Thanks.

William Grant (wgrant)
affects: launchpad → launchpadlib
Revision history for this message
Colin Watson (cjwatson) wrote :

This is essentially bug 1729754. There are possibly some differences in details, as there are a couple of different types of possible corruption (handling of line separators in the middle of the file, and handling of a CR at the end), but I'm working on a set of fixes that will cover both.

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.