shotgunsoftware/python-api — Issue #7: Bug in download_attachment() in the JSON branch
Author: HughMacdonald
Created: 2011-12-18 01:25:43+00:00
State: open

Hi,

I've just been getting very confused as to why I'm not getting the right files when I call download_attachment()

It turns out the json version is slightly different from the master branch.

In the master branch (line 889):

url = urlparse.urlunparse((self.config.scheme, self.config.server,
"/file_serve/attachment/%s" % urllib.quote(str(attachment_id)),
None, None, None))

In the JSON version (line 880):

url = urlparse.urlunparse((self.config.scheme, self.config.server,
"/file_serve/%s" % urllib.quote(str(attachment_id)),
None, None, None))

Note that the actual URL is missing 'attachment/' in the JSON version.

Without this, it gives me files, but I'm not sure what the connection is. With it, it gives me the files I would expect.

I'll put in a pull request at some point in the near future to roll this back to how it was...

If I look at a page of all of th