*** holycow has quit IRC *** johannesV has joined #gnuenterprise What's needed to get the ugly swedish letters working in gnu-eforms? I have them in my postgres table, but they won't show up proper in the forms? *** lxf has joined #gnuenterprise hi elwis what encoding your forms are in? can you see that letters when in labels on the form? elwis: gnue can show almost any letters for sure :) dimas: Hi there, sorry for having to answer a collleague when I do a select * from postgres in my console they show up alright in my gnue-form they look like something from outer space :( I'll try labels is that proper encoding for those letters? Should be.. look yeak on the labels maybe utf8? utf-8 made them look great in gnue, now they're wrong in postgres :) there is encoding param for connections.conf ...yes.. I put that one on iso8859-1 .. if i change it to utf-8 it will be grwt all over?? grwt = great .. (need more coffee for sure) [taxcom-backend] provider = psycopg host = localhost dbname = taxcom encoding = utf-8 Thanx! *** kilo has joined #gnuenterprise what about that terrible "brain|help|use" - less guide I wrote, should I put it on the web? where is it now? on my hddd :) I think someone should check it out, I might be lying about things.. it's kind of an interesting story actually.. it starts out with a murder.. good morning elwis: could you provide an url for it? if not, send it to me and i will publish it before adding it to official site kilo: hold on, I'll see if I can get it on my old javaserver ;) ok *** reinhard has joined #gnuenterprise good morning hello reinhard hi reinhard hi reinhard kilo:www.myjavaserver.com/~elwis/GNUe_for_the_helpless.pdf Now, if it stink, tell me so and I'll might be able to fix it ;) You'll notice that I'll be in the back trying to get some answers also.. lol that is what #gnuenterprise is for :) and when it is you are not helpless.. in my gnue-form they look like something from outer space :( we have full klingon support in gnue ;-) so, THAT'S what it is.... ;) elwis: did you get your encoding problems fixed? reinhard: I think so, utf-8 for the forms and utf-8 in connections.conf, but I haven't tried yet.. ;) *ouch* gave me such a huge error again, better dig into it suppose I couldn't change enocing in connections.conf all of a sudden.. elwis: that shouldn't be any problem what version of gnue-common are you using, and what ui? gnue-forms-0.5.11.99+svn.20050309 ;DefaultUI = wx LANG=sv_SE.UTF-8 if it matters *** sjc has joined #gnuenterprise elwis: hrmmm.... I am not sure if wx is capable of utf-8 at all you should have more luck with gtk2 ui if your version of gnue-common is recent enough, the encoding in connections.conf should not really matter as it would only be the communication between db and gnue but utf-8 should be a safe choice there anyway ok, I'll go for gtk2 and utf-8 all the way to try it out didn't work you get error message or only strange characters? huuuuge error, I'm changing connections.conf back to iso to check it.. you can paste the last few lines of the error message here the information that the error message is huge doesn't really help much in debugging ;-) there's a post containing swedish charcters, if i change to utf-8 in connections.conf I get a ton of errors when trying to retrieve it with a query true, I wonder how I'll do it though.. can i redirect to logfile, cause this one pop's up a messagebox that 's too big to read what encoding your db created with? dunno ... I'm a postgres rookie, but it looked alright in the console in psql list your db's with \l elwis: it pops up a message box where the full error message is visible? elwis: and you don't have a "Detail >>" button? \? for help in _loadNextRecord f = unicode(f,self._dataObject._connection._encoding) UnicodeDecodeError: 'utf8' codec can't decode bytes in position 1-2: invalid data test=# \encoding SQL_ASCII So, no utf-8 in my postgres I suppose.. ouch [ds@exodus ds]$ echo "\l" |LANG=C psql icsinfo List of databases Name | Owner | Encoding -----------+----------+----------- icsinfo | ds | KOI8 tandem | gnue | UNICODE taxcom | gnue | UNICODE template0 | postgres | SQL_ASCII template1 | postgres | SQL_ASCII (5 rows) so, one could choose unicode for the database? i better google that one (unicode is ok on win also right?) but then i wonder how you made it work in console you mean from psql? yes works nicely, I use "insert into" statement and can get them all? hmm maybe you really have to create the db with unicode but actually if you used gnue-setupdb it should have done that did you check the db list like dimas said above? nope, I tried the command but there's no "icsinfo" gnue | postgres | SQL_ASCII template0 | postgres | SQL_ASCII template1 | postgres | SQL_ASCII test | sel | SQL_ASCII looks like I better make a note about getting the unicode support when creating my "real" db hrm how did you create the db? did you use gnue-setupdb or did you create it "manually"? the "test" I created using "created" statement ok there's a gnue-setupdb for creating and initializing the db that would create it correctly with unicode support I donät remember if I ever got that to work, that might be the cause of it err wait elwis: createdb accepts -E param for encoding you don't use appserver, right? elwis: forget what i said about gnue-setupdb please ignore me from now on :) dimas: yes, I just found that in the postgres manual reinhard: you are an appserver addict :) elwis: I have read through your doc, I think it is quite enjoyable and aside from some typos there is only valid info in it. Great! kilo: you didn't fall asleep, did you :) well, as i said, i liked your style I was a little bit afraid that it were a little bit "too loose" and would not be taken seriously at all for typos: http://www.myjavaserver.com/~elwis/GNUe_for_the_helpless.sxw *** elwis has left #gnuenterprise *** lxf has quit IRC *** dcmwai has quit IRC *** elwis has joined #gnuenterprise *** havoc has joined #gnuenterprise *** havoc has quit IRC *** havoc has joined #gnuenterprise *** johannesV_ has joined #gnuenterprise *** johannesV has quit IRC *** reinhard has quit IRC *** jamest has joined #gnuenterprise johannesV_: you here? *** jamest has quit IRC *** jamest has joined #gnuenterprise *** michael301080 has joined #gnuenterprise al lot better without the Chanserv message, thanks :) probably OT: Can anyone give me advice about plone? thanks, Jamest the one person I know that used it extensively is jcater *** reinhard has joined #gnuenterprise reinhard: i read the appserver userguide last night I want to know how Gnue can interact with it. * jamest is debating changing the way things work here michael301080:interact with it? as in: have a webapplication that shows data out of GNUe or: how can a plone site (or webapplication) have a GNUe back-end? reinhard: i imagine i could access appserver via datasources in a stand alone application reinhard: but i'm wondering if its possible to treat appserver classes like regular python classes so that if a customer class has a defined function of foo then i could in my app get a resultset of customers and do for customer in customerResultSet: customer.foo() michael301080: my zope site hits the postgresql tables directly jamest: that's exactly what you can do michael301080: but I think it wouldn't be too hard to expose gnue-common to zope via a small (few line) product in zope jamest and michael301080: an answer to both of your questions michael301080: i've done this with some other python modules the fellowship of the fsfe runs a plone site with a gnue backend I read on the Gnue site that Gnue Forms can make HTML forms, .. the fun thing there is that plone and gnue run on completely different systems reinhard: nice so if you create a user in plone plone creates the user with zero permissions sends an encrypted mail with user data (also delicate data like birthday, sex, snail address etc that isn't stored on plone side) to the server running gnue a procmailrc then calls a script doing things like f = session.new ('fellow') for (key, value) in variables.items (): f [key] = value reinhard: is this an appserver gnue backend? then the user can pay the fellowship fee via paypal yes of course appserver paypal sends a message to a cgi script on a webpage (can be configured in paypal) upon arrival of payment that webpage sends another encrypted mail to gnue again processed with procmail doing things like f = find_fellow (session, 'fellowship_paypalid', paypalid) p = session.new ('fellowship_payment') p.date = mx.DateTime.strptime (variables ['payment_date'] [0], '%T %b %d, %Y PST') p.amount = int (float (variables ['mc_gross'] [0])) p.fellow = f (variables is a dictionary that's passed by paypal containing amount, date etc) interesting then appserver does in a trigger set a property "ploneactive" to true upon a payment is inserted in another trigger if ploneactive is set to true another encrypted email is sent from gnue back to plone where a procmail runs and changes the role of the user from "Inactive" to "Member" I can tell you that was big fun implementing :) lol how long does this proces usually take? 10 or 20 seconds jamest: using the python language interface, you can access gnue objects just like python objects so if you have an object "customer" you can do customer.name = "fred" that's what I'm after sorta customer.openPayment += value customer.delete () cool customer.dosomethingweird () even cooler i'm debating the merrits of putting all functions into appserver objects if you have an invoice object you can even do c = invoice.customer vs wrapping appserver objects in a custom ajrs object print c.name but you can even do with appserver dealing w/ storage and basic processing on commits print invoice.customer.name it looks like you can still define primary keys other than gnue_id in tables nope you can't you can't? no i musta mis-read something you can define indexes other than gnue_id pk is always gnue_id but they will never be a primary key bad terminology for appserver the gnue_id is the PK aye but if I needed to port an existing app other that uses the customer_id field then i can still use the old table structure and thus the customer_id it doesn't mangle the table field layout not sure if i understand here we have a claim table claim_no is PK then we have a notes table but if you move from 2-tier to appserver you probably have to somehow migrate the data claim_no is FK ref to claim table that relationship can still be maintained in that case I would thanks allready guys, bbl in claim table add the gnue_id field and fill it with the value from claim_no then in notes table claim_no would not refer to claim_no of claim table, but to gnue_id this way appserver would be aware of that link and could do smart things which it can't do otherwise but you have to be aware also that the _ has a special meaning for appserver as it separates the module (namespace) identifier with the actual name gack i have a *lot* of field_names and what of authentication? authentication is TBD planned for next release erm next milestone I mean for 0.5.0 :) what I'm dealing w/ here legacy app written in java lots of new gnue-common based "apps" that create invoices, reports, picktickets, etc, etc i'm moving the java app under netbeans w/coyote (for jython support) and have it working with a thin jython wrapper now I'm wanting to begin migration away from the java app as the UI and logic are tightly coupled to something more like forms with ui and logic seperate with all the logic in gnue (and I'm thinking appserver) my thinking was that w/ appserver i could eliminate my batch jobs I'd seriously recommend that you just play a bit with appserver to get a feeling of what's possible and what isn't and with jython i could keep the swing based front end until i'm ready to replace reinhard: most likely i'll just have to pick a project and roll with it my workload is nuts here and I'm wanting to get a handle on it ditching the high maintenance java crap with even a better designed piece of java crap would help jamest: pick the smallest app and try to do it in appserver yes, exactly what I wanted to propose, too as that thing is a nightmare jamest: I offer support contracts for appserver j/k :) reinhard: what concerns would you have moving to appserver today? as you know it best :) depends on the application number of simultaneous users etc main concerns would be 1. as appserver is not yet multithreaded, it doesn't scale well for a large number of simultaneous users (lekma had to learn this under sweat and tears) i.e. if one user does a query running 5 minutes, all other users are blocked 2. appserver has no security yet 2 is to be adressed in 0.5 and 1 in 0.6 releases but as usual no promises about ETA also we of course have not really *much* experience with using it in production I do for a year now or so in my hotline project but thats 1 simultaneous user and a non-mission-critical system has it really been a year? sigh, life is racing by I think, yes maybe 3. I don't even know whether using appserver is good or bad for performace compared to 2-tier 1 would be a showstopper as i do have ~25 people using the system at this time and that number should grow once we hit the new building 2 would be a minor problem if you have any chance to separate out a smaller, relatively independent subsystem with a smaller simultaneous user base, I'd go for a first test with that (if I were you) 3 is a non issue almost. I'm to the point that i have several apps that do almost the same thing w/ our data. I've got an ajrs.common library but it isn't enough so I'm seriously thinking of refactoring (via netbeans for java, eric for python) this app. using junit and pyunit to create tests as currently i tweak ajrs.common to account for one apps needs and it breaks another app bbl well there's a lot of pros for appserver of course it has a well documented, commented and stable code base it is based on common (so much of what it does is already known to you) and most important of all *** kilo has quit IRC if you have any need we accept patches ;-) anything I do now is based on common :) reinhard: suppose I want to make an extranet, ... and alow customers certain actions on the extranet based on the data that would be in appserver. (if a company is running some of it's business processes on appserver) wouldn't it be easiest to do have appserver storing it's data in a database and ... well, appserver *always* stores data in a db :) have the extranet website interact on a similar database, .. you can read that db out as you like and then setup replication between the two but with direct writing you have to be careful I'm talking 2 DB's here as with appserver, gnue can take care of some things well, replication would mean db1 writes to db2 on snyc and vice versa ? and if the website db writes back to the main db, that means you have write access that isn't checked so you could create inconsistent state I thought that was possible too, although I'm not a replication expert I'm not either gotta run bbl *** reinhard has quit IRC OK *** titopbs has joined #gnuenterprise *** SachaS has joined #gnuenterprise *** michael301080 has left #gnuenterprise *** SachaS has quit IRC *** SachaS has joined #gnuenterprise *** elwis has left #gnuenterprise *** WageMage has joined #gnuenterprise hi Hi folks, any ideas about "system requirements" for gnue on win32 ? (Or is it a "if it can run windows and your database server you'll be fine" kind of deal?) i've not used it on windows in a while, but i'd say the latter i should rephrase that, i've not used it on slower hardware in a while but a few years ago it ran ok w/ win98 and iirc a 450mhz system Ah - should be ok on my 800Mhz 512MB system, then... runs w2k and mysql just fine. Thanks *** havoc has quit IRC *** havoc has joined #gnuenterprise *** derek has quit IRC *** derek has joined #gnuenterprise *** sjc has quit IRC *** sjc has joined #gnuenterprise http://excess.org/urwid/ not sure of that'd be of interest or not for the curses interface but figured i'd post here so it'd be in the logs :) *** havoc_ has joined #gnuenterprise *** cilkay has joined #gnuenterprise *** cilkay has left #gnuenterprise *** tiredbones has quit IRC *** reinhard has joined #gnuenterprise hey reinhard any recent changes in gDebug? hi jamest * jamest doesn't recall seeing anything in the cvs commit logs hi chillywilly but my in house apps don't work w/ gnue svn hmmm, think I need some food badly and trying to set a debug level is giving me index errors ok it was commit 7130 *** WageMage has quit IRC jamest: you found it? no, it doesn't make sense it's the same code only cleaned up there *were* changes in GDebug but the extract_stack() in gDebug is returning an empty [] instead of file info ah hmmmmm gDebug doesn't work w/ psyco what is psyco? http://psyco.sourceforge.net/ like my main app here if __name__ == "__main__": TaxReport.run() rewrite to if __name__ == "__main__": try: import psyco psyco.full() export ImportError: pass TaxReport.run() more than dbls the speed of that report ah well but frags gdebug :) somewhere they have to get that saved time from ;-) *** johannesV_ has quit IRC probably breaks all traceback information then tracebacks still work with psyco which means it would also break gettext but something odd is happening there I mean call stack analysis ok there has been a change to the datasources * jamest is trying to find simple sample ok, in the old datasources you could do prodDatasource = DataSourceWrapper(connections, attributes={'connection': PROD_CONNECTION, 'name': 'dtsProd', 'table': 'invoice', }) batchResultSet = prodDatasource.createResultSet(conditions={'invoice_no':invoiceNumber}, readOnly=1) that should still work actually (from what I can tell) what doesn't work here? sorry, trying to find sample and the sql generated would read (i'm on 2 computers so cut n paste isn't an opton :) select * from invoice where (((invoice_no = '12345'))) the new datasources generate select oid from invoice where (((invoice_no = '12345'))) ah oh that's an accidental breakage so later references to for record in batchResultSet: return record['claim_no'] puke :) the "*" is added if no field is referenced but with our rowid support the rowid is always referenced :) so the "*" never gets into effect any more is that in base? or dbsig base and i can fix thanks, figured you'd know faster than glimpse would :) question is what is best fix well, I think the "*" code might be in dbsig2 i'll dig at the time of sql contruction i'd assume we'd already know the key fields in use I think in DBSIG2/DataObject.py _buildQuery where you have if self._fieldReferences the elif we would maybe like to have an additional flag if any fields were explicitly or implicitly referenced i.e. referenceField() would set a flag to true but those automatic field references for master/detail, primarykey and rowid support would not set it to true (fwiw I suspect the problem would always have been there if you had datasources with master/detail without fields) or sorting for that matter (Sort fields are also added to _fieldReferences) (which I'm not sure I understand why) i never do master/detail datasource in my custom apps so i'd not have tripped it before anything complex I define the sql directly reinhard: at one time we talked about on the fly sort wouldn't that require the sort fields to be referenced in that situation? on the fly sort == resorting an existing resultSet? yes, that would require that yes or you mean sorting newly inserted records into the right position automatically? the former so in a form you could select your sort order via a dialog well, resorting would then need the *new* sort fields referenced not those that the query is sorted by anyway well, to sort back those would be needed too :) it would only have included the fields referenced so fields not used in sort or implicitly would be out of the game :) fwiw: i have no idea if that's why it's referenced but it's the one thing I can think of that might have made it included ok now what about the fix? i'm still reading datasource code and trying to remember how it all fits together it's only been what now? 5 years? should I try one? I could commit and you could test :) :) sure, if you know where to put it as I'm still re-groking the dataobject/datasource connection lol #disable the count query and see if anyone screams. #recordCount = self._getQueryCount(conditions,sql) # ARGH!!!! Oh, the agony... the agony.... as a bit of history some dbsig drivers used to not return a proper rowcount it'd always be 0 does SELECT oid, * FROM table work? on postgresql it will so YES and does SELECT oid, normalfield, * FROM table work? it's perfect :) um, that...lemme check i think so yip with one issue you'll get oid, normalfield, all other fields including a 2nd copy of normalfield jamest: committed it actually I don't even think that this will break anything (the 2nd copy of normalfield) as the code "_fields ['normalfied'] = ..." will just be executed twice right just thought i'd point that out you should be able to try it now as it will slow things down some although it's completely untested well, for that matter a select * is bad programming style anyway IMHO as in a month you might add a CHAR (5000) to that table for some reason and forget about the select * you did in this program the normalfield will only occur if you have your DataSourceWrapper with sorting or with primarykey both cases that wouldn't have worked at all until now (AFAICT) so it's at least an improvement :) looks like that's working now and you have a point on the field references it was added for lazyness so maybe it should not be in there and i'll just adjust my apps to pass in the field names it seems to be not portable either as mysql and others seem to not give the field names also this reading the field names from the cursor object always was a source for problems like when fieldnames are returned by cursor object slightly different than they were passed in the select then lets just ditch it and I'll adjust i think jcater used it as well I think we might want to generate a depreciation warning for some time but he's not here to object :) actually I even think the whole "select where 1 = 2" was only necessary to get the field names for the select * case but I'm not fully sure I understood the rationale behind that bogus select at all that doesn't seem right though as the 1=2 thing was required long before the * was grafted in do you remember why? i'm trying it had something to do with getting a good empty resultset iirc but like the rowcount issue it may be long gone the rowcount issue is not gone :) still there for adodbapi and interbase lol working on a _brokenRowcount parameter for DBSIG2 standard dataobject so adodbapi and interbase don't have to duplicate a few screenfulls of code from DBSIG2 with 2 or 3 lines changed along the lines of the broken fetchmany yes exactly *** titopbs has quit IRC but still got some customer work to finish today :( and so many things I want to clean up in datasources left... reinhard: will someone be able to use parts for python persistency? seems like you are doing parts ofit of it. don't understand that question you mean persistent objects? in a way appserver objects are exactly that yep that is what i meant but with a predefined set of properties and methods interesting to follow what you are doing from far away too far. *** kilo has joined #gnuenterprise this is cool: http://ftp.acc.umu.se/mirror/temp/seth/blog/xshots.html *** titopbs has joined #gnuenterprise time to head to bed night all *** reinhard has quit IRC *** jamest has left #gnuenterprise *** SachaS has quit IRC *** sjc has quit IRC *** sjc has joined #gnuenterprise *** sjc has quit IRC *** titopbs has quit IRC *** kilo has quit IRC *** jamest has joined #gnuenterprise *** cilkay has joined #gnuenterprise hi cilkay hi chillywilly chillywilly: use still python'n ? yea, to various degrees you use unittest? I have been meaning to ;P lol never mind then :) actually I use it on the client side with stinking PHP fine then be that way ;) real men write the test cases first, then the code ;) *** dcmwai has joined #gnuenterprise :) *** cilkay has left #gnuenterprise *** jamest has quit IRC *** holycow has joined #gnuenterprise *** Vee2d2 has quit IRC *** Vee2d2 has joined #gnuenterprise