[web2py] DAL update expressions starting with an integer not working?

2014-05-28 Thread Marian
I want to negate a value with this expression: db(db.table.lft 0).update(lft = 0 - db.table.lft) but I get the following TypeError: TypeError: unsupported operand type(s) for -: 'int' and 'Field' My workaround is: db(db.table.lft 0).update(lft = db.table.lft - db.table.lft - db.table.lft)

Re: [web2py] Re: new matplotlib tcl problem

2014-02-19 Thread Marian Siwiak
it. Very best regards, On Wednesday, 17 July 2013 10:54:21 UTC+1, Marian Siwiak wrote: Solved. Explanation below is for future reference, if someone will experience similar problem (as Massimo pointed it in a very gentle way, maybe not that obvious to an external reader, and this solution

Re: [web2py] Re: new matplotlib tcl problem

2013-07-17 Thread Marian Siwiak
web2py to a newest version. * I was a bit afraid it may screw something with my app, but I was S wrong! Problem existed in version 1.99 and magically (yeach, sure!) disappeared in 2.5.1. Thanks, Marian TAG: library problem, compatibility issues, environment variables, external library

[web2py] new matplotlib tcl problem

2013-07-16 Thread Marian Siwiak
Hi, I try to run a module starting with: def mymodule(*variables*): import matplotlib matplotlib.use('Agg') from pymol import * When I call it, I get error - piece of traceback is included below. File /usr/lib/pymodules/python2.7/matplotlib/pyplot.py, line 343, in figure

[web2py] Re: web2py resources

2013-07-16 Thread Marian Siwiak
Does anyone know who runs web2pyslices? Something has gone wrong and it issues tickets... Maybe it's worth to mention it to the admin. On Sunday, 5 May 2013 01:03:06 UTC+2, Anthony wrote: You can post recipes and articles here: http://www.web2pyslices.com. There was at least one wiki in the

[web2py] 100% CPU usage when 20GB of pictures in static

2013-07-15 Thread Marian Siwiak
application folder, but it would be a solution. Best regards, Marian -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com

Re: [web2py] Re: 100% CPU usage when 20GB of pictures in static

2013-07-15 Thread Marian Siwiak
working servers, but maybe I'll have to. Best regards, Marian On Mon, Jul 15, 2013 at 5:38 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Are you accessing it from localhost? I suspect it is the browser which is using 100% of the CPU, not the server. Anyway, it is more efficient to use

[web2py] Re: Problems with parameter-based routing

2013-05-30 Thread Marian
Nobody had issues like this before? :( On Thursday, May 23, 2013 10:06:06 AM UTC+2, Marian wrote: I wanted to switch from pattern-based routing on a Windows IIS7 Server with isapi_wsgi to a parameter-based routing to benefit from nicer urls but it is not working. It either says invalid

[web2py] Re: 2.4.7 problems

2013-05-30 Thread Marian
Ich can confirm the exception, on my local developement system the created cache.shelve has no owner and so it is not readable by the current sys user. When I create an empty cache.shelve by myself it seems to work. On Wednesday, May 29, 2013 12:28:35 PM UTC+2, BlueShadow wrote: I just

[web2py] Re: 2.4.7 problems

2013-05-30 Thread Marian
. Perhaps it's just called nobody, or is it a nonexisting user, or...? Could you please describe how do you start web2py, under which user accounts, etc. etc. Regards, Ales On Thursday, May 30, 2013 9:43:28 AM UTC+2, Marian wrote: I can confirm the exception, on my local developement

[web2py] Re: Problems with parameter-based routing

2013-05-30 Thread Marian
When I change the prefix to e.g. 'w2p' it directs me to /w2p/welcome an there is no endless loop. On Thursday, May 30, 2013 3:12:21 PM UTC+2, Massimo Di Pierro wrote: Do you get the endless loop if the prefix is different from applications? On Thursday, 30 May 2013 02:12:01 UTC-5, Marian

[web2py] Re: Problems with parameter-based routing

2013-05-30 Thread Marian
You imply it goes into a endless redirect loop do you? ;) On Thursday, May 30, 2013 3:36:46 PM UTC+2, Marian wrote: When I change the prefix to e.g. 'w2p' it directs me to /w2p/welcome an there is no endless loop. On Thursday, May 30, 2013 3:12:21 PM UTC+2, Massimo Di Pierro wrote: Do you

Re: [web2py] Re: Problems with parameter-based routing

2013-05-30 Thread Marian
wrote: On 30 May 2013, at 6:36 AM, Marian scor...@gmx.net javascript: wrote: When I change the prefix to e.g. 'w2p' it directs me to /w2p/welcome an there is no endless loop. What are the details of the invalid-response message? On Thursday, May 30, 2013 3:12:21 PM UTC+2, Massimo Di Pierro

Re: [web2py] Re: Problems with parameter-based routing

2013-05-30 Thread Marian
In rewrite.py I see two 303 responses in try_rewrite_on_error and try_redirect_on_error, I think one is responsible for the automatic redirect. On Thursday, May 30, 2013 5:31:54 PM UTC+2, Jonathan Lundell wrote: On 30 May 2013, at 8:24 AM, Marian scor...@gmx.net javascript: wrote: When I

Re: [web2py] Re: Problems with parameter-based routing

2013-05-30 Thread Marian
: 'imagecontest' But it is obviously there. On Thursday, May 30, 2013 5:46:21 PM UTC+2, Marian wrote: In rewrite.py I see two 303 responses in try_rewrite_on_error and try_redirect_on_error, I think one is responsible for the automatic redirect. On Thursday, May 30, 2013 5:31:54 PM UTC+2, Jonathan

Re: [web2py] Problems with parameter-based routing

2013-05-30 Thread Marian
', default_application = 'imagecontest', ), imagecontest = dict(), ) On Thursday, May 30, 2013 6:13:42 PM UTC+2, Jonathan Lundell wrote: On 30 May 2013, at 8:46 AM, Marian scor...@gmx.net javascript: wrote: In rewrite.py I see two 303 responses in try_rewrite_on_error and try_redirect_on_error, I

Re: [web2py] Problems with parameter-based routing

2013-05-30 Thread Marian
and it is somehow not found. On Thursday, May 30, 2013 7:19:31 PM UTC+2, Jonathan Lundell wrote: On 30 May 2013, at 9:40 AM, Marian scor...@gmx.net javascript: wrote: Sorry if it's a repost: I don't use routes_onerror or at least not when testing the parameter-based routing. I tried

[web2py] Problems with parameter-based routing

2013-05-23 Thread Marian
I wanted to switch from pattern-based routing on a Windows IIS7 Server with isapi_wsgi to a parameter-based routing to benefit from nicer urls but it is not working. It either says invalid request or the server stucks in an endless loop. My functioning pattern based routing. As you can see I

Re: [web2py] SQL Server Connection String Please HELP

2013-04-25 Thread Marian
I had big problems with the connection to a mssql server. My working connection string is this: mssql://DRIVER={SQL Server};SERVER=HOST\DATABASE,PORT;UID=USER;PWD=PASSWORD On Wednesday, April 24, 2013 11:16:58 PM UTC+2, Tim Richardson wrote: b =

[web2py] Re: nssm scheduler seems to be a nobrainer...

2013-04-08 Thread Marian
: sys.stderr.write(e.traceback + '\n') sys.exit(1) On Saturday, April 6, 2013 9:37:56 PM UTC+2, Brian M wrote: Did you get it working? If not I can check how I did it on my server later today On Friday, April 5, 2013 7:35:15 AM UTC-5, Marian wrote: Hm maybe I have

[web2py] Re: nssm scheduler seems to be a nobrainer...

2013-04-08 Thread Marian
, 2013 9:28:30 AM UTC+2, Marian wrote: Thank you Niphlod for the slice. :) But sadly it's not working for me. The problem is somehow my application and not nssm. If I define a scheduler in the welcome app it works. In my app even a blank scheduler function fails. In scheduler.py I found

