hey everyone, i submitted a PR to vertex forever and a half ago... but its been some time and i'd really like to ask for some help on pinpointing how i messed up this addCallback
i can link you the travis build too if youd like to see the specific error :)
feel free to PM me if you dont want to blow up channel, i'd really appreciate the help!
iffy joined the channel
iffy has left the channel
glyph
chellygel: blowing up the channel is always encouraged :)
chellygel: so what's going on with the failing tests?
chellygel: ...?
chellygel
i'm getting "exceptions.AttributeError: 'NoneType' object has no attribute 'addCallback'"
withhhh the test forrr
testChooserGetsThreeChoices
glyph
chellygel: it's true! NoneType in fact does not have that type of attribute.
chellygel
hhahahahaha
yes, so to me i broke down what i was passing through
but i wasnt sure if it was the test that was messed up or my code, but i was more inclined to say it was my code
though we did make a lot of changes so thats why i was a bit lost on it
glyph
chellygel: so why don't you walk me through what _you_ think is happening
chellygel
sure!
so i think it has to do with privateSecret, right? so something with the certificates isn't getting passed around correctly?
i feel bad for person named so ;~;
_addClientService isn't returning the callback thing its expecting so it bombs there-- let me get my debugger running again now! sec
if i say sorry during this conversation, please slap me with a trout
i've typed it 4 times now
so when walking through -- return self.requestCertificateForAddress(fromAddress, password) is whats triggering the code to send the nonetype error
no im wrong, this return svc.authorize(q2q.Q2QAddress(serverDomain, username),
--> 419 privateSecret).addCallback(lambda x: svc)
i remember you and I walking through callbacks together -- but my next step in figuring this all out was to build a baby program to help me play with them more so i could better understand what this is doing
glyph
chellygel: let's look at the bottom line of the traceback
chellygel
ok!
glyph
chellygel: we're inside _addClientService, it's complaining about .addCallback not being on some NoneType, which suggests that the result of the expression "svc.authorize(q2q.Q2QAddress(serverDomain, username), privateSecret)" is returning a NoneType, and we expect something with an 'addCallback' method (i.e. a Deferred)
chellygel
right.
glyph
chellygel: which means that somewhere (most likely) there's a 'def authorize(' inside a Service class that is returning None
chellygel
you are inferring that from the svc.authorize line
glyph
"git grep -n 'def authorize('" tells us there is only one such definition in the entire codebase
chellygel: I am indeed.
chellygel
thanks
glyph
chellygel: is it clear _why_ I'm inferring that?
chellygel
its trying to perform that action and receiving none type -- when it expects the call back method
glyph
right.
chellygel
i havent pulled the au thorize up yet but then i should believe that some inheritance may not be occuring
since that addcallback method isn't found
glyph
chellygel: rather than step all the way through authorize, I'm going to skip ahead a little bit :)
chellygel
and i know thats coming from twisted proper not vertex
glyph
chellygel: we know that something has _changed_ in this PR which is causing the failure
chellygel
right.
glyph
chellygel: specifically, we know that something (ultimately called by 'Q2QService.authorize') _used_ to return a Deferred, but now returns None instead.
chellygel
tracking.
glyph
chellygel: I may have to back up and make sure you know this Python thing - the default return value of any method that doesn't explicitly return is None :)
chellygel
i do understand this!
glyph
chellygel: OK cool. The thing to look for is any place a 'return' either turns into a 'return None' or a fall-off-the-end-of-the-function-without-returning in your patch at https://github.com/twisted/vertex/pull/39/files
chellygel: do you see such a thing?
chellygel
looking
when you say "fall-off-the-end-of-the-function-without-returning"
do you mean not returning at all?
glyph
chellygel: yeah.
chellygel
akin to gotSignResponse?
clokep1 joined the channel
its doing things but not explicitly returning something
glyph
chellygel: Exactly. Except - getSignResponse used to be called '_1', and that didn't return anything previously either.
chellygel: getting warmer thouhg :)
chellygel
okay but now getsecure connection isn't returningggggggg
as it was before
so it was doing things then... initializing...itself? am i saying words right?
glyph
chellygel: 👃👈
chellygel
TIL you can emoji in irc
oooookayyyy wow
glyph
chellygel: only actual emoji though, no cheating like :sparkles: on slack
chellygel
thank you! this walkthroguh really helped me understand how to look for that better!
lets tinker and try things!
faldridge joined the channel
glyph
chellygel: ✨🍰✨
chellygel: btw, 'pipsi install em-keyboard' is super handy ;-)
chellygel: so you have enough to fix that error now?
chellygel
thank you glyph ! im onto the next issue!
yes
clokep1 joined the channel
glyph
chellygel: fantastic.
clokep1 has quit
clokep1 joined the channel
chellygel
i may not have nailed it 100% but i definitely have a new error thats further down the line about the connections not having any certs that can be used
thank you, again! i have a much better understanding of how to review this now
glyph
Looking forward to landing :)
chellygel
keep seat belts on, turbulence !
haha
glyph i did it -- it not works
it now*
i am still sturggling with the callbacks though. i think i will take some time searching for a good set of examples to play with them
perhaps a tutorial somewhere
if anyone has any recommendations for a good tutorial, let me know -- otherwise im at the hands of google's excellent recommendations haha
Okay! travis is running, i ran trial locally and i think i discovered something else error wise -- but i have to relocate from [friend's coffee house] to [my personal cave]
thank you derwolfe ! i will use this once im set back up!
terrycojones has quit
tonythomas has quit
LionsMane has quit
mat^2 joined the channel
adourado
I'm getting a "Twisted-16.4.0-cp27-none-win_amd64.whl is not a supported wheel on this platform" on a windows 7 machine, but the control painel shows it as 64 bits, anyone has any ideas what can be happening?
Also, I'm in a virtualenv
I thought it was weird that with pip install twisted it was downloading the source distribution, so I tried to download the wheel myself, and this happened
pa joined the channel
terrycojones joined the channel
chellygel
well the code is passing but i have a metric shit ton of pyflakes stuff to fix! wee hahaha
kenaan
glyph reviewed <https://tm.tl/#8505> - Build pypy on Travis-Ci with coverage reports (assigned to adiroiban)
cyphase joined the channel
glyph reviewed <https://tm.tl/#8764> - Twisted should be versioned as year.month.patch, not year.release-1.patch (assigned to hawkowl)
adourado
so, turns out I was running python 32 bits on windows 64