Thursday, 2013-06-27

*** tpb has joined #timvideos00:00
CarlFKfew = 30 i guess :)00:24
parxthe first line... haha00:25
parxSee the event link I pasted above? 18 rsvps00:29
parxAccount for inevitable no-shows, you'll have a dozen.00:29
CarlFKI 1/2 hope he calls it off00:30
parxI think it won't be worth it for you and I think it will be bewildering for his attendees.  It's Chicago Developers Happy Hour.00:31
parxThat one guys comments says it all.00:31
CarlFKdid you see the "wished we had"  thing ?00:31
parxThis is the feedback he's referring to
tpb<> (at
parx"this was the best meetup I have ever been to in my life. "00:32
parxBut back to the upcoming event listing, one guys commented "was really only interested in the drinking of beer and hanging with like minded people.  I'll wait for another one like that."00:34
CarlFKyeah - I am leaving it up to Chad -  I like the "do you want to use up your freebee on this?"00:36
parxyeah, I like that you threw that in there00:37
parxA freebie of value, not to be squandered ; )00:38
*** mithro has quit IRC00:40
parxI was surprised VentureShot was hosting and it was free.  Most of the meetups at VentureShot are ticketed $30, $20, $10.00:43
parxI'm still leaning toward the other meetup tomorrow.  Video/discussion:
tpb<> (at
CarlFKyeah - no prob - I can do the Dev thing alone - it's nice having a 2nd person and you might find stuff entertaining01:07
Sewarlol, Google is getting lower in standards just to raise numbers of + victims01:13
SewarYou can make Hangout video call, but need + account to receive one!01:14
parxugh... I hate being forced to make more accounts01:15
CarlFKhow would you receive without an account ?01:16
CarlFKlike who is the caller calling ?01:17
*** parx1 has joined #timvideos01:17
parx1boo... browser crashed.  Did I miss something?01:17
CarlFKoh, +.. as in g+. not just a google/gmail account ?01:17
parx1yeah google plus01:18
CarlFKmeh.. still low on my list of things I care about01:18
Sewaryeah, you get invite, if you accept it you get redirected to g+ joining page01:18
parx1Sewar, I deleted my google + account some time ago (what was the point of it?), but then I swapped from Skype to Google for chats.01:18
parx1I was forced to make a new Google Plus account.01:18
Sewarthat sucks01:19
*** parx has quit IRC01:19
Sewarthey just want to collect more data ...01:20
*** parx1 is now known as parx01:20
CarlFKI bet they want to do more than just that :)01:21
Sewaryeah ;)01:21
SewarI was doing test with 2 accounts on chrome and firefox, not sure if that has anything to do ...01:21
Sewartesting from chrome to tablet works fine01:22
Sewarmaybe they only force g+ in gmail right now01:22
parxWhen video chat problems comes up as a subject, iiie alludes to simple webrtc as the solution.  Fix all the things already, iiie!01:22
* iiie really wishes he had the time01:23
parxSewar are you taking a summer course?01:32
parxHas it started?01:32
SewarIt will finish next week.01:33
parxThat's good. What subject?01:33
SewarCalculus I01:33
parxIs there another course after that during the summer?01:34
SewarI won't register another classes to focus on the project.01:35
parxGood. I've been wondering why you haven't been keeping up with your daily blog posts.01:37
Sewardo you know who's Rachel?01:38
parxyeah, but let's stay on track here01:39
parxwhat's going on?01:39
Sewar"what's going on?" about?01:39
parxwhy haven't you been posting daily?01:40
SewarClass and homeworks, and to post finished tasks when they're done.01:40
Sewarmorning mithro-work01:41
parxhiya mithro01:42
SewarI will try to improve in that regard parx01:42
parxSewar, Great!  You shouldn't be waiting to finish a task before you post. Let us know that you are toiling away, and what you're working on.01:44
Sewarok :)01:44
CarlFKSewar: if you are stuck on something for more than a day, posting about it is a good way to get un-stuck01:46
parxOtherwise I might make the mistake of thinking you're not working at all, and I very much want to give credit where credit is due.  More importantly, your mentors need to see when you get stuck.01:46
CarlFKoften just working though the details of what to write will bring the problem into view01:46
CarlFKand yeah, we need to know you are doing stuff01:47
Sewarsure, good thoughts to keep in mind01:48
parxoh great tip about writing, CarlFK01:48
parxSewar you've done a good job of being present on this channel and accessible : )01:49
parxyou've been more visible than the other students, I think01:49
Sewartimezone and znc helps :p01:50
Sewarthanks parx and CarlFK01:52
parxThanks to you too.01:52
SewarIf you have time, take a look at and tell me if I'm doing something the wrong way.01:57
tpbTitle: sewar/edid_db_website · GitHub (at
parxSewar, while you are at the top of the class in attendance, you should know that another student is currently beating you in the corny joke category.01:57
Sewaryeah, I always blame my English for that!01:58
parxno excuse!01:58
SewarDid I miss any earlier?01:58
parx(the other student is not a native english speaker either, I don't think)01:59
parxnot today01:59
* Sewar looks for class on corny jokes02:00
parxI suppose memes are acceptable too02:00
CarlFKSewar: can you add this to the bottom of your settings.py02:00
CarlFKtry:    from local_settingsimport *02:00
CarlFKexcept ImportError:    pass02:00
CarlFK  like that02:01
tpb<> (at
CarlFKit will let me override your db = mysql, so I can use sqlite to do testing02:02
SewarCarlFK: done02:04
* Sewar is lost trying to understand parx hints02:05
parxSorry, do you know what a meme is?02:06
parxI was kidding about you using a quickmeme instead of a corny joke to entertain us admin & mentors.02:08
*** shenki has quit IRC02:08
Sewaroh, you refer to game of thrones's brace yourselfs meme?02:08
* parx shamefully admits it, "My name is parx and I like memes."02:10
*** shenki has joined #timvideos02:10
Sewarno shame in that!02:10
Sewarthat reminds me, I still haven't seen last 2 of GoT, heard that episode 9 was epic02:10
parxafraid to say anything and spoil it for you02:13
Sewaryes please, no spoilers ;)02:15
*** hyades has joined #timvideos04:32
*** iiie has quit IRC04:34
hyadesmithro: what is the correct method you guys use for reverting back to a commit.04:58
hyadesi tried out something yesterday, but i ended up loosing some commits04:58
CarlFKloosing some commits?05:01
CarlFKfrom what I hear, it is hard to destroy history in git05:01
tpb<> (at
hyadessee here05:02
hyadesi had some 6 commits made on 26th05:02
hyadesso I decided to go back to 25th05:02
hyadesto the "added comments" commit05:03
hyadesas you can see those 6 commits on 26th are missing05:03
hyadesi was following some answer on stackoverflow05:04
CarlFKdo you have those steps handy?05:06
hyadesone sec05:06
CarlFKI am not at all a git expert.. but I may recongize what happened05:07
CarlFK#git and #github are sometimes helpful05:07
parx+1 for the good suggestion CarlFK05:07
CarlFK#git often refers you to a section in the git book, but that sometimes wroks out :)05:07
hyadesbtw i was using this answer05:07
tpb<> (at
hyadesthe first answer out here05:08
hyadesbut I don't have a commit like "Revert to xyz" in my history05:09
CarlFK"undoing all the intermediate commit"05:10
CarlFKI think that's the same as "loosing some commits"05:10
CarlFKisn't that what you wanted?05:10
hyadesI actually made some mistakes05:11
hyadesso I wanted to go back, but was not sure where exactly to go back05:11
hyadesbut the result was that I lost everything I had done yesterday05:12
hyadesi remember there was some way to get a commit like "Revert to xyz" on top of all those commits I want to ignore05:12
hyadessorry forgot to mention that I did a stupid git push -f after that05:16
CarlFKthere are GUI git repo explorer tools that might let you see what you still have05:18
parx(hyades, just pointing out that mithro is on an alternate nick right now. When you start typing a nick, you can press tab and it will autocomplete with the active nick.)05:18
CarlFKI suspect it may be better to just re-do what you lost.. instead of spending time trying to figure out if git has it, then re-doing it05:19
CarlFKwhich really sucks.. but such is life05:19
hyadesi did that again.. i just want to know so that I follow the correct method from next time05:20
hyadesmithro-work, how to correctly revert commits?05:21
hyadesparx, thanks for that :)05:22
Sewarhyades: you can just fix the problem and commit again05:22
*** mithro has joined #timvideos05:23
parxGlad you asked the question.  I'd like to know the right answer, so let me know if you find help in one of the channels CarlFK recommended.05:23
*** mithro has quit IRC05:28
CarlFKhyades: I am not sure what you really wanted ... sounds like you wanted to revert some changes but not all.05:30
hyadessay i have commits 1,2,3,4,505:31
hyadesso i want to go to say 2, so my final commit history should have 1,2,3,4,5,"revert to 2"05:31
hyadesit should not loose the commits 3,4,5 from history05:32
CarlFKwhat do you mean "go to 2" ?05:33
hyadesi should have contents as they were at 205:33
*** iiie2 is now known as iiie05:36
CarlFKyeah - I think at that point you wanted to make a branch, edit/commit and then merge that back into 505:36
CarlFKbut I have never done that.. so I should stop talkng ;/05:36
iiie"git checkout -b my-new-branch-from-2" ; "git checkout 2" [2 is standing in for the sha, first 8 characters should do]05:38
iiieyou could also do "git checkout -b my-old-branch-from-3-4-5; git checkout what-your-branch-is-named; git reset 2"05:39
iiiebut it has to do with what the history out in the world is05:39
iiiedon't break other people's branches (or their clones of your repo)05:40
hyadesyeah that would work05:40
iiiewhat branches do you have so far?05:40
hyadesi just have one05:41
iiie"git branch -avv" shows all branches05:41
hyadesok three in total, im working on one05:41
iiieso the problem with reset for branches that have already been pushed to a remote repo (github, wherever) is that if you force it to overwrite branch history, other people's clones now break05:44
iiiewhy do you want to revert to 2?05:45
iiiewhat are you saving 3,4, and 5 for?05:45
hyadessome errors i made in 3,4,505:45
hyadeswas not sure what was causing the errors05:45
iiieI'd make a new branch from 2 and run from there05:46
hyadesok...and later you use merge?05:46
iiiegit checkout 2; git checkout -b my-new-start05:47
iiiemerge or rebase yes05:47
hyadesokay :)05:47
iiiebranches are very cheap, you can have local working branches that you never push, that are solely to verify that branches merge cleanly05:48
iiiefor throwaway branches I often include the date (or month and year) so that I know quickly which branches to delete05:49
CarlFKtoday is Thursday? (just turned )05:51
hyadesits surely Thursday here05:52
iiieFriday here05:53
iiieno still Wednesday05:53
*** tpb` has joined #timvideos07:27
*** iiie has quit IRC07:35
*** shenki has quit IRC07:35
*** mithro-work has quit IRC07:35
*** tpb has quit IRC07:35
*** Sewar has quit IRC07:36
*** CarlFK has quit IRC07:36
*** tpb` is now known as tpb07:36
*** shenki has joined #timvideos07:37
*** Sewar has joined #timvideos07:37
*** iiie has joined #timvideos07:37
*** CarlFK has joined #timvideos07:37
*** mithro-work has joined #timvideos07:37
mithro-workhyades, did iiie help you with your bit question?07:52
hyadesmithro-work, yes07:53
mithro-workIt's really hard to "loose" commits07:55
mithro-workI also recommend the graphical tool gitk07:55
mithro-workgit won't throw them away until a git gc runs07:56
mithro-workso it just about figuring out what the commit sha1's where to resurrect them07:56
mithro-workThere is a thing called the reflog which is really useful for finding commits you accidently lost references too07:57
hyadestrying out gitk :)07:58
mithro-workIt is always good to create temp branches too08:07
*** mithro has joined #timvideos08:23
*** hyades_ has joined #timvideos09:41
*** hyades has quit IRC09:41
*** hyades_ is now known as hyades09:42
*** shenki has quit IRC10:04
*** shenki has joined #timvideos10:06
*** shenki has quit IRC10:41
*** shenki has joined #timvideos10:43
*** shenki has quit IRC11:17
*** shenki has joined #timvideos11:18
*** bananadine has joined #timvideos12:39
bananadinehey @mithro, so i'll have to find a way to get the code for hostname called?12:42
mithrobananadine, yes12:45
bananadinearrgh, i can't figure it out13:24
mithro-workbananadine, why not?13:25
bananadinei just can't13:34
bananadinedon't know how to get it called before the test13:34
mithro-workcall it in the constructor?13:48
bananadinecan't seem to find any constructor13:53
bananadineshould i write one?13:53
mithro-workmake sure you call the parent constructor too13:54
bananadine i just wrote this simple constructor14:07
bananadine    def __init__(self, banana):14:07
bananadine        StreamerTestCase.__init__(self)14:07
bananadineand the test passed14:07
bananadinebut i don't think it's right14:12
tpbTitle: [Python] # -*- test-case-name: flumotion.test.test_component_httpstreamer -*- # vi:si:et - (at
hyadesbananadine, you can try out something like super also14:18
hyadessuper(StreamerTestCase, self).__init__()14:19
bananadineit does the same job14:20
bananadinethe test passes14:20
bananadinefor something called runTest14:21
bananadinewait i'll show you14:21
tpbTitle: [email protected]:~/Downloads/flumotion$ python -m unittest flumotion - (at
hyadesmithro-work, those strange patterns i was getting was due to a typo :\14:35
hyades"heigth" for "height"14:36
mithro-workcan't do DCC14:43
hyadesi mailed you14:44
mithro-workA .data file?14:46
hyadesu can try out vlc14:46
hyadesit "pretty" now :P14:46
mithro-workmplayer works14:46
mithro-workjust looks like an AVI file14:46
mithro-work$ file ~/Downloads/record\ 2013-06-27\ 201241.data14:47
mithro-work/usr/local/google/home/tansell/Downloads/record 2013-06-27 RIFF (little-endian) data, AVI, 300 x 200, 30.00 fps, video:, audio: (stereo, 48000 Hz)14:47
mithro-workbananadine, need help before I go to bed?14:48
mithro-workI got about 12-15 minutes14:48
bananadinei wrote14:48
bananadinelook up in the chat14:48
mithro-workwhat is your change?14:49
bananadinedef __init__14:50
mithro-workbananadine, if you wrote "def __init__" it would syntax error14:50
mithro-workplease give me the full context14:50
mithro-workalso doesn't tell me which file you modified14:51
mithro-workor what you put in the __init__14:51
mithro-workplease be *descriptive*14:51
bananadine    def __init__(self, banana):14:51
mithro-workI can't read your mind, see your computer or know what state things are in14:51
bananadine            StreamerTestCase.__init__(self)14:51
bananadinei'll paste diff now14:52
tpbTitle: [Diff] diff --git a/flumotion/test/ b/flumotion/test/test - (at
mithro-workand if you apply the reverse of that patch it goes back to failing?14:53
mithro-workhyades, looks good14:54
mithro-workhyades, what is your goal to achieve by the end of this week?14:55
hyadesit was to make all classes which will be later populated and give some structure to the API14:56
bananadinemithro-work yea, it gives me the AttributeError for hostname14:57
hyadesi am doing some parts which were ahead in timeline so that i understand the structure better14:57
mithro-workokay - my guess is that you are getting an exception when you try and construct the TestStreamDataNoPlug/TestStreamDataPlug testcases are created and trial is ignoring that for some reason14:58
mithro-workhyades, by now your timeline is probably about 90% wrong - that is pretty normal14:58
mithro-workhyades, so I'd recommend doing a blog post about update/changes to it and what you plan to do next week14:59
bananadinedon't know if you saw this earlier, but when i run the test i get this
tpbTitle: [email protected]:~/Downloads/flumotion$ python -m unittest flumotion - (at
mithro-workbefore or after?15:00
bananadineafter i wrote the constructor15:01
mithro-workand before?15:01
bananadineit failed giving me the AttributeError15:01
bananadinefor hostname15:01
mithro-workagain - full output please15:01
mithro-workit is unlikely you'll ever give me *too much* information15:03
bananadinebefore i got this when i ran the test:
tpbTitle: [email protected]:~/Downloads/flumotion$ trial flumotion.test.test_co - (at
bananadineafter i apply this:
tpbTitle: [Diff] diff --git a/flumotion/test/ b/flumotion/test/test - (at
bananadinei get this:
tpbTitle: [email protected]:~/Downloads/flumotion$ python -m unittest flumotion - (at
mithro-workand that is the *only* thing you are changing?15:05
mithro-workwhat is your commit sha?15:12
mithro-workbananadine, umm15:13
mithro-workin the before case15:13
mithro-workyou are using tral15:13
mithro-workand the in the after case you are using unittest....15:13
bananadineit's both in the same paste15:14
bananadinethe unittest got copied by accident15:14
bananadinebut anyway15:14
bananadinethey both pass15:14
mithro-workwithout your patch I get different output15:15
bananadinecan you show it to me?15:15
mithro-workbut after your patch I get the same output as you15:16
bananadinewow, some patch i made :P15:17
mithro-workOkay I know what is going on now15:19
mithro-workso why did you add a "banana" argument to __init__ ?15:19
bananadineif i only have one argument i'll get15:20
bananadineTypeError: __init__() takes exactly 1 argument (2 given)15:20
mithro-workand then what do you do with that 1 argument?15:21
bananadinewith banana?15:21
bananadinei don't do anything15:21
mithro-workwhat use to happen?15:22
mithro-workwithout your __init__ method?15:22
bananadinei get the attribute error15:22
bananadineexceptions.AttributeError: 'MultifdSinkStreamer' object has no attribute 'hostname'15:23
mithro-workYour thinking at the wrong level15:23
mithro-workwhen you remove your __init__ function how does the code change?15:24
mithro-workWalk through it in your mind15:24
bananadinewell, i guess i don't have a constructor15:25
mithro-workwhat would the *default* constructor do?15:25
bananadineit should create an object15:26
mithro-workthat is what __new__ actually does under python15:30
mithro-workbut your still missing something15:30
SewarI use vps to run tests, it was down around 9 hours yesterday, and now it gives me werid errors15:31
* Sewar wastes his time fixing his vps :(15:31
mithro-workSewar, you can't run them locally?15:31
SewarI can, but I thought it would be better to a website on linux server15:32
*** hyades_ has joined #timvideos15:32
Sewarinstalling mysql and all other stuff15:32
Sewarand as you know I will have Windows-only bugs to fix too15:32
mithro-workdjango works perfectly fine with sqlite?15:32
Sewaryeah, but I like mysql mature tools to play with structure/data15:33
mithro-workyour mentor is likely to test your code on this local computer15:34
*** CarlFK has left #timvideos15:34
mithro-workso might want to make sure it's supported :)15:34
Sewarsqlite will make me kill runserver before touching .sqlite file15:34
*** hyades has quit IRC15:34
Sewarit should be, that's Django job ;)15:35
*** CarlFK has joined #timvideos15:35
SewarWill try to fix it for some time, otherwise will move to another server or local15:36
bananadinemithro-work the constructor should do something when the class is instantiated , in this case i'm calling the __init__ method of the ancestor class StreamerTestCase15:36
bananadineand StreamerTestCase doesn't seem to have such method15:36
mithro-workyour still missing it15:37
mithro-workwhat would happen to the banana argument in the default case?15:37
* iiie is up for sqlite, mysql, or postgresql "locally"15:37
mithro-workotherwise I'll have to install them too15:37
iiiefine fine15:38
bananadinewhat is the default case?15:38
iiiealso I saw a commit that enabled local_settings in settings15:38
iiiebananadine: what's the value of banana if no argument is given?15:39
Sewaras per CarlFK request15:39
iiieSewar: right, which solves the database settings, so long as it's tested in the other mode15:39
hyades_bananadine, i got a similar error sometime back "TypeError: __init__() takes exactly 1 argument (2 given)"15:40
bananadinei have no idea what's the value of banana if no argument is given15:40
iiiein python arguments can have default values15:41
hyades_its related to the constructor of the class from which it was inherited15:41
iiiedef my_method(arg1, arg2, arg_with_default="blah")15:41
Sewaryeah iiie15:41
mithro-workthat is all red herrings though15:41
mithro-workif a class doesn't have a constructor, the parent constructor is called right?15:42
* Sewar is leaving, back in 30-ish15:42
mithro-workthe part you are missing is that *with the arguments given*15:42
iiiesure, and you usually want to call that constructor too (super(ParentClass,self).__init__(*args, **kwargs)15:43
mithro-work+    def __init__(self, banana):15:43
mithro-work+        super(StreamerTestCase, self).__init__()15:43
mithro-workis not equivalent to not having a constructor15:43
mithro-workbecause you are not passing banana through to the parent class15:43
bananadinewhat should i do with banana?15:44
CarlFKmorning folks15:44
mithro-workwhat happens *by default*?15:44
iiiemorning CarlFK15:44
CarlFKis this code somewhere I can browse it?15:44
bananadineby default?15:45
*** hyades_ is now known as hyades15:45
iiiewhat I would do is grab the arguments, and pass them on, if there is manipulation to be done, do, but the parrent init needs arguments to generally be passed though to it15:45
iiie*parent *through15:46
bananadinethe parent to TestStreamDataNoPlug and TestStreamDataPlug is StreamerTestCase15:46
bananadineas i can see15:47
CarlFKwe need more cooks...   where is the code that uses this class?15:47
bananadinethe parent doesn't have an __init__15:47
hyadesCarlFK, lol15:47
mithro-workbananadine, so keep going up the stack15:47
bananadineStreamerTestCase inherits from testsuite.TestCase15:47
bananadineTestCase has an __init__15:48
bananadineand it does some stuff15:48
iiiewhat does that take as arguments?15:48
bananadinedef __init__(self, methodName=' impossible-name ')15:49
iiiethatare what TestStreamDataNoPlug and TestStreamDataPlug need then15:49
bananadineand the default is  impossible-name15:49
iiieright, which means when called that methodName is replaced15:50
bananadinemethodname is replaced with banana15:50
iiieyes, but you need to pass it to super().__init__15:50
CarlFKbananadine: where is the call.. I think if you knew what was passing a value to banana it would click15:50
mithro-workyou could print them out for banana for example15:51
CarlFKyou added banana because some code was trying to pass a parameter... lets see that code15:51
bananadine    def __init__(self, banana):15:52
bananadine        super(StreamerTestCase, self).__init__(banana)15:52
mithro-workbananadine, yes that is what the default __init__ method would do15:52
iiiegreat, retest with that15:52
CarlFKwhat class is that from?15:52
bananadinei retested with that15:53
bananadineand i'm back to square one15:53
CarlFKah.. not talking to me ;)15:53
bananadinesorry CarlFK15:53
bananadinei'm back to where i was before i wrote the __init__ method15:53
CarlFKpull banana, run, pastebin the stack dump15:54
bananadineand that's here
tpbTitle: [email protected]:~/Downloads/flumotion$ trial flumotion.test.test_co - (at
iiiehm, well then sometimes it's called without arguments, so you need either positional arguments (*args) or keyword arguments (**kwargs)15:54
mithro-workbananadine, so basically stopping the argument being given to the base class is what was/is causing your tests to pass15:54
mithro-workso you should be able to go onwards from there15:55
bananadineok great15:55
bananadinenow i need to make the method that generates hostnames to run15:55
CarlFKI think you should really know what the thing is that is causing all this ruckkus - if you knew, it wouldn't be called banana15:55
bananadineYea :D15:56
* iiie finally notices that the class under discussion is testing code....15:56
bananadineok, now i'll have to import the Streamer class from in the test since there's the method parseProperties in which a hostname is generated16:08
bananadinecan i make it with adding Streamer.parseProperties() in the __init__?16:14
CarlFKcan you give me the URL to the code repo?16:15
tpbTitle: bananadine/flumotion · GitHub (at
* iiie is off to work, will be on in 25 minutes16:21
*** iiie is now known as iiie216:22
CarlFKoh, I got lost trying to find where banana came from :)16:45
bananadinenah banana is not important16:45
bananadinei mean the name16:45
bananadinei just put it16:46
CarlFKWhat is the class foo(bar) line fro (10:52:33 AM) bananadine:     def __init__(self, banana):16:46
bananadinethat's in the test_component_httpstreamer.py16:46
bananadinebut it's not on git yet16:47
CarlFKI know where the line is...16:47
CarlFKnow tell me the line :)16:47
bananadinesince i haven't done anything with it i didn't think it's worth a commit16:47
CarlFKand now I know why the line isn't in git...16:47
CarlFKhow about just giving me the line ? :)16:48
bananadineshould i commit it?16:48
*** parx1 has joined #timvideos16:48
CarlFKit's one line.. paste it here16:48
mithro-workCarlFK, ssshhhhh16:48
mithro-workhe is trying to actually get something done16:48
CarlFKmithro-work: um.. he is stuck I think16:49
bananadineyea i'm stuck16:49
mithro-workbananadine, what are you stuck with now?16:49
bananadinei imported the Streamer class from in the test16:49
*** parx has quit IRC16:50
bananadinesince the method which generates the hostname is in there16:50
*** parx1 is now known as parx16:50
bananadinethe methods name is parseProperties16:50
bananadineso i was trying to figure out how to call that method16:50
CarlFK can I get the class line?  mainly I want to know what you are subclassing16:51
bananadinein the __init__ method in the test class16:51
bananadineclass TestStreamDataNoPlug(StreamerTestCase):16:51
mithro-workwhy are you calling it in the __init_- method of the test class?16:51
mithro-workThe problem is hostname not appearing on the object you are testing16:51
mithro-worknot on the test itself16:51
bananadinei though that's how i can call the code before the test runs16:52
*** iiie has joined #timvideos16:53
mithro-workyou want to actually fix the code so it works when someone uses the code outside the test16:53
mithro-workthe test is showing you it is broken16:53
mithro-workso nothing you should be doing is specific to the test16:53
bananadineso actually i dont need the __init__ method i wrote in the test16:54
mithro-workyou probably need an __init__ method somewhere - but the test case doesn16:54
mithro-workt need it16:54
bananadinei should try the module the test is testing?16:54
CarlFKoh.. are you writing a test, or using a test to test new code?16:55
mithro-workhe has a test which fails16:55
mithro-workso he is trying to fix the code the test is testing16:55
CarlFKah.. I got mixed up16:55 is only a few lines16:56
bananadinewith one class16:56
bananadinewhich only has "pass"16:56
bananadineso nothing happens in that class..16:56
mithro-workbananadine, why does it exist then?16:56
bananadineyes i'm wondering now...16:57
bananadineimport \16:57
bananadine        MultifdSinkStreamer16:57
bananadinewhat does the slash mean?16:57
CarlFKbananadine: splits long lines16:58
mithro-workYou know about inheritance right?16:58
mithro-workHTTPStreamer is getting all its functionality from MultifdSinkStreamer16:59
bananadinei get that but16:59
bananadinehttpstreamer is just that16:59
bananadinei don't get it why it exists16:59
mithro-workWhat would you rather talk about?16:59
mithro-workHTTPStreamer or "MultifdSinkStreamer"17:00
bananadinewell the error i get on the test17:00
bananadineis related to "MultifdSinkStreamer"17:00
bananadinebecause it says that  the class "MultifdSinkStreamer" has no attribute 'hostname'17:00
mithro-workand HTTPStreamer is a MultifdSinkStreamer17:01
mithro-workso you need to modify MultifdSinkStreamer to have a hostname17:01
bananadineMultifdSinkStreamer inherits from Streamer17:01
bananadinewhich generates a hostname17:02
bananadinebut MultifdSinkStreamer doesn't have it17:02
mithro-workyes, there appears to be code in Streamer which generates a host name17:02
mithro-workbut if there is no hostname being generated, then it's obviously not getting called17:02
mithro-workI don't understand why this is taking you so long? I gave you all that information above in the email17:03
bananadinewell i didn't quite get the e-mail as i got i tnow17:03
bananadineit now*17:03
bananadineit seems i'm slow in understanding thinks :)17:04
mithro-workthis is /really/ basic stuff here17:04
mithro-workit's not like the import problem17:04
*** hyades has quit IRC17:12
bananadinethis modification in MultifdSinkStreamer should be  a method which calls parseProperties?17:13
bananadinei'm writing something like this17:14
bananadine    def parseProperties(self, properties):17:14
bananadine        streamer.Streamer.parseProperties(self,properties)17:14
bananadinecorrect me if i'm wrong17:14
mithro-workwhy are you writing that17:14
mithro-workwhy do you think that would work?17:14
bananadinedoes not that call    parseProperties?17:15
mithro-workyes it does17:15
mithro-workbut what calls it?17:15
bananadinea method with the same name i'm writing in MultifdSinkStreamer17:15
parxhi mithro-work17:16
parxhi banandine17:16
bananadinehi parx17:16
Sewarrecord for future: I was getting MemoryError during Django import, solution: delete all *.pyc17:16
parxcrap typing already in the day, sorry17:17
bananadinede nada17:17
parxmithro-work: weren't you going to bed hours ago?  must be tired!17:19
bananadinei'm keeping him awake because of my ignorance :)17:20
mithro-workI should be in bed17:20
parxget to sleep17:20
parxbananadine, I want you to do a better job of asking your questions with full detail *from the beginning*17:21
mithro-workwe've already been through that bit17:22
mithro-workparx, poke me to put the logs up somewhere17:22
mithro-workthey are being recorded just not published17:22
parxI saw... more than once17:22
bananadinei'm going to take a shower and when i return i'm going to annoy parx about things i don't understand yet17:27
mithro-workwell, I'm heading home now17:41
mithro-worklooked at digital video signals for long enough to do my head in...17:41
CarlFKas in, you aren't home?17:41
mithro-worksee ya!17:41
mithro-worknope, I'm at work17:41
CarlFKyeah, get going17:41
CarlFKno sleeping until you get there17:42
bananadineso parx did you read the log or should i give a long form question with full detail?17:50
iiiebananadine, the current problem is the hostname attribute not being on the tested object in the test case right?17:52
iiiebut the object has a method to make the hostname attribute; which means that code isn't being called before the attribute is needed17:53
iiiecan you link to the testcase, and the class mentioned in the testcase failure?17:53
bananadineso i wanted to make a method in MultifdSinkStreamer  to call the code17:54
bananadinei'll do it17:54
bananadinejust a minute17:54
iiieSo one of two problems, either the testcase doesn't setup the object correctly or the object's methods aren't quite what they should be17:55
bananadinethe test:
tpb<> (at
bananadinethe class mentioned in the failure17:56
tpb<> (at
bananadinethe code for a hostname:
tpb<> (at
bananadinei think it's  that the object's methods aren't quite what they should be18:01
iiieSo looking at those, Stats has __init__; parseProperties is called in configure_pipeline, but nothing callse either parseProperties or configure_pipeline18:02
iiieWhich testcase is failing?18:04
bananadinethere are only two18:04
bananadinethe first fails18:04
bananadinethe second skipps18:04
bananadineand the skip is due to the indent18:04
bananadineyou can see that18:04
bananadinei think it's left there with intention18:05
bananadineas it points to see something18:05
bananadineTestStreamDataNoPlug fails to be more precise18:05
bananadineand the other one18:05
bananadineTestStreamDataPlug gets18:05
bananadine    testGetStreamData.skip = 'See #1137'18:05
bananadineso it skipps18:06
iiieAnd the failure in TestStreamDataNoPlug has line 51 self.component = httpstreamer.MultifdSinkStreamer(config) in the trace right?18:06
iiieOr line 64 component.getStreamData() ?18:07
bananadineline 6418:11
tpbTitle: [email protected]:~/Downloads/flumotion$ trial flumotion.test.test_co - (at
bananadinehere's the full output18:12
bananadinethe skipped test got skipped even before i started porting18:13
bananadinethe one that fails (gives error) is after i ported18:14
bananadinebefore it was fine18:14
bananadineit passed18:14
iiieRight, looking at
tpb<> (at
iiieit doesn't use self.hostname, it has "localhost"18:15
bananadinethat's wrong18:15
bananadinethe test passes18:15
bananadinebut it's wrong18:15
bananadinethat's why i'm trying to fix it now18:16
*** shenki has quit IRC18:16
bananadineso i can return it to self.hostname and that it works18:16
iiieright, so what we need is self.component.hostname set before self.component.getStreamData() is called18:17
bananadinebecause if self.component.getStreamData() is called first no hostname is set18:18
iiiemy recommendation is either parseProperties or configure_pipeline called in the test case for testGetStreamData18:18
*** shenki has joined #timvideos18:18
iiieDo we have the arguments needed for either of those?18:18
iiieor should it have a value without being configured?  (a default)18:19
iiie calls but even then only grabs hostname out of properties passed to it18:21
tpb<> (at
bananadinebut if it worked before18:23
iiieSo there is code for guessing at hostname, could just call self.component.parseProperties({}) in test setup
tpb<$> (at
bananadinehow did i disturb it with the porting :/18:23
iiieit worked before because it getUrl didn't depend on self.hostname18:24
tpb<> (at
CarlFKbananadine: I am sure it is above, but lots of stuff is.. can I see the patch that broke the test?18:24
iiieHow about add a check in getUrl for self.hostname (if not getAttr(self, 'hostname'): self.hostname = .... )18:26
bananadineit worked before i started porting and it used self.hostname18:27
bananadinewhat i meant is18:27
iiiereally? hm, I'll look at the commit log then18:27
bananadinehow did i disturb the workings of this code with the porting18:27
bananadineok :)18:27
bananadinei'm getting somewhere18:28
bananadinei pasted the line self.component.parseProperties({}) you gave me18:29
bananadineand i got a different error18:29
bananadinei'll pastebin it18:29
tpbTitle: [email protected]:~/Downloads/flumotion$ trial flumotion.test.test_co - (at
bananadineand now18:30
bananadinei commented the lines 400 and 401  in streamer.py18:31
bananadineand the test passed18:31
bananadineok so now i got to make those lines work with the test18:31
* parx wonders if bananadine missed Carlfk's request18:32
tpb<> (at
bananadinesorry again CarlFK18:32
bananadineit's not just a patch i guess18:32
bananadineit's the whole porting process18:32
iiie mithro posted this in the comments to your commit, I'm pretty sure this is the exact same issue18:33
tpb<> (at
bananadinei saw it18:33
iiieI find it odd that the test references the tracker issue, but not the patch18:33
tpb<> (at
bananadinethis the patch?18:35
CarlFKer few min really18:36
CarlFKpfft - I looked - so the test runs/passes before that patch, fails/breaks after?18:37
bananadineafter the porting, yes18:37
CarlFK"the porting" ?18:37
bananadinei'm porting flumotion to use gstreamer 1.018:38
CarlFKwhat version does flumotion use currently ?18:41
CarlFKso tests pass with 0.10, swich to 1.0, tests break, right ?18:43
CarlFKahh. so it's not like you broke the test.. I'm slowly catching on18:44
bananadine i made a call to self.component.parseProperties({}) in test setup
tpb<$> (at
bananadineas iiie suggested18:45
bananadineand now i lost the error related to hostname18:45
bananadinebut i got another one instead18:45
tpbTitle: [email protected]:~/Downloads/flumotion$ trial flumotion.test.test_co - (at
iiieRight, I'm not sure that getDataStream() make sense without starting the / configuring the component18:46
CarlFKiiie - what are your thoughts on changing the tests ?18:46
iiiechanging the test was a test to see if the component just needed more setup18:47
CarlFK<philological academic discussion>18:47
CarlFKwhy not do that in the component's init?18:48
iiieI don't know how it could have worked before unless something somewhere called one of those too functions to configure the component18:48
CarlFKknowing how it worked before seems like a good thing to know :)18:48
iiielooking through the history of commits I don't see how component.hostname was set before getDataStream was called18:48
iiieagreed on knowing how it worked before being helpful18:49
bananadinesame as now18:50
bananadinethe only change is that18:50
bananadineinstead of import gst18:50
bananadinei'm using18:50
bananadineimport gi18:50
bananadinegi.require_version('Gst', '1.0')18:50
bananadinefrom gi.repository import Gst18:50
bananadineand replaced every occurrence of gst.* to Gst.*18:51
bananadineat least in the modules associated with this test18:51
bananadinecould it be somehow18:52
bananadinethat i commented a line in feedcomponent.py18:52
bananadine#import gst.interfaces18:52
CarlFKbananadine: go back to the test passing, and try to figure out how component.hostname was set18:52
*** rihnapstor has joined #timvideos18:58
bananadineCarlFK:  the hostname is set with  self.hostname = properties.get('hostname', None)18:59
CarlFKput a raise before that, run the test, lets see the stack dump at that point18:59
CarlFKthat might show us what we are missing19:00
bananadinesorry but19:02
bananadinewhat's a raise?19:02
iiieraise Exception('Look a banana!')19:02
CarlFKit's a poor mans break point19:04
CarlFKyou could just do "foo" and let it error, but raise makes it clear what the point is19:04
iiiewell, it does tend to give a stack trace, which is nice19:04
bananadinewhen i put it right before self.hostname = properties.get('hostname', None)19:06
bananadineit just get's passed19:06
bananadineor it doesn't even go there19:06
CarlFKURL of the original  self.hostname =  code?19:07
iiiethere you go, print self.hostname just before the if19:07
bananadinei added the exception right above this
tpb<> (at
bananadineand i get the same thing i got in the begining19:09
bananadinebeginning *19:10
iiieTry putting it in getUrl19:10
iiieI'm quite sure that parseProperties isn't called19:10
bananadinewell yea19:11
bananadinei'm sure too19:11
bananadinesince the exception didn't show up19:11
bananadinewhen i put it in getUrl19:11
bananadinei get it19:11
tpbTitle: Ran 2 tests in 0.013s FAILED (skips=1, errors=1) [email protected] - (at
bananadineif i add self.component.parseProperties({}) after this line
tpb<> (at
bananadinei call parseProperties19:15
bananadineand when i raise before self.hostname = properties.get('hostname', None) in streamer.py19:16
bananadinei get this19:16
tpbTitle: [email protected]:~/Downloads/flumotion$ trial flumotion.test.test_co - (at
bananadinenow it works but without the avatarId19:21
bananadinein other words19:21
bananadineif i comment lines 400 and 401
tpb<> (at
iiiehang on, the only reason 400 and 401 is because the test setup now has parseProperties19:23
bananadinei know that19:23
iiiewe want to test the pre-ported code and see how component.hostname is set19:24
bananadineshould i raise in the pre-ported code?19:25
iiieyes, we want to findout where in the code component.hostname is set, so that we can do the same (or equivalent) thing19:27
bananadinewhen i put the raise after this line
tpb<> (at
bananadineand run the test19:33
bananadine(i'm talking about the pre-ported code)19:33
bananadinei get19:33
tpbTitle: [email protected]:~/flumotion$ trial flumotion.test.test_component_ht - (at
bananadinewhich looks exactly like what i get on the ported code19:33
bananadineand it doesn't show the exception :(19:34
iiietakeout the raise, re-run the test, it'll fail the same because it doesn't run parseProperties, which means hostname isn't set19:35
bananadineit didn't fail19:36
iiiethe pre-ported code without a raise in parseProperties passes that test?19:37
iiiebut with the raise doesn't actually show the exception?19:37
iiieinstead of the raise put "print 'yes this function runs'" see what that gets19:38
* iiie hopes nothing is gobbling standard out19:38
bananadine  TestStreamDataNoPlug19:41
bananadine    testGetStreamData ... yes this function runs19:41
bananadine                                                 [OK]19:41
*** rihnapstor has quit IRC19:41
iiieI'd lean toward just fixing it for the unconfigured state which is what the test runs then.  Something in the older gst must be running parseProperties (or configure_pipeline)19:46
bananadinewhat you mean by "unconfigured state"?19:49
iiiethe test setup makes an instance of the stream class, but doesn't configure it.  (calling parseProperties or configure_pipeline on the component -- component under test....)19:51
bananadineit doesn't have to be the test setup19:52
bananadinei can place it in testGetStreamData and get same results19:52
iiieWhat's the basic usage?  What's the expected behavior?  Should getDataStream work without the stream being started?19:54
iiieso somehow before config was passed to parseProperites...19:55
bananadinebut how19:56
iiiemaybe streamer.Stats.__init__19:57
bananadinehow about through this
tpb<> (at
* iiie smacks self in head20:05
iiielet's review what we've learned20:05
iiieThe pre-port works20:06
iiieThe post-port has an issue with hostname20:06
iiieadding an exception to the pre-port code makes it react the same as the post-port code, but does NOT raise the exception20:07
iiieSo there is (or was) magic somewhere that did run the parseProperties with the initial argument to the class20:08
iiielet's go back to the post-port code and add the line to the setup of "self.component.parseProperties(config)" config having been set 3 or so lines before and updated 2 lines before20:10
iiieand re-run the test20:10
iiiesorry to pick and run, but I have to get to lunch20:10
bananadineno problem20:11
bananadineif i understood you correctly i should add self.component.parseProperties(config)20:12
bananadineat the bottom of this20:12
bananadine    def setUp(self):20:12
bananadine        config = self.getConfig()20:12
bananadine        config['properties'] =
bananadine        self.component = httpstreamer.MultifdSinkStreamer(config)20:12
CarlFKbananadine: I think so.  does the test run now?20:26
CarlFKI am off for some food too.. bb in 1020:26
bananadineI get this20:27
tpbTitle: [email protected]:~/Downloads/flumotion$ trial flumotion.test.test_co - (at
bananadineyea, but what do i do with avatarId20:30
CarlFKI think you should back up and figure out how the old code works20:30
bananadinethat's what i'm doing the whole time20:32
CarlFKi would figure out what sets hostname.. and how the code gets there ..20:36
CarlFKwe know this runs home/track/Downloads/flumotion/flumotion/test/test_component_httpstreamer.py20:36
CarlFKand show how hostname gets set20:36
CarlFKseems we don't know how..20:37
CarlFKI am guessing there is someting tricky going on20:37
*** shenki has quit IRC20:39
*** shenki has joined #timvideos20:41
bananadineCarlFK as far as i can understand for now20:42
bananadinein the module there's a method parseProperties which has a piece of code that "generates" a hostname20:43
bananadinewhich is later used in another method called getUrl20:43 calls something that calls something .... that calls parseProperties ?20:44
CarlFKfind that path.. assuming that is the path20:44
tpb<> (at
bananadinei've spent the whole day trying to figure out this issue20:45
bananadinei don't think i can think much more20:45
tpb<> (at
tpb<> (at
bananadinewhich inherits20:52
tpb<> (at
CarlFKthe test framework may be making this hard20:52 inherits streamer.py20:53
CarlFKhow about running it "by hand" - know what I mean?20:53
bananadinewhich has this
tpb<> (at
CarlFK[email protected]:~/Downloads/flumotion$ trial flumotion.test.test_component_httpstreamer20:54
CarlFKthat tests something20:54
CarlFKfigure out what it is testing, and just do that yourself20:55
CarlFKmaybe run it from the python >>> prompt20:55
CarlFKtrial .. test.. all try to manage the errors so it can give you a nice summary20:56
CarlFKthat may be making it hard to understand how things work20:56
CarlFKlike I think the print "im here" got lost20:56
CarlFKlunch really now...20:56
CarlFKiiie - my current plan - pull the test out of the test framework so we can see what is going on21:02
CarlFKand eat21:02
CarlFKim going to die21:02
iiiesounds good, go eat!21:03
bananadinei'm kaput21:05
bananadineiiie if you want you can check out the chat above21:05
bananadineand see where the situation is at21:06
iiieYeah, just finished reading.  Take a break.  (when is the last time you took a break?)21:06
bananadinei doing this the whole day (8 hours at least)21:07
bananadinewith lunch breaks21:07
bananadineand a shower21:07
bananadinegoing to be away21:18
bananadineand i'll leave myself on-line21:19
bananadineif anyone finds something out, so i can read later21:19
CarlFKI found food.. still hungry but at least I won't die21:23
tpb<> (at
bananadinei think here gets hostname from Streamer21:45
bananadinesince parseProperties is called in configure_pipeline in streamer.py21:45
tpb<> (at
bananadineso i think that's the path21:46
parxsorry, Carlfk that was for you22:04
*** CarlFK has quit IRC22:34
*** parx has quit IRC22:55
*** parx has joined #timvideos23:03

Generated by 2.5 by Marius Gedminas - find it at!