IRC log for #storm on 20071213

00:00.15*** join/#storm wallflower (n=wallflow@ip-205-246-113-216.pool.grokthis.net)
03:09.26*** join/#storm lymxz (n=lymxz@123.116.112.83)
04:58.02*** join/#storm bigdog (n=scmikes@72-197-8-8-arpa.cust.cinci.current.net)
05:13.50*** join/#storm bigdog (n=scmikes@72-197-8-8-arpa.cust.cinci.current.net) [NETSPLIT VICTIM]
05:13.50*** join/#storm benoitc (i=benoitc@enki.osbud.net) [NETSPLIT VICTIM]
05:13.50*** join/#storm weatherman (n=weatherm@204-174-36-245.unknown-dhcp802.dsl.ucc-net.ca) [NETSPLIT VICTIM]
05:13.50*** join/#storm LarstiQ (n=larstiq@cust.7.157.adsl.cistron.nl) [NETSPLIT VICTIM]
05:59.46*** join/#storm jukart (n=jukart@85-124-221-45.static.xdsl-line.inode.at)
06:51.36*** join/#storm jukart (n=jukart@194.183.146.181)
07:09.56*** join/#storm dobee (n=dobeee@194.183.146.186)
07:17.06*** join/#storm bozzo (n=bozzo@BSN-210-246-204.dial-up.dsl.siol.net)
09:43.24tarjeiwishlist item: len(ResultSet) should return the same as ResultSet.count()
11:00.24*** join/#storm bozzo_ (n=bozzo@BSN-210-246-124.dial-up.dsl.siol.net)
11:53.38*** join/#storm niemeyer (n=niemeyer@200-163-194-246.ctame705.dsl.brasiltelecom.net.br)
13:07.41*** join/#storm mcella (n=michele@ip-171-30.sn3.eutelia.it)
13:18.25*** join/#storm jukart (n=jukart@194.183.146.181)
13:50.34radixtarjei: unlikely. too many things randomly call len() on objects in places where you don't want queries to hapen.
14:02.18*** join/#storm Zenom (n=Zenom@unaffiliated/aj1973)
14:22.27tarjeiradix: ah, that's true.
14:22.34tarjeiif ResultSet etc.
14:23.37radixhmm. I'm not sure if that's one, but I think "for x in resultset" might be one.
14:25.13radixoh, I see. "if" calls it if __nonzero__ is not defined.
14:26.15radixhmm. I guess I was totally wrong
14:26.16tarjeiyep
14:26.25radixI thought 'for' would trigger __len__, but I can't seem to get that to happen.
14:26.50tarjeistill, I think it is a valid reason not to implement len(ResultSet)
14:45.13*** join/#storm niemeyer (n=niemeyer@201-10-93-231.ctame705.dsl.brasiltelecom.net.br)
15:20.45*** join/#storm niemeyer (n=niemeyer@200-138-32-195.ctame705.dsl.brasiltelecom.net.br)
16:47.39*** join/#storm bitsbam (n=nephish@63.98.191.58)
16:47.46bitsbammorning all
16:48.31radixHi bitsbam
16:48.58bitsbami had a question about changes from .1 to .11
16:49.08bitsbamare strings handled differently?
16:49.32radixbitsbam: Don't think so. You're Shawn?
16:49.42bitsbamyes, you got my email !
16:49.45radixyep :)
16:49.48bitsbamcool
16:50.04bitsbamdo we use a pastie here ?
16:50.09radixSure, whatever you want.
16:50.18radixhttp://rafb.net/paste is one I tend to use because it's got a short URL
16:50.31bitsbamopening right now, thanks
16:50.34radixCan you paste the traceback you're getting?
16:50.43bitsbamsure
16:50.43radixAnd, you didn't also upgrade your database library at the same time, did you?
16:51.46bitsbamwell, here's the deal,  we are upgrading to beefier hardware here at the shop, and so i did a mysql dump then import into the new server. The new server would be running a different MySQL version, but other than that, should be the sam
16:51.53bitsbamsame i mean
16:52.02radixbitsbam: What client library are you using?
16:52.18bitsbamsorry, client library?
16:52.27bitsbampython mysql in ubuntu
16:52.39radixwell, sorry, of course you're using MySQLdb, since that's what storm uses
16:52.51bitsbamok
16:52.56radixbut I'm betting you changed the version of that and it had an incompatible change where it started returning unicodes where it used to return strings, or vice versa.
16:53.35bitsbamok, yes started returning strings. that is what is in the traceback.. expected unicode but got type str
16:54.11radixbitsbam: storm is very strict about unicode vs strings, because that's really the only sane thing to do. unfortunately many other libraries are only just figuring this out :)
16:54.23radixbitsbam: so mysqldb might have changed its API a bit.
16:54.31radixbitsbam: What MySQL datatype is your column?
16:54.37bitsbamvarchar
16:55.12radixbitsbam: hmm. varchar should really be unicode
16:55.21bitsbamyou know what, i am not getting the same error in a table that is innodb, the problem one is myisam
16:55.26radixbitsbam: which version in particular of MySQLdb are you using?
16:55.32radixhork.
16:55.53radixbitsbam: you should really not use myisam. it's not really compatible with storm's caching strategy, because storm assumes transactions, well, work :-)
16:56.19radixbut that should be totally unrelated to the types that MySQLdb returns...
16:56.25bitsbammysql is 5.0.45   ubuntu 7.10
16:56.44radixniemeyer: are you aware of changes in MySQLdb regarding unicode / string representation of VARCHAR columns?
16:57.33bitsbami had converted everything over to innodb, but this particular table was giving me troubles and lots of connection errors when i did that. so i but this ( and a couple of other  tables ) back to myisam..
16:57.54bitsbamthe problem tables were the ones that get written to and read from the same rows very often
16:57.59bitsbambut anyway...
16:58.24radixwoops, there he goes.
16:58.31radixniemeyer's been having connectivity problems today. :-(
17:00.58bitsbamradix: here is the code http://rafb.net/p/ePdcG215.html
17:03.28bitsbamsorry, got your question wrong. python-mysql (MySQLdb) version is 1.2.2-3
17:04.47*** join/#storm niemeyer (n=niemeyer@200-138-32-195.ctame705.dsl.brasiltelecom.net.br)
17:42.36bitsbami just changed the table type to innodb and got the same error
17:42.47bitsbamforgot to paste the error. one sec
17:44.49bitsbamhere is the traceback http://rafb.net/p/GD5hHb63.html
17:56.41radixbitsbam: ok, I'm a bit less scared now that you've got the same error in both table types
17:56.58bitsbamreally ? i was more scared :)
17:57.17radix:(
17:57.21*** join/#storm niemeyer (n=niemeyer@200-138-32-195.ctame705.dsl.brasiltelecom.net.br)
17:57.24radix:)
17:57.41radixbitsbam: ok, I'm back from a conference call i was having
17:58.15bitsbamok, i am cool.
17:58.15bitsbamthanks
17:58.15radixbitsbam: Do you have python MySQLdb version 1.2.2-3 in the environment where the code *does* work?
17:58.24bitsbamlemme check
17:59.49bitsbamVersion: 1.2.1-p2-4ubuntu2
17:59.56bitsbamso, um.. .no
18:03.01radixhmm, pretty minor difference
18:03.05radixI wonder if there's anything interesting in the changelog
18:04.36*** join/#storm niemeyer (n=niemeyer@200-138-32-195.ctame705.dsl.brasiltelecom.net.br)
18:05.42bitsbamstorm doesn't have a declaration for a table column that is string, right?
18:08.42radixbitsbam: it does
18:08.44radixbitsbam: RawStr
18:08.54radixbitsbam: I guess you can use that, but it's pretty unexpected to need that when you're using VARCHAR :\
18:09.12radixbitsbam: anyway, I need to travel home because the weather just started getting really bad. Sorry I've been really choppy in here
18:09.29bitsbamok, thanks a lot
18:18.36*** join/#storm dobee (n=dobeee@81-223-53-162.dornbirn.xdsl-line.inode.at)
18:25.14*** part/#storm bitsbam (n=nephish@63.98.191.58)
20:00.23*** join/#storm bozzo (n=bozzo@BSN-210-246-124.dial-up.dsl.siol.net)
20:09.04*** join/#storm bitsbam (n=nephish@69.55.30.231)
20:09.14bitsbamhello all again
20:29.15*** join/#storm niemeyer (n=niemeyer@200-138-32-195.ctame705.dsl.brasiltelecom.net.br)
20:29.34bachi niemeyer
20:46.57niemeyerbac: Hey
20:47.21bachi niemeyer -- did that test case i sent you make sense?
20:51.14niemeyerbac: I didn't get any test cases
20:51.37bacniemeyer: ah, i thought i mailed it to you yesterday.  let me look.
20:51.58niemeyerbac: Oh, hold one
20:52.00niemeyerhold on
20:52.10niemeyerbac: I had my mind on a different subject, sorry
20:52.17bacniemeyer: no problem
20:52.28niemeyerbac: I'll check it out.. one moment
20:52.44bacniemeyer: also, i have a question about another odd behavior i'm having since moving to mysql
20:53.20bacit seems if i create a new object it is getting automatically added to the store.  and if i do a rollback it has no effect.  any ideas what i'm doing wrong?
20:55.10bozzobac: are you using InnoDB or MyISAM tables?
20:55.58bacbozzo: myisam
20:56.13bozzobac: myisam does not do transactions...
20:56.21bacbozzo: ah, ok
20:56.41bacbozzo: so is that specified on the schemata?
20:57.33bozzobac: yeah CREATE TABLE ( ... ) ENGINE=InnoDB;
20:57.33bacbozzo: thanks!
20:58.06bacbozzo: i was hoping it was something simple
21:01.04bacbozzo: cool, that works!
21:01.20bozzoi think it would be possible set default engine for the DB, so you dont have to add it all over the place...
21:01.33bozzocheck the refman...
21:01.56bacbozzo: it wasn't hard to change it everywhere and now i don't have to worry about setting up the next db properly.
21:08.27bozzoniemeyer: Say I wanted to display a list of blogs ( store.find(Blog) ) and for each blog also some summary over posts
21:09.23bozzoniemeyer: in SQL I'd do something alike SELECT blog.*, count(posts.id) from blog join posts on blog.id = posts.blogId group by blog.id;
21:11.20bozzothe best I can come up is a store.find(Blog) and a store.execute(SQL('select blog.id, count(posts.id) from blog join posts on blog.id  posts.blogId group by blog.id')).get_all() and merge the results in python
21:23.41*** join/#storm niemeyer (n=niemeyer@200-138-32-195.ctame705.dsl.brasiltelecom.net.br)
21:41.29bitsbamniemeyer: hey there
21:43.48*** join/#storm dobee (n=dobeee@81-223-53-162.dornbirn.xdsl-line.inode.at)
21:43.51niemeyerbitsbam: Hey
21:43.53niemeyerbitsbam: My connection is highly unstable today
21:43.55niemeyerApologies in advance if I fall out
21:45.39bitsbamniemeyer: no problem whatsoever, this is shawn, you answered me on the mailing list.. um... what do you mean by self contained test case?
21:46.05niemeyerbitsbam: Just a small test file that reproduces the problem
21:46.18niemeyerbac: Btw, I was able to reproduce the issue
21:46.41bitsbamok, email it to the list? pastie?
21:48.47bozzoniemeyer: you probably missed what I asked above: Say I wanted to display a list of blogs ( store.find(Blog) ) and for each blog also some summary over posts
21:48.47niemeyerbozzo: Ok
21:48.47niemeyerbitsbam: Yes, email please
21:48.47bozzoin SQL I'd do something alike SELECT blog.*, count(posts.id) from blog join posts on blog.id = posts.blogId group by blog.id;
21:48.59bitsbamok ,will do
21:49.56bozzoI see the Select() takes a group by, but I have no clue how to make Store() read a handcrafted Select()
21:49.59niemeyerbozzo: Selecting the objects and the count in a single select isn't possible right now, even though it's planned
21:50.32niemeyerbozzo: OTOH, There's something strange in that query
21:50.42niemeyerbozzo: group by blog.id doesn't make much sense
21:51.00niemeyerbozzo: (to me)
21:51.01bozzowell it makes count(posts.id) be per blog
21:51.30niemeyerHmmm
21:52.21niemeyerI see, I guess I've never done something like that
21:52.27niemeyerLooks nice
21:52.28niemeyerAnyway
21:52.56niemeyerbozzo: group by isn't supported in Storm to look for objects right now
21:54.57bozzoniemeyer: fair enough. It's not such a problem to do a join in python
22:05.38*** join/#storm bitsbam_ (n=nephish@69.55.28.164)
22:10.46bozzoniemeyer: with mysql and python2.5 and recent enough MySQLdb a database column 'plain_str varchar(10) CHARACTER SET ascii COLLATE ascii_bin' will return a str() not a unicode()
22:18.32bitsbam_hello
22:18.39bitsbam_my connection is flaky too
22:29.40*** join/#storm bitsbam (n=nephish@69.55.28.164)
23:48.19*** part/#storm bitsbam (n=nephish@69.55.28.164)

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.