*** cilkay has quit IRC *** sjc has joined #gnuenterprise *** holycow has quit IRC *** kilo has joined #gnuenterprise good morning hello kilo hi dimas *** btami has joined #gnuenterprise *** reinhard has joined #gnuenterprise hi reinhard good morning if i have xmlrpc set for both side which driver really used? as /rpc/drivers/xmlrpc only has code for py_xmlrpc and pw_xmlrpc it uses the first one that it finds and that it can load does xmlrpc real driver or just common name for particular driver to be found? xmlrpc is just a common name for both it's actually a feature of the plugin loader it's like if you say "provider = postgres" in your connections.conf, the loader tries all of psycopg, pypgsql, pygresql and popy and loads the first it can initialize *** sjc has quit IRC ok reinhard: i had everythings working with rpctype=xmlrpc until i thought to try filters again File "/home/ds/svn/gnue/.cvsdevelbase/gnue/common/datasources/drivers/appserver/appserver/Connection.py", line 78, in getLoginFields self._filters = self._sm.getFilters (self.parameters.get ('_language', 'C')) File "/home/ds/svn/gnue/.cvsdevelbase/gnue/common/rpc/drivers/Base.py", line 241, in __call__ return self._adapter._runMethod (self._methodname, *args, **params) File "/home/ds/svn/gnue/.cvsdevelbase/gnue/common/rpc/drivers/xmlrpc/pw_xmlrpc/ClientAdapter.py", line 98, in _runMethod result = to_call (*__args, **params) File "/usr/lib/python2.3/xmlrpclib.pyc", line 1029, in __call__ File "/usr/lib/python2.3/xmlrpclib.pyc", line 1316, in __request File "/usr/lib/python2.3/xmlrpclib.pyc", line 1070, in request ProtocolError: more about that if filters are defined but not no real data (like base_company) exist - forms give login screen with additional fields when i inserted base_company - it fails even before that appserver and forms on same machine? yes self._filters = self._sm.getFilters (self.parameters.get ('_language', 'C')) how can i check that lagnuages are properly initialized? C and ru languages as somewhere in gld "ru" is used can you please try if something changes if you run both appserver and forms in the C locale? ok I think we are facing a unicode problem here reinhard: is that ok to switch to C locale - LANG=C gacvs .... ? please check what variables you have set LANG, LANGUAGE and LC_ALL can be relevant *** dcmwai has quit IRC the same error and value for filter in base_company all in ascii it gives that on server side DB003: 0:00:27.201 [Connection:248] DBSIG2 Statement: SELECT t0.base_name,t0.base_code,t0.gnue_id FROM base_company t0 DB003: 0:00:27.203 [Connection:249] DBSIG2 Parameters: None am i missed something with setting filters again? *** johannesV has joined #gnuenterprise good morning reinhard, what's the differenence between @param, @cvar and @ivar ? brb phone back hi johannesV cvar is for class variables ivar is for instance variables @param is not parsed correctly at all if used in a class docstring strange ... so what to use for parameters of a function from a class ? dimas: my suspection is that there is a server side exception and xmlrpc fails to pass the exception details because they contain unicode but that's a guess, nothing more johannesV: you can use @param in a function or method definition, but not in the docstring of the class itself class foo: """ bar """ def method (self): """ baz """ pass you can use @param in baz, but not in bar ah, ok, now i see phu ... :) and you can use ivar and cvar in bar, but not in baz ok, rigth hi s/rigth/right i was just wonder while i was reading the commit mails I found out yesterday that it improves the usability of the docstrings quite a lot if you look at the generated output from time to time :-) hi ajmitch is it possible that you forgot to bump up appserver's dependency to common to the newest common release? so you'd say we should add @ivar/cvar to every class ? http://www.gnuenterprise.org/tools/common/docs/api/public/gnue.common.apps.GBaseApp.GBaseApp-class.php is a good example maybe all class variables are listed for any class *anyway* all you do with @cvar is add an explanation to it also, adding @ivar and @cvar to the docstrings might help defining the "public interface" of a class I would *only* document the public variables of course plus for abstract base classes the @cvar's that should be overwritten by descendants i agree; it makes sense reinhard: I thought i had bumped the dep reinhard: i've removed all references to ru from filters - same error, deleted filter value - it opened the login dialog checking now Package: gnue-appserver Architecture: all Depends: ${python:Depends}, gnue-common (>= 0.5.14) filter value was : tandem=# SELECT t0.base_name,t0.base_code,t0.gnue_id FROM base_company t0; base_name | base_code | gnue_id -----------+-----------+---------------------------------- tandem | t | 11d99139ce7ed9b28ab40058bf000436 ( the previous version didn't get changed for some reason dimas, do you have a valid gld defined for that filter-class base_company ? johannesV: also I tried to be a little consistent in the docstrings, e.g. every function has a first short paragraph that says what the function does in imperative form -- this first paragraph is displayed in the overview page but this is getting close to Monk-like behaviour ;-) ajmitch: yes, you're right, must have looked in the testing version, sorry btw, testing the new repository i've found another memory leak in using generated forms ... dimas: you have also run the appserver with LANG=C ? yes i've to run again ... bbl *** ajmitch has quit IRC dimas: you using svn, right? *** ajmitch has joined #gnuenterprise with --debug-level=3 on forms side you can see all rpc calls and with --debug-level=4 on appserver side you can see how they arrive at appserver although there will be much more output on appserver because appserver uses itself internally reinhard: 0.4.1 has got a dependency on the latest common (if you didn't see it before I reonnected) ajmitch: yes, you're right, must have looked in the testing version, sorry ok :) sorry, was a bug in the testing version I suspect reinhard: yep for svn, i see debug messages, will try to insert filter value back *** ciccio has joined #gnuenterprise reinhard: any chance to enter in private contact with you? what do you mean with "private contact"? you mean meeting me in real life? não. this might be complicated by some 12.000km no I think you are in Austria, I am in Brasil st helens island is a great place... ciccio: so what do you mean? email. IM what ever, so the conversation isn't public anymore reinhard: last debug message on server side: DB004: 0:01:56.824 [geasSessionManager:403] Leaving function gnue.appserver.geasSessionManager.geasSessionManager.getFilters ('0x4071e3cc') == [((u'base_company', u'Company'), [(u'Code', True, u'base_code'), (u'Name', True, u'base_name')], None, {None: [{u'base_code': u't', 'gnue_id': u'11d9915191c3a9169d280058bf000436', u'base_name': u'tandem'}]})] can you try to find out which xmlrpc driver you actually use? off to lunch, bbl as i have no py_xmlrpc installed it could only be pw_xmlrpc *** mnemoc_ has quit IRC *** tiredbones has joined #gnuenterprise *** mnemoc has joined #gnuenterprise *** btami has quit IRC *** kilo has quit IRC *** kilo has joined #gnuenterprise back reinhard, i've just fixed the memory leak for generated forms ... (will add it to the repository-commit then) johannesV: ok *** mnemoc has quit IRC dimas: for me, getFilters returns more or less exactly the same and it works you sure you have no local modifications of the code (e.g. from earlier tests in rpc) and are up to date with latest svn in appserver and common? Dispatching: Session.getFilters ('C',) <- is that looks ok? yes reinhard: how to get low level debug output on server side? like if i put some prints in xmlprc.py? reinhard: downloaded fresh copy for appserver and common/rpc - same thing another (big) memory leak found ... created on sighup to appserver .... dimas: in rpc/drivers/xmlrpc/ServerAdapter.py, line 312, you could add a print repr (result) maybe also in line 361 of the same file *** ncjp has quit IRC *** ncjp has joined #gnuenterprise it outputs from line 312 [((u'base_company', u'Company'), [(u'Code', True, u'base_code'), (u'Name', True, u'base_name')], '', {'': [{u'base_code': u't', 'gnue_id': u'11d9915191c3a9169d280058bf000436', u'base_name': u'tandem'}]})] *** lekma has joined #gnuenterprise hi strikes here in paris everywhere *** mnemoc has joined #gnuenterprise lekma: against software patent? nope against the european constitution for more money in scientific research to keep the school system fair for every students the patent pb doesn't seem to receive a lot of media coverage here dimas: does line 361 issue the same? (i mean mainstream media) reinhard: no dimas: ah! that's interesting should go, bbl *** kilo has quit IRC *** jamest_ has joined #gnuenterprise *** jamest_ has quit IRC *** jamest_ has joined #gnuenterprise bbl *** jcater has quit IRC *** jcater has joined #gnuenterprise reinhard: is there a way to know the language the session has been open with?? is it in session.parameters?? *** johannesV_ has joined #gnuenterprise or can i use session.locale?? wait a minute seems like you have to check for session.parameters ['_language'] thx reinhard btw would it be the also the preferred way to check for username and password? hmm - not sure if you have to check for 'language' or '_language'.. in geasSession line 118: self.locale = params.get ('language') i'll test with both lekma: I think this is a typo and should be _language oh :) *** johannesV has quit IRC print session.parameters says {u'password': None, u'user': None, u'language': u'fr'} doh hmmm double doh :) *you* pass that as parameter to open() in the rpc interface yep so basically you can pass what you want and appserver will give it via parameters i shouldn't? *** dcmwai has joined #gnuenterprise it seems like parts of appserver uses "language" and parts use "_language" and gnue-forms seems to pass "language" that's why i did the same err gnue-forms passes "_language" so when you use gnue-forms, you would see exceptions in the wrong language (how the server was started) but see messages in the correct language (messages from gld files) and with your frontend, it would be exactly the other way around but I will test i used to start generated gnue-forms with appserver://form/some_class?language=fr and i saw that it took it as the form lang yep ok so i thougth the correct way was to pass the same dict but it should be sufficient to just start gnue-forms with LANG set in the environment and gnue-forms should pass that to the server IIRC i'm ashamed to say that i don't know how to set LANG in win32 :) so in my login form there is a dropdown to choose session lang ah ok I always forget that there is something outside the posix world :) lekma: I would not count on the password being available in the parameters dict in the long run as it's a *huge* security risk.. i agree i thougth about hashing it in md5 in the meantime but got caught up by more concrete thing to do first join #openldap err sorry doesn't exist :( sigh i wish this project would finish and give me time to do more concrete things for gnue *** tiredbones has quit IRC back great, all 6240 dead objects found :) *** chillywilly has quit IRC *** chillywilly has joined #gnuenterprise *** sjc has joined #gnuenterprise :D *** SachaS has joined #gnuenterprise *** cilkay has joined #gnuenterprise *** tiredbones has joined #gnuenterprise *** dimas has quit IRC *** dcmwai has quit IRC *** lekma has quit IRC *** johannesV_ has quit IRC *** SachaS_ has joined #gnuenterprise *** SachaS has quit IRC *** SachaS_ has quit IRC *** ciccio has quit IRC *** kilo has joined #gnuenterprise reinhard is commit masta... jcater: thanks for that fix *** jcater has quit IRC *** jcater has joined #gnuenterprise ah, nothing like designer locking X up jcater: thanks for that fix just like old times np reinhard been running common based stuff all day w/ no issues lol google for postgresql popy *** jamest_ has quit IRC hmm I need some postgres help in oracle I could do the equiv of select ... from mytable where date1 >= now()::date - 30; but the postgres equiv gives ERROR: operator does not exist: date - numeric what do I need to typecast the 30 with to get it as "days"? .oO( i though python do that magicly )o not in python postgres :) ah jcater: wow, that's way beyond the stuff I did with postgres select now()::date - '30 days'::interval; seems to do the trick in fact, that's way beyond the stuff I did with SQL at all :) *g* * jcater is having a hard time adjusting from oracle to postgresql just did a quite big commit jcater: if you could please check oracle if you have time (made some updates to the drivers) I have checked postgres and johannes can check the other maintained drivers FWIW, starting from this commit the "host=" parameter in connections.conf is optional for postgres and not giving that parameter will do a local (non-tcp) connection to the db might be interesting WRT performance cool but fwiw [gnue] comment = GNUe Test provider = pypgsql host = /var/run/postgresql dbname = gnue has always done that (and it does give performance boost) but it is nice to have it default to that, as I always forget the line to use did this work for all postgres drivers? worked for psycopg and pypgsql not sure about all though I think it was the postgresql client library that supported it not the python db library ah ok fwiw I found this out by accident when setting up my zope site saw that I could do it there and tried it with gnue (and it worked) *** kilo has quit IRC *** jcater has quit IRC night all *** reinhard has quit IRC *** sjc has quit IRC *** tiredbones has quit IRC *** jcater has joined #gnuenterprise *** jamest has quit IRC *** jcater has quit IRC *** dcmwai has joined #gnuenterprise *** dimas has joined #gnuenterprise *** dimas has quit IRC