Forum Archive

Gist download

ihf

I am trying to use the gist download script that is created using https://gist.github.com/spencerogden/4702275. I believe this was working correctly but now I am getting an error that 'num' is being referenced before assignment. Can anyone help me get this working again?

JonB

That version seems broken in a few regards:

1) json now(?) is a function which returns a dict, not a dict itself. Hence everything was broken. I think requests or some lib was updated in 1.5 that may have broken that. I added required parens.

2). set seems to conflict with some internal pythonista namespace. At least, the auto completion goes bonkers when there is a def called set inside gistcheck. I renamed it to gist_set

3). Someone else didn't think the auth module worked, and reverted it to the original.

Anyway, here is an update, which works for me. Be sure to overwrite any existing gistcheck.py

 https://gist.github.com/jsbain/1c95b3491d65d9e24456/
ihf

Thank you!! It works perfectly.