[web2py] Re: nssm scheduler seems to be a nobrainer...

2013-04-08 Thread Marian
I don't use signals, but I found the problem... I linked my application via hardlink into the web2py applications folder so I can work with aptana studio and don't have to mess around with deploying everytime I change something. I guess I need another way to separate web2py and the

[web2py] Re: nssm scheduler seems to be a nobrainer...

2013-04-08 Thread Marian
Hardlinking the whole applications folder into web2py seems to work... On Monday, April 8, 2013 10:36:40 AM UTC+2, Marian wrote: I don't use signals, but I found the problem... I linked my application via hardlink into the web2py applications folder so I can work with aptana studio

[web2py] Re: web2py 2.4.6 is OUT

2013-04-08 Thread Marian
Thank you for this great framework! On Saturday, April 6, 2013 11:36:15 PM UTC+2, Massimo Di Pierro wrote: ## 2.4.6 - better tests - new ANY_OF and IS_IPV6 validators - new custom save option - many small bug fixes The bug fixes are worth the upgrade. Nothing should break. -- ---

[web2py] nssm scheduler seems to be a nobrainer...

2013-04-05 Thread Marian
...but I cannot get it to work. As soon as I start the service via the service console, it terminates without an error code. It tried 32/64 bit version of nssm, w and w/o quotes for the paths. In procexp I see that the python.exe is started but it terminates immediately. pythonw.exe without

