IRC log of #schooltool for Sunday, 2007-06-24

ignaswe seem to be getting a lot of these, errors, and users seem to get confused by the traceback00:00
ignasshould not be very difficult00:00
ignasif you have time of course00:00
pcarduneignas: that would be a good idea00:00
ignasi know, it's not mine ;)00:01
smalekghUgh, should it be legal for someone to schedule the same course more than once for a single schedule?00:02
*** Ninno has quit IRC00:13
*** smalekgh has left #schooltool00:23
*** didymo has joined #schooltool01:14
*** didymo has quit IRC02:04
*** ignas has quit IRC02:14
*** gpaci has quit IRC03:29
*** gpaci has joined #schooltool03:44
*** gpaci_ has joined #schooltool04:02
*** gpaci has quit IRC04:06
*** gpaci_ is now known as gpaci04:12
*** jinty has joined #schooltool04:56
*** jinty has quit IRC05:33
*** th1a has joined #schooltool05:46
th1aaty pcardune?05:49
th1aayt, I mean.05:50
*** pcardune has quit IRC05:54
*** th1a has quit IRC05:59
*** th1a has joined #schooltool06:24
*** wjohnsto has joined #schooltool06:48
*** th1a has quit IRC06:53
*** E-nnovative has joined #schooltool06:56
*** wjohnsto has joined #schooltool07:31
*** E-nnovative1 has joined #schooltool07:40
*** Forexs has joined #schooltool07:46
*** Forexs has left #schooltool07:46
*** E-nnovative has quit IRC07:59
*** wjohnsto has quit IRC07:59
*** pcardune has joined #schooltool08:36
*** E-nnovative1 has quit IRC10:08
*** E-nnovative1 has joined #schooltool10:08
*** pcardune has quit IRC10:20
*** E-nnovative1 has quit IRC10:32
*** didymo has joined #schooltool10:49
*** Aiste has quit IRC10:53
*** jfroche has joined #schooltool10:56
*** jfroche has quit IRC11:02
*** jfroche has joined #schooltool11:03
*** jfroche has quit IRC11:03
*** jfroche has joined #schooltool11:03
*** jinty has joined #schooltool12:17
*** E-nnovative1 has joined #schooltool13:00
*** didymo has quit IRC13:39
*** alga has joined #SchoolTool14:49
*** E-nnovative1 has quit IRC14:59
*** mgedmin has joined #schooltool15:53
*** ignas has joined #schooltool16:03
*** wjohnsto has joined #schooltool16:38
*** pcardune has joined #schooltool16:46
wjohnstopcardune: ayt?16:50
pcardunewjohnsto: yes16:50
wjohnstoI seem to be getting this random error when I try to start my zope instance on maddog16:50
wjohnstoI don't think it has anything to do with my programs16:50
pcardunewjohnsto: what is the error?16:50
wjohnstoIOError: [Errno 11] Resource temporarily unavailable16:50
wjohnstoI'll lispaste the entire thing16:51
pcardunelisppaste5: url16:51
lisppaste5To use the lisppaste bot, visit and enter your paste.16:51
lisppaste5wjohnsto pasted "error" at
pcardunethat certainly does not have anything to do with your code16:53
wjohnstoI have no clue what happened, it was all going fine, and then I decide to move my laptop upstairs, and it all goes wrong16:53
pcardunetry delete Data.fs.lock16:53
pcardunein the var directory of your instance16:53
wjohnstonow it has some conflicting address error16:54
wjohnstoI could try getting rid of all the data.fs16:56
wjohnstoI'm going to see if Brittney's maddog still works (this error is on maddog, not local)16:57
wjohnstopcardune: Brittney's works17:00
pcardunewjohnsto: well a conflicting address error might be that there is already an instance running on the same port17:01
wjohnstoin that case I'll check17:02
pcarduneI just did and it doesn't seem that there are any other ones running17:02
pcardunewjohnsto: could you paste the conflicting address error?17:03
lisppaste5wjohnsto annotated #43339 with "New Paste" at
wjohnstopcardune: wait17:04
wjohnstoit randomly started working again17:04
wjohnstopcardune: thanks for the help, I have another question about sepg if you have time17:05
pcarduneyeah, ask away17:06
wjohnstoyesterday I told you I was having the argument error problem17:06
wjohnstowhere it said the init method only took 1, and I gave it 2 arguments17:06
wjohnstoI originally thought it was an inheritance problem from my BaseContainer class17:07
wjohnsto...and I was right17:07
wjohnstobut I couldn't figure out how to fix it17:07
wjohnstoI got past it for the time being by just making an init method in the Division class17:07
wjohnstobut it would be nice to get it fixed.17:07
wjohnstopcardune: Oh, and I took a closer look at the INameChooser interface earlier this morning17:08
wjohnstoand figured some things out/resolved my errors17:08
pcardunewell if it is a base class issue you might want to call the base classe's __init__ method before yours gets called17:09
pcarduneor rather, a common pattern with inheritcan is this:17:09
pcardunedef __init__(self, args, for, baseclass, and, your, class):17:10
pcardune    super(NameOfYourClass, self).__init__(args, for, baseclass)17:10
pcardune    ... your code here...17:10
wjohnstoI think all I need is     def __init__(self, BaseContainer):17:12
wjohnsto        super(Division, self).__init__()17:12
wjohnstoall the BaseContainer is, is an init method17:13
wjohnstopcardune: I also talked with dwelsh17:15
wjohnstoand he said that to resolve the duplicate name errors I was having, I could just append markers on the end of courses.17:15
wjohnstofor example, some courses are also "pathways," which are courses you have to take in a certain order (like computer science1&2 -- AP Computer Science)17:16
pcardunewjohnsto: well, I think it is important to decide whether those are actually accidental duplications in the xml file, or whether they are meant to be references to existing courses17:17
wjohnstofor the pathways, dwelsh told me I could just put "-pathway" on the end17:17
pcarduneyeah, that would work for now17:17
pcarduneI guess if the only use case is to read from the xml file, and just use that, it won't matter if there are duplicates17:18
wjohnstoI don'17:18
pcardunewjohnsto: the issue would only come up if you wanted to edit one of the courses... in which case you'd have to edit all the duplicates too or it wouldn't really make sense17:18
wjohnstoknow exactly why a course would be outside a pathway, if it was also a pathway, but w/e17:18
pcardunebut we can worry about that later I think17:19
wjohnstoDwelsh also said that all the divisions/clusters are set in stone by some nationwide school system17:19
pcarduneyeah, so go ahead and attach -pathway to those sorts of courses17:19
wjohnstoso they will never change17:19
pcarduneas far as changes are concerned I'm thinking about the teacher that teaches them, which could change as much as on a yearly basis17:20
pcardunebut I suppose that is really a corner case, so don't worry about it *yet*17:20
wjohnstowell actually17:21
wjohnstomost of the duplicate name errors occur with Career Center courses17:21
wjohnstoand pretty much the same teachers teach the same classes year after year in each of the courses at the Career Center17:22
pcardunethat's true17:23
wjohnstothe only time teachers change is in the Schools17:24
wjohnstoBut there really aren't any duplicate errors in the schools pcardune, because the courses aren't as "exotic" as they are at the career center17:24
wjohnstoso now I went from having too many arguments to not having enough arguments in my init method17:26
wjohnstopcardune: this error does not seem to be what I thought it was17:30
pcarduneis the code you are using accessible here:
wjohnstoin sepg.py17:31
wjohnstolet me commit first17:31
pcarduneand it is with the SEPG class?17:34
wjohnstothe SEPG class is fine I think17:34
wjohnstook haha17:34
pcarduneI think it would probably be easier if you didn't inherit from BaseContainer17:35
pcardunesince you have an __init__ method anyways17:35
pcardunejust set the title there17:35
pcarduneand call: super(SEPG, self).__init__() # that will be the __init__ method for the BTreeContainer17:35
pcarduneif you want we can gobby and I can show you a bit more of what I mean.17:36
wjohnstoI'm on my windows machine right now, let me get on my linux (right next to me)17:36
wjohnstopcardune: ok17:37
wjohnstoport 652217:38
pcardunehmm, its not connecting.  wjohnsto, did you start up sobby?17:39
wjohnstopcardune: maybe not17:41
wjohnstoI dont even know how this whole thing works17:41
wjohnstoI have to read up on it17:41
wjohnstowhenever brittney and I edit things, we just use google documents17:42
pcarduneok, it's up17:42
pcarduneconnect to on port 652217:42
*** th1a has joined #schooltool18:30
*** fsufitch has joined #schooltool18:54
fsufitchanybody know how i can contact mr welsh?18:55
fsufitchi need to get client approval of my printable forms before actually turning them in...18:55
th1apcardune: ayt?18:58
pcarduneth1a: yes18:58
pcarduneI think I'm going to agree with you on the REST stuff18:59
th1aI'm thinking that using REST might be the best approach.18:59
th1aBuy me a Coke.18:59
pcarduneI haven't said anything yet though...18:59
pcarduneat least not outloud18:59
pcardunebesides, REST will provide us with some added functionality later19:00
pcardunesay, when we want to implement a web interface using google web toolkit or something19:00
pcardunethat would be pretty f-ing cool19:00
th1aWe can also use it for import/export etc.19:00
th1aIt was always a good idea.19:00
th1aCan you make the meeting tomorrow?19:00
pcarduneI think it will be worth the extra time commitment19:00
pcarduneth1a: yes19:01
th1aIt isn't like it is breaking entirely new ground.19:01
pcardunelondon is UTC right?19:01
th1aEspecially since we'll probably start with Persons, which already have views.19:01
th1aThey just have to be updated, I imagine.19:01
th1aI can never remember if London is UTC.19:01
pcarduneso, that is 6:30am my time19:03
pcardunewhich is when I woke up this morning without an alarm clock, so I should be fine :)19:03
fsufitchpcardune: how can i contact mr welsh so i can get printable forms approved?19:04
th1apcardune: OK, I'll put reviving REST on the agenda.19:04
pcardunefsufitch: you'll have to wait till monday I'm afraid19:04
th1aPerhaps some of the other interns should sit in.19:05
pcardunefsufitch: but I would send him an email19:05
fsufitchaww :(19:05
fsufitchwhat's his email address?19:05
pcardunefsufitch: what you'll want to do is setup a running instance of cando on maddog so that he can take a physical look at it19:05
pcarduneth1a: yeah, I'll ping the ones who are taking over for Will19:05
th1apcardune: Great.19:06
fsufitchpcardune, is there a way to transfer my code from my computer to maddog using svn?19:28
pcardunefsufitch: well if you checked it in the the svn repository, then you just have to check it out on maddog19:28
fsufitchoh, right19:29
fsufitchi missed that part on the checkout page19:29
fsufitchPermission denied (publickey).19:30
fsufitchw8, nvm19:31
fsufitchthat was because of ssh:http19:31
fsufitchit works with https19:31
fsufitchpcardune, apparently checking out didn't give me the files i wanted19:39
pcardunewhat was your checkout command?19:40
fsufitch svn co cando19:41
fsufitchi copied the wrong one19:41
fsufitchactually let me try again19:42
fsufitchi might have done username@svn.schooltoo.org19:42
fsufitchit's still not there19:45
fsufitchpcardune, ping19:45
pcarduneyou don't want trunk19:45
pcarduneyou want your branch19:45
fsufitchi forgot how to access it19:46
pcarduneit should be cando/branches/name-or-your-branch19:46
pcarduneinstead of cando/trunk19:46
fsufitchi c19:46
pcarduneto see what your branch is, you can type svn info on your local machine19:46
pcardunein the checkout directory19:46
fsufitchi c19:47
fsufitchyay it's there!19:51
*** th1a has quit IRC19:52
fsufitchpcardune, is port 7080 blocked on maddog?19:59
pcardunefsufitch: yes i believe so19:59
fsufitchi need to reconfigure my port <_<20:00
*** alga has quit IRC20:32
*** mgedmin has quit IRC20:34
fsufitchpcardune, is there somewhere i can get the code for the barcode read/write?20:41
fsufitchbecause neither bvuong or brittany are online20:42
pcarduneI think it is somewhere on maddog20:42
pcardunejust type locate barcode20:42
fsufitchlocate is an actual command?!20:42
fsufitchi should learn more unix ;)20:43
pcarduneand it works instantly... not like any of those other find things20:43
fsufitchi was having trouble searching my local machine without locate20:43
fsufitchso, pcardune, where should i start on barcode integration?20:49
fsufitchi'm thinking of giving the person and the resource object "barcode" fields20:49
pcarduneyes, except that you can't modify that code20:49
fsufitchoh :(20:49
pcarduneso you'll have to use annotation adapters :)20:49
fsufitchwhat are those?20:49
ignaspcardune: still there?20:50
pcardunethey're things that let you attach "attributes" to objects20:50
pcarduneignas: yes20:50
fsufitchcool! so how can i use them?20:50
pcardunefsufitch: but they get attached as an "annotation" like "metadata"20:50
ignaspcardune: when it comes to REST, got any idea of how to have different REST views for different versions of the same object?20:51
fsufitchis there an example of them that i can see?20:51
pcarduneI'll give you a hint:  skill drivers are stored as annotations on top of courses.  So go look at the skill driver code20:51
ignasas in - schooltool person vs demographics person20:51
fsufitchoh ok20:51
ignaswithout breaking clients too much20:51
ignasif person object is switched or something like that20:51
pcarduneignas: maybe a separate interface20:51
ignasor are we going to make clients use different interfaces depending on the person class20:52
pcarduneIRESTPerson with adapters20:52
ignasno not that part20:52
ignasthat pars is easy - different views for different classes20:52
ignasbut on XML level20:52
ignasif XML files will be 100% incompatible20:52
ignasit will not be very nice20:52
ignasthough - title vs first_name + last_name20:52
ignasis something that will definitely apply to the "base"20:53
pcarduneyes, make an XML file that is compatible20:53
pcardunecan't you have an xml file not require certain attributes20:53
pcardunebut provide them if they are there?20:53
ignasso we don't really have a common way to create different persons20:53
ignascreating a person in one case requires "title" in other case requires "first_name" and "last_name"20:53
ignasand this distinction is set in schooltool code20:54
ignasREST client has no way to know20:54
ignaswhich person is being used20:54
ignaseven if we write the client20:54
pcarduneit sounds like we should stop having multiple persons20:55
ignasnot really possible at the moment20:56
ignaspersons are too different20:56
pcardunein the future?20:56
pcarduneWell, I'll think about it for a bit20:56
fsufitchso i need the zope.component.adapts(something)?20:59
pcardunefsufitch: you'll want the something to be IPerson and IResource20:59
fsufitchhow do i do it for both of them at once?21:00
fsufitchor do i have to have separate classes?21:00
ignaspcardune: hmm, we probably want an extendable XML21:01
ignasand some view that list available REST person extensions21:02
fsufitchdo i do zope.component.adapts(("IPerson","IResource"))?21:02
pcardunefsufitch: no21:02
fsufitchor zope.component.adapts(IPerson) <newline> zope.component.adapts(IResource)21:02
ignasfsufitch: i'd define adapts in zcml21:02
ignasin this case21:02
pcarduneyou will actually want to have some other interface21:02
pcardunelike, IHaveBarcode21:02
ignasor you can add <class> directives21:03
ignaswith IHaveBarcode21:03
ignasfor both21:03
ignaspersons and resources21:03
pcardunei like that way the best21:03
fsufitchi see21:03
fsufitchso there would be a PersonBarcode and a ResourceBarcode in the end?21:03
fsufitchor am i getting this wrong?21:04
ignasoh, and you should probably add a catalog for barcode -> IHaveBarcode lookup21:04
fsufitcha catalog?21:05
ignasit can wait21:05
pcarduneignas: why a catalog?21:05
ignaspcardune: because iterating through 1000 of persons and getting annotations of every one of them and seeing if the barcode is right21:06
ignaswill be slow21:06
pcarduneoh god know I wouldn't do that21:06
ignasor are you going to immitate a catalog by having a BTree with "barcode" -> person pairs?21:07
pcarduneyeah, that is more what I was thinking21:07
pcardunebut only because I've never used catalogs before21:07
ignashmm, that's a bit "reinventing the wheel" though21:07
ignasas you will have to add your own PersonModified21:07
ignasPerson Added21:07
pcardunehmmm, yes I suppose that is true21:08
ignasand it will effectivelly be a ... catalog21:08
ignas*... a catalog21:08
pcardunewell that can come later21:08
fsufitchso a catalog is a way to backtrace from contained object to container object?21:09
ignasit's a method to find all the objects that match some query, like "get me all person with this barcode"21:09
ignaswithout accessing all the objects that have a barcode21:09
fsufitchi see21:09
fsufitchwell, if it comes later, then it comes later21:10
* ignas would even go so far as to not store barcode in annotations21:10
ignasjust use a catalog21:10
fsufitchbut right now i should just start by writing an IBarcode class, right?21:10
ignasas catalogs are two way ...21:11
fsufitchi see21:11
ignasIBarcode, yes21:11
fsufitchbut if i have blah/person/barcode, i can use a catalog to do that traversal?21:11
ignasall the magic will be happening in IHaveBarcode => IBarcode adapter21:11
ignaswhy traverse?21:11
ignasyou just have a @@barcode.html view on all IHaveBarcode objects21:12
ignasthat can change the barcode21:12
fsufitchi see21:12
fsufitchbut the barcodes are supposed to be autogenerated from the object they're describing21:12
ignasso @@barcode.html would just display that info, not change it21:13
fsufitchi see21:13
fsufitchbut i still don't get what you mean the IHaveBarcode class to do21:13
ignasIHaveBarcode is a marker interface21:13
ignasthat tells you that this object has a barcode21:14
fsufitchwhich means...?21:14
fsufitchi see21:14
ignasso you could add views for all the objects that can have a barcode21:14
ignasinstead of registering every view for let's say Person and Resource21:14
fsufitchso no hard-coding...21:14
ignasthough - i'd write 2 IBarcode adapters one for IPerson and one for IResource because i think the logic of barcode generation will be different21:15
ignasbut i have no idea about how that will work ;)21:15
ignasso you should ask pcardune what he thinks about it21:15
fsufitchit's the same code for generating the barcodes for anything21:15
fsufitchsomebody else wrote that code21:15
ignasand how does it generate the code?21:16
fsufitchno idea21:16
fsufitchblack magic21:16
fsufitchit's given a string21:16
fsufitchand generates a numerical code from there21:16
fsufitchwhich is then used to make the bars21:16
ignassame code for identical strings?21:16
ignashmm, so yes, you can go with 1 adapter21:17
ignasthat gets self.__parent__.__name__ + "/" + self.__name__21:17
ignasand generates the code out of that21:17
pcardunethat is what I was going to say21:17
ignasso you won't even have to store anything21:17
ignasin annotations21:18
fsufitchi see21:18
pcardunedepending on how often the barcode gets viewed though21:18
ignaspcardune: catalog, if it's too slow21:18
ignashmm, but yes, it depends21:19
ignasthough - the code generation for 1 object will be fast enough anyway21:19
fsufitchwould i make a new directory to put all the barcode stuff in?21:26
fsufitchpcardune, ping21:34
fsufitchyes to my question?21:36
fsufitchalso, how would i be able to store the image for the barcode?21:37
fsufitchwould i use python imaging or just keep it in a file and hold a string of the file's path?21:38
fsufitchpcardune, ping21:39
pcardunefsufitch: I guess we decided that it would be generated on the fly21:39
fsufitchoh yea21:40
fsufitchthen what would the IBarcode class actually store?21:40
*** ignas has quit IRC21:41
fsufitchpcardune, ping21:41
fsufitchit's fun to ping you :)21:42
pcardunewell, I guess you wouldn't actually have an IBarcode class21:42
pcarduneyou would just have an IHaveBarCode interface21:43
pcarduneand it wouldn't store anything21:43
pcarduneit would just be what's called a "marker" interfae21:43
pcarduneor actually, you could make it store a __name__ and __parent__21:43
fsufitchi see21:43
pcardunein which case, you could just make IHaveBarCode inherit from IContained (or maybe ILocatable?)21:43
fsufitchdo i make them actual zope attributes, or just python attributes?21:44
*** aelkner has joined #schooltool21:44
fsufitchhello, aelkner21:46
pcardunefsufitch: zope schema fields21:47
pcarduneor zope Attributes too21:47
*** th1a has joined #schooltool22:01
fsufitchpcardune, so now that i have IHaveBarCode and HaveBarCode, how would i go about linking a person/resource/whatever to an object of that kind?22:14
fsufitchis this where the catalogs come in?22:14
*** ignas has joined #schooltool22:14
fsufitchor the adaptors?22:14
pcarduneyou won't need a HaveBarCode class22:15
pcarduneyou just need a page registered for IHaveBarCode22:15
pcardunenamed barcode.gif22:15
fsufitchi see22:15
pcarduneor rather,22:15
pcardunemake it barcode.html22:15
pcarduneyou'll need another view for barcode.gif later22:15
pcardunein the barcode.gif view, you'll hook in the barcode generating code22:16
fsufitchwhich actually generates a barcode, and puts it in a file of some name22:16
fsufitchpcardune, what class would i specify for the barcode.html zcml register thing?22:24
pcardunefsufitch: you would create a view class like BarCodeView22:25
pcarduneyou do not store the bar code in any file of any name22:25
fsufitchok, then how would i access it?22:26
fsufitchpcardune, ping22:27
fsufitchalso, don't i have to put a template in for the page as well?22:28
pcardunein the zcml registration you use a "class" attribute22:28
pcardunelook at the lessons we did22:28
pcarduneit's all there22:28
fsufitchpcardune, but see, the trouble is, in the page template, i would have to get the image from *some*where, and the only place the image actually ever appears is in the bar code generator itself as a PIL image, or outside of it, as a pdf file and a gif file22:33
fsufitchhow can i get the image from there, into the pt file, so it can be displayed?22:33
pcardunethe pt file will reference the barcode.gif view22:33
fsufitchin other words, what do i have to change in the bar code generator and what do i have to do in my browser view class?22:33
pcarduneand the barcode.gif view will take the PIL image and convert it to a string22:34
pcardunemodify the HTTP headers to change the content type to a gif22:34
pcarduneand send off the image data22:34
pcardunefsufitch: look at
*** th1a has quit IRC22:43
*** jfroche has quit IRC22:43
ignasor at schooltool attendance sparkline code22:45
*** ignas has quit IRC22:51
*** th1a has joined #schooltool23:33
*** didymo has joined #schooltool23:39
*** aelkner has quit IRC23:48
*** jinty has quit IRC23:53
*** ignas has joined #schooltool23:58

Generated by 2.15.1 by Marius Gedminas - find it at!