#jython IRC Log


IRC Log for 2015-02-19

Timestamps are in GMT/BST.

[5:23] * jimbaker (~jbaker@python/psf/jimbaker) Quit (Excess Flood)
[5:23] * jimbaker (~jbaker@c-24-9-252-60.hsd1.co.comcast.net) has joined #jython
[5:23] * jimbaker (~jbaker@c-24-9-252-60.hsd1.co.comcast.net) Quit (Changing host)
[5:23] * jimbaker (~jbaker@python/psf/jimbaker) has joined #jython
[8:29] * Trundle (~andy@python/site-packages/trundle) has joined #jython
[8:52] * lheuer1 (~Adium@ip-95-223-113-182.hsi16.unitymediagroup.de) has joined #jython
[9:57] * lheuer1 is now known as lheuer
[10:05] <peke> jimbaker: fwierzbicki: pjenvey: I'm going throug various Jython related workarounds in our code base and removing anything that is fixed in 2.7.
[10:07] <peke> I noticed this issue about signal module potentially rising java.lang.IllegalArgumentException is still open: http://bugs.jython.org/issue1729
[10:08] <peke> It has a fairly simple patch attached. Could it be considered for RC1?
[10:56] * Trundle (~andy@python/site-packages/trundle) Quit (Ping timeout: 246 seconds)
[11:09] <agronholm> has this been fixed in b4? https://gist.github.com/agronholm/d037822f5f3669e7fab1
[11:10] <agronholm> it enters exceptHook() and errors when "traceback" (which is NOT in locals()) is referenced
[11:22] * Trundle (~andy@python/site-packages/trundle) has joined #jython
[11:42] * Trundle (~andy@python/site-packages/trundle) Quit (Ping timeout: 252 seconds)
[12:26] * Trundle (~andy@python/site-packages/trundle) has joined #jython
[14:16] * ebarrett (~edd@88-105-198-120.dynamic.dsl.as9105.com) Quit (Ping timeout: 265 seconds)
[14:17] * ebarrett (~edd@88-105-198-120.dynamic.dsl.as9105.com) has joined #jython
[14:27] * xemdetia (xemdetia@nat/ibm/x-obgwapqbwgdwokaw) has joined #jython
[14:36] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) has joined #jython
[14:40] <jimbaker> peke, sure. i rely on reports like yours to figure out the true bug triage. it's the only sane way to groom the ~ 240 open bugs we have :)
[14:42] <jimbaker> agronholm, do you have more context here?
[14:43] <jimbaker> a detailed bug report is best. with patch, with test :)
[15:05] * lheuer (~Adium@ip-95-223-113-182.hsi16.unitymediagroup.de) Quit (Quit: Leaving.)
[15:45] <agronholm> jimbaker: I have at least a couple manifestations of this issue. The exception itself is thrown in java.
[15:46] <agronholm> somehow jython manages to call the excepthook function in a way that doesn't inject the last parameter in locals
[15:46] <agronholm> actually I'm not sure if the other issue is related.
[15:46] <agronholm> I'll paste some code and an error too. it's not so obvious there.
[15:47] <jimbaker> agronholm, thanks!
[15:50] <agronholm> jimbaker: I've updated the gist
[15:50] <agronholm> I should test by accepting a variable number of arguments and seeing what canImport() is called with
[15:54] <agronholm> ok this other issue doesn't look like a bug
[15:55] <agronholm> but the excepthook thing definitely is
[15:57] <agronholm> I'll have to look at reproducing this trivially
[17:50] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) Quit (Quit: enebo)
[18:06] * Trundle (~andy@python/site-packages/trundle) Quit (Remote host closed the connection)
[18:30] * sussman (~sussman@ has joined #jython
[18:47] * fiskenslakt (~derek@ool-18bd2b83.dyn.optonline.net) has joined #jython
[18:49] * Trundle (~andy@python/site-packages/trundle) has joined #jython
[18:50] <fiskenslakt> can someone help me use this api: http://fiji.sc/Register_Virtual_Stack_Slices ? I keep getting errors when trying to import the library
[19:09] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) has joined #jython
[19:11] <fiskenslakt> can someone help me use this api: http://fiji.sc/Register_Virtual_Stack_Slices ? I keep getting errors when trying to import the library
[19:16] <agronholm> fiskenslakt: what errors?
[19:17] <fiskenslakt> http://pastebin.com/087WUf5Y
[19:18] <fiskenslakt> as far as i can tell, all the classes are in the right place to be found
[19:18] <fiskenslakt> i don't know if it's becuase the classes are in .jar's or not, but i can't really understand what the problem is
[19:20] <fiskenslakt> and then what makes it even more confusing is after running it a few times without changing anything, the error will change to this: http://pastebin.com/51xP3mq9
[19:41] * botwin (~botwin@ has joined #jython
[19:42] * botwin (~botwin@ Quit (Read error: Connection reset by peer)
[19:42] * sussman (~sussman@ Quit (Quit: Leaving)
[19:45] <agronholm> fiskenslakt: ok, and you've added this specific jar in your class path?
[19:45] <fiskenslakt> i think so
[19:45] <agronholm> you have doubts?
[19:45] <fiskenslakt> well, i do a sys.append where the jar for the stack slices jar is
[19:46] <fiskenslakt> without that it's obvious it isn't importing the stack slices module
[19:47] <fiskenslakt> sys.path.append i mean
[19:49] * AndyBotwin (~botwin@unaffiliated/andybotwin) has joined #jython
[19:54] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) Quit (Ping timeout: 252 seconds)
[19:54] <agronholm> fiskenslakt: try adding the jar to CLASSPATH
[19:55] <agronholm> I really, really hate java's class loader system
[19:55] <agronholm> it's so hideously complicated
[19:55] <fiskenslakt> how do i do that?
[19:55] <agronholm> CLASSPATH is an environment variable
[19:55] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) has joined #jython
[19:55] <fiskenslakt> ok, also which jar? the one in the error? or the stack slices jar?
[19:56] <agronholm> the error does not refer to any particular jar
[19:56] <agronholm> add the jar containing the class in the error message, and any dependencies
[19:56] <fiskenslakt> ok, how do i add it to the classpath?
[19:57] <agronholm> do you know how to set environment variables in your operating system?
[19:57] <fiskenslakt> i think you may use the export command?
[19:57] <agronholm> at least on linux
[19:58] <agronholm> export CLASSPATH=path_to_jar:path_to_next_jar:path_to_third_jar
[19:58] <agronholm> what OS are you running?
[19:58] <fiskenslakt> ubuntu
[19:58] <agronholm> ok, that will work then
[19:58] <agronholm> more info: http://docs.oracle.com/javase/tutorial/essential/environment/paths.html
[19:59] <fiskenslakt> i can't just make the classpath the directory all the jar's are in?
[19:59] <agronholm> well, on java 7 and up you can actually
[19:59] <agronholm> but java is picky about the syntax there
[19:59] <fiskenslakt> i see
[19:59] <agronholm> if you use the wrong syntax, it will simply not work
[20:00] <agronholm> okay, from java 6 up it seems like
[20:00] <agronholm> okay so some/directory/*
[20:00] <agronholm> that should work
[20:02] <agronholm> jimbaker: sorry to bother you, but I need to ask a quickie -- is it possible to override toString() behavior of a python object? I need to return a unicode string and __repr__() should not do that
[20:03] <fiskenslakt> agronholm: thanks, it does look like that syntax works. I think now i just need to solve any lingering dependencies i have, because i'm still getting the same error, just for different modules
[20:04] <agronholm> fiskenslakt: good luck
[20:04] * AndyBotwin (~botwin@unaffiliated/andybotwin) Quit (Ping timeout: 255 seconds)
[20:05] <fiskenslakt> thanks a lot
[20:14] * xemdetia (xemdetia@nat/ibm/x-obgwapqbwgdwokaw) Quit (Ping timeout: 265 seconds)
[20:19] <fiskenslakt> agronholm: I'm still getting this http://pastebin.com/51xP3mq9 error, so It's probably safe to say i don't have that class. But I can't find it anywhere either
[20:19] <agronholm> well yeah
[20:19] <agronholm> you need to find a jar containing that class
[20:20] <jimbaker> agronholm, that's interesting. as you have noticed PyObject#toString uses __repr__ by default. you can define your own toString if you extend PyObject in java. but i don't know from python code
[20:20] <agronholm> doesn't seem possible
[20:21] <agronholm> the use case: I have a number of python objects as items in an editable JComboBox
[20:21] <agronholm> and when I select one, the editor does toString() and so gets the __repr__() of the object which is not what I want
[20:22] <jimbaker> i think you have to violate python convention here
[20:22] <jimbaker> it's an edge that goes away in jython 3 :)
[20:22] <agronholm> I know
[20:22] <agronholm> on cpython at least, the interpreter checks for and prevents passing unicode strings from __repr__()
[20:23] <agronholm> as far as I remember anyway
[20:24] <agronholm> another option is to find the java code that invokes toString() on the objects and override that
[20:24] <agronholm> still working on that
[20:24] * xemdetia (xemdetia@nat/ibm/x-zwmeauxcwxvirnwh) has joined #jython
[20:26] <jimbaker> agronholm, well there's no such restriction on what repr will return for jython
[20:26] <jimbaker> but as you mention, it's there in cpython
[20:27] <agronholm> I might go that way then
[20:27] <agronholm> it's the easiest option
[20:27] <agronholm> thanks
[20:27] <jimbaker> interestingly, it is repr that enforces the restriction, not __repr__
[20:27] <jimbaker> in cpython
[20:27] <agronholm> ok
[20:32] <fiskenslakt> agronholm: I can't find the class in that error
[20:34] <agronholm> fiskenslakt: it's not mpicbg.models.CoordinateTransform then?
[20:35] <agronholm> or what do you mean?
[20:35] <fiskenslakt> it is, but i can't find that
[20:35] <fiskenslakt> i don't know where to get that class from so i can use it
[20:35] <agronholm> well, I can't help you with that
[20:36] <fiskenslakt> fair enough
[22:58] * Trundle (~andy@python/site-packages/trundle) Quit (Remote host closed the connection)
[23:12] * ebarrett (~edd@88-105-198-120.dynamic.dsl.as9105.com) Quit (Ping timeout: 246 seconds)
[23:13] * ebarrett (~edd@88-105-198-120.dynamic.dsl.as9105.com) has joined #jython
[23:24] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) Quit (Quit: enebo)
[23:36] * xemdetia (xemdetia@nat/ibm/x-zwmeauxcwxvirnwh) Quit (Ping timeout: 244 seconds)


These logs were automatically created by JythonLogBot on irc.freenode.net using a slightly modified version of the Java IRC LogBot.