[web2py] Re: nssm scheduler seems to be a nobrainer...

2013-04-05 Thread Marian
I dug around in the event log and found: Started C:\Python27\pythonw.exe D:\web2py\web2py.py -K imagecontest for service web2py_scheduler_imagecontest4 in C:\Python27\. Program C:\Python27\pythonw.exe for service web2py_scheduler_imagecontest4 exited with return code 1. Killing process tree

[web2py] Re: nssm scheduler seems to be a nobrainer...

2013-04-05 Thread Marian
involved. On Friday, April 5, 2013 11:34:30 AM UTC+2, Marian wrote: I dug around in the event log and found: Started C:\Python27\pythonw.exe D:\web2py\web2py.py -K imagecontest for service web2py_scheduler_imagecontest4 in C:\Python27\. Program C:\Python27\pythonw.exe for service

[web2py] Re: nssm scheduler seems to be a nobrainer...

2013-04-05 Thread Marian
Hm maybe I have a hint, I found a failed entry in db.scheduler_run: gluon.shell line 137: sys.exit(1). When I try to restart the service, I don't get new failed tasks, so I cannot say where this specific one came from. On Friday, April 5, 2013 1:36:37 PM UTC+2, Marian wrote: That would

Re: [web2py] Re: SQLForm + auth.register OR auth.login

