[Chicago] Video

Carl Karsten carl at personnelware.com
Tue Nov 19 04:55:32 CET 2013

On Mon, Nov 18, 2013 at 8:13 PM, Brian Curtin <brian at python.org> wrote:
> On Mon, Nov 18, 2013 at 6:39 PM, Carl Karsten <carl at personnelware.com> wrote:
>> I got it working, but could use a code review of my uploader:
>> https://github.com/CarlFK/veyepar/blob/master/dj/scripts/rax_uploader.py
>> This line bothers me:
>> pyrax.set_setting("identity_type", "rackspace")
>> maybe that should be right under the import pyrax?
> Yeah, any set_setting stuff typically goes right under the import pyrax.

yay, one less thing to wonder about.

>> if you want to write a line of code ...
>> I generally leave this code alone until I get an error, then I try to
>> figure out what I need to debug it
>> but if you can give me a head start, that may come in handy some day ;)
>>     except Exception as e:
>>             print e
>>             # self.ret_text = "rax error: %s" % ( e.body )
>> Does rackspace have something setup for testing so that someone can
>> run this code with minimal server side setup?  currently it requires
>> someone (Sheila) getting the  rackspace account setup and creating a
>> user account for me, I log in and create a container for testing
>> called testing, get my api keys, copy/paste them into the code, and
>> now I can run it.    This is fine for production, but if I am handing
>> it off to someone to test, they will get annoyed and the test will
>> likely just show that they screwed up the server setup and that is why
>> they gave up trying to help ;/
> There's no server aspect to Cloud Files, as it's just blob storage, so
> I guess I'd need the bigger picture to understand the full issue
> you're having.

ok, Cloud Files setup.. all those steps I mentioned.

> What kind of testing are you doing?

Pretty much just running rax_uploader.py and seeing if it uploads a file.

At this point I am looking for low hanging fruit - if you know of easy
things I can do, I'll do it, but anything that is 'work' goes to the
bottom of my list.  That said...

> If you're doing integration
> testing with a live account, you're going to have to pass off creds to
> anyone who's helping out - nothing can get around that.

I was hoping there was some sort of account with some restrictions
that only make it useful for testing.

like archive.org does this:
 headers['x-archive-meta-collection'] = 'test_collection'

which I think causes the item to get deleted in 30 days (but now I
can't find docs to support this..)

stuff I have found that I have not tried to use:

               $ curl s3.us.archive.org -v -H x-archive-simulate-error:SlowDown

               To see a list of errors s3 can simulate, you can do:
               $ curl s3.us.archive.org -v -H x-archive-simulate-error:help

docs: http://archive.org/help/abouts3.txt

and for youtube:

"YouTube API staging server, that YouTube provides to help you
implement the API. "

> At the very
> least, unit tests that mock out methods like get_container and
> upload_file would probably be helpful.

I am more looking for something to help me debug stuff like this:


internet archive - 403 Forbidden - lack sufficient privilages

This is one that can only be debugged using my credentials,  so pfft.

Thanks for the code review - I just wrote it last night or so, then
used it for chipy vids.

Carl K

More information about the Chicago mailing list