2013-03-25 Thread Marian
I have a model defined like that. There is a reference to the build in auth user. The requirement is to create such submission via an unsecured controller and to register or login on the same page in one step. db.define_table( 'submission', Field('title', requires = IS_NOT_EMPTY()),

[web2py] SQLForm + auth.register OR auth.login

2013-03-15 Thread Marian
I've stuck on this for a while. I need one page where I can create a submission with image uploads etc. and a required reference to auth.user. If the user is logged in it is quite simple but you should create a submission and login OR register on one page? I have no idea how to solve this. :(

[web2py] Re: MSSQL

2013-03-14 Thread Marian
issues, sqlite, mysql, and postgres all support ISO8601 with an optional T. On Wednesday, March 13, 2013 1:28:30 PM UTC-7, Marian wrote: ISO 8601 format seems to be a better format, at least for mssql. Patching this maybe can lead to compatibility issues. I don't know. :( -- --- You

[web2py] MSSQL

2013-03-13 Thread Marian
Somehow my web2py is not working with my mssql database anymore. I am pretty sure it worked yesterday. Today it seems every log_event in auth fails. Even the welcome app fails on register an user. I dropped all tables and even recreated the database. Nothing works anymore. web2py™ Version

[web2py] MSSQL

2013-03-13 Thread Marian
Since yesterday my web2py cannot log events to a mssql database any more. I'm pretty sure yesterday everything worked fine. Even the welcome app fails on register now. I dropped every table, delete the database logs and even recreated the database itself. I'm always getting a char to datetime

[web2py] Re: MSSQL

2013-03-13 Thread Marian
The connection string is: mssql://USER:PASSWORD@HOST/DATABASE The auth_events table is the build in table of auth. I did not customize it but I customized auth_user. auth.settings.extra_fields['auth_user']=[ Field('image', 'upload', default='', autodelete=True,

[web2py] Re: MSSQL

2013-03-13 Thread Marian
Ah ok sorry. The structure is like this: id (PS, int, NOT NULL) time_stamp (datetime, NULL) client_ip (varchar(512), NULL) user_id (FS, int, NULL) origin (varchar(512), NULL) description (text, NULL) -- --- You received this message because you are subscribed to the Google Groups web2py-users

[web2py] Re: MSSQL

2013-03-13 Thread Marian
I am running on Windows 7 Ent. 64, with Python 2.7.2 x64 as you also can see in the log. It seems it fails even if I do not insert a timestamp. Created by Massimo Di Pierro, Copyright 2007-2013 Version 2.4.4-stable+timestamp.2013.03.11.20.32.00 Database drivers available: SQLite(sqlite3),

[web2py] Re: MSSQL

2013-03-13 Thread Marian
The databse driver is pyodbc-3.0.6-py2.7 -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit

[web2py] Re: MSSQL

2013-03-13 Thread Marian
Event with odbc syntax it fails like this: import datetime now = datetime.datetime(2013, 3, 13, 15, 2, 9) db.auth_event.insert(client_ip='bogus', time_stamp=now) Traceback (most recent call last): File console, line 1, in module File D:\web2py\gluon\dal.py, line 8443, in insert ret =

[web2py] Re: MSSQL

2013-03-13 Thread Marian
Oh no thank you for your help. :) The user language is german and encoding of the database is Latin1_General_CI_AS. -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an

[web2py] Re: MSSQL

2013-03-13 Thread Marian
Ok I did a quick test and this time it worked: import pyodbc import datetime cnxn = pyodbc.connect('DRIVER={SQL Server Native Client 10.0};SERVER=host;DATABASE=db;UID=user;PWD=pw') cursor = cnxn.cursor() now = datetime.datetime(2013, 3, 13, 15, 2, 9) cursor.execute(insert into

[web2py] Re: MSSQL

2013-03-13 Thread Marian
This works also -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit

[web2py] Re: MSSQL

2013-03-13 Thread Marian
That's why I appreciate your help :) Now there's the DataError: Traceback (most recent call last): File D:\Temp\test_pyodbc.py, line 9, in module cursor.execute(insert into auth_event(time_stamp, client_ip, origin, description) values (?, ?, ?, ?), now, '192.0.0.1', 'origin', 'description'

[web2py] Re: MSSQL

2013-03-13 Thread Marian
Maybe this helps from the web2py error ticket: (self=gluon.dal.MSSQLAdapter object, table=Table auth_event (id, time_stamp,client_ip,user_id,origin,description), fields=[(gluon.dal.Field object, 'auth'), (gluon.dal.Field object, datetime.datetime(2013, 3, 13, 16, 46, 4, 117000)),

[web2py] Re: MSSQL

2013-03-13 Thread Marian
Yes this fails, this is really strange. As said it worked yesterday and it's not a local database server which I restarted or something like that. -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop

[web2py] Re: MSSQL

2013-03-13 Thread Marian
I did a patch in the MSSQLAdapter.represent function. This is the only format working for me. But it is obviously not a good way to implement an own dateformat. elif fieldtype == 'datetime': if isinstance(obj, datetime.datetime): obj = obj.isoformat()[:19]

[web2py] Re: MSSQL

2013-03-13 Thread Marian
Ok that was a good hind. working directly with pyodbc: Working: now = datetime.datetime(2013, 3, 12, 16, 46, 4, 117000).isoformat()[:19].replace('T',' ') Not working: now = datetime.datetime(2013, 3, 13, 16, 46, 4, 117000).isoformat()[:19].replace('T',' ') -- --- You received this message

[web2py] Re: MSSQL

2013-03-13 Thread Marian
import pyodbc import datetime cnxn = pyodbc.connect('DRIVER={SQL Server Native Client 10.0};SERVER=barney;DATABASE=imagecontest_dev;UID=imagecontest2013;PWD=imagecontest2013' ) cursor = cnxn.cursor() now = datetime.datetime(2013, 3, 13, 16, 46, 4, 117000).isoformat()[:19]. replace('T',' ')

[web2py] Re: MSSQL

2013-03-13 Thread Marian
The query is something like this: '2013-03-13 20:59:25' -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more

[web2py] Re: MSSQL

2013-03-13 Thread Marian
This seems to be ANSI SQL format, which seems to be not language neutral http://www.karaszi.com/sqlserver/info_datetime.asp -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it,

[web2py] Re: MSSQL

2013-03-13 Thread Marian
ISO 8601 format seems to be a better format, at least for mssql. Patching this maybe can lead to compatibility issues. I don't know. :( -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving

[web2py] Formatting error message invalid query

2013-03-11 Thread Marian Siwiak
: Please see for yourself: http://nexus.ibb.waw.pl/Transimulation/default/ecoli_manage - type in any two words separated by space. Where can I modify the format of appearing invalid error message? Thank you in advance. Marian -- --- You received this message because you are subscribed

Re: [web2py] Re: Formatting error message invalid query

2013-03-11 Thread Marian Siwiak
{ color: #8fb3f3; } On Monday, March 11, 2013 2:45:10 PM UTC+1, Marian Siwiak wrote: Dear All! I'm sorry if I repeat question earlier asked, but the specifics of it make it quite hard to find using search engine... My problem is, when I am using SQLFORM to interact with database

Re: [web2py] Re: sqlform.grid datable entry vew format

2012-05-28 Thread Marian Siwiak
, fields=[db.t_yeast.f_gene_id, db.t_yeast.f_gene_desc], onupdate=auth.archive, deletable=False, editable=False, create=False, maxtextlength=128, user_signature=False) return locals() view code is default, I never found function called view. best regards, Marian On Mon, May 28, 2012 at 3:09 AM

[web2py] favicon problem

2012-05-28 Thread Marian Siwiak
Hello, I replaced favicon.ico and favicon.png file in static folder of my app, but on my webpage I still get an old icon. Any suggestions? I thought it might be some cache problems, but I used different browser, and still - web2py app icon is there... best regards, Marian

Re: [web2py] Re: sqlform.grid datable entry vew format

2012-05-28 Thread Marian Siwiak
It works now, in html I had to change: {{=BEAUTIFY(response._vars)}} to {{=BEAUTIFY(response._vars['form'])}} br, Marian On Mon, May 28, 2012 at 10:07 AM, Marian Siwiak siw...@gmail.com wrote: Sure: In default.py in controllers, my db is defined like this: def yeast_manage

Re: [web2py] Re: sqlform.grid datable entry vew format

2012-05-28 Thread Marian Siwiak
@Anthony I used a copy of generic.html as a template for my single entry view. Thanks for links! @Massimo Bingo! Thank you very much! Marian W dniu poniedziałek, 28 maja 2012 17:49:50 UTC+2 użytkownik Massimo Di Pierro napisał: I think you want: {{=form}} On Monday, 28 May 2012 05

[web2py] sqlite datetime problem?

2012-05-27 Thread Marian Siwiak
finger motif,ATG,VPS8 SGDID:S2 Verified ORF I get information data uploaded but nothing happens. Any help, please? best regards, Marian

[web2py] Re: java class path

2012-05-27 Thread Marian Siwiak
If someone would be looking for an answer: path can be presented as {{=URL()}}, however for me it worked only when I prepared jar archive. bare .class file is not sufficient. W dniu sobota, 26 maja 2012 15:28:42 UTC+2 użytkownik Marian Siwiak napisał: Hello, I am trying to add java applet

[web2py] sqlform.grid datable entry vew format

2012-05-27 Thread Marian Siwiak
Hello, I've got simple question, to which I cna't find simple answer. I formatted View of my entries, showing fields I want to show, hidin those I don't want to show. When I get page with view of the row of my datable, it starts with form: - how do I remove this? thanks in advance, Marian

Re: [web2py] sqlite datetime problem?

2012-05-27 Thread Marian Siwiak
Thank you very much! For the answer and for web2py! Best regards, Marian W dniu poniedziałek, 28 maja 2012 użytkownik Massimo Di Pierro napisał: If there are empty rows in the CSV files they will perceived as end of data. On Sunday, 27 May 2012 12:08:21 UTC-5, Marian Siwiak wrote: Hi, I

[web2py] java class path

2012-05-26 Thread Marian Siwiak
in: network: Cache entry not found [url: http://127.0.0.1:8000/MyApp/default/some/furhter/path/myJavaApp.class but I didn't find a way to place it there. Help would be much appreciated. best regards, Marian

[web2py] Server setup problem

2012-05-19 Thread Marian Siwiak
www.myserver.pl/path/to/my/application in my browser I get a list of files instead of application index page. Any suggestions where to search for the problem (except PEBCAK)? best regards and thanks in advance, Marian

[web2py] Re: Server setup problem

2012-05-19 Thread Marian Siwiak
they presented? Marian W dniu sobota, 19 maja 2012 18:41:04 UTC+2 użytkownik Niphlod napisał: it seems that apache doesn'0t understand to pass page rendering to mod_wsgi and instead offers the default behaviour (list and send file). Without further details it's quite impossible make some other

Re: [web2py] Re: Server setup problem

2012-05-19 Thread Marian Siwiak
/apache2/error.log /VirtualHost W dniu sobota, 19 maja 2012 19:03:45 UTC+2 użytkownik Jonathan Lundell napisał: On May 19, 2012, at 9:58 AM, Marian Siwiak wrote: Ok. That was helpful. Probably problem is with configuration in /etc/apache2/sites-available one question - online book says

Re: [web2py] Re: Server setup problem

2012-05-19 Thread Marian Siwiak
It looks basically OK to me. I suppose you've verified that /var/www/web2py/wsgihandler.py really is the path to that file? Also, do you see that file, and only that file, from sites-enabled? Thanks for the interest. Path is ok. It's the only file, however, I had to name link

Re: [web2py] Re: Server setup problem

2012-05-19 Thread Marian Siwiak
I quit trying to modify anything and used default settings. I used a script: http://code.google.com/p/web2py/source/browse/scripts/setup-web2py-ubuntu.sh and it worked. Thanks a lot for help! Cheers! Marian W dniu sobota, 19 maja 2012 22:18:07 UTC+2 użytkownik Jonathan Lundell napisał

[web2py] single datable record formatting

2012-05-15 Thread Marian Siwiak
display page. For now it looks like it uses same template db_manage.html, as the table display - I would like to have different template for single record view than I have for whole table. Thanks in advance, Marian

[web2py] Re: single datable record formatting

2012-05-15 Thread Marian Siwiak
It worked as expected. Thank you very much! Marian W dniu wtorek, 15 maja 2012 15:55:54 UTC+2 użytkownik Anthony napisał: In the controller that generates the grid, you can do: if request.args and request.args[-3] == 'view': response.view = 'path/to/other_view.html' or you can use