The new version is completely broke in linux too, I confirm this.
Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\Python26\lib\threading.py", line 525, in __bootstrap_inner
self.run()
File "C:\Users\Brian\Documents\development\web2py\google hg
repo\trunk\gluon\s
cheduler.py", line 196, in run
self.send_heartbeat(counter)
File "C:\Users\Brian\Documents\development\web2py\google hg
repo\trunk\gluon\s
cheduler.py", line 425, in send_heartbeat
self.define_tables(self.db_thread,migrate=False)
File "C:\Users\Brian\Documents\development\web2py\google hg
repo\trunk\gluon\s
cheduler.py", line 289, in define_tables
default=current.request.application,writable=False),
AttributeError: 'thread._local' object has no attribute 'request'
2011/9/4 Massimo Di Pierro <[email protected]>
> Can you try delete everything in yourapp/databases
> Do not schedule any task.
> In scheduler.py replace
> default=current.request.application
> with
> default=None
> run
>
> python web2py.py -K yourapp
>
> What output do you get?
>
> Massimo
>
> On Sep 3, 11:12 pm, Brian M <[email protected]> wrote:
> > OK, finally managed to pull new trunk off of google code. :) Still
> doesn't
> > seem to be working on Windows. :(
> >
> > 1. The necessary DB tables don't ever seem to get created without user
> > intervention. I had to temporarily edit gluon/scheduler.py to have
> > migrate=True in the __init__ of the scheduler class. Looks like if
> you run
> > scheduler.py directly it is supposed to do it automatically, but that
> just
> > fails (see #4)
> > 2. Once I got the DB tables defined I was able to insert
> scheduler_task
> > records OK.
> > 3. Running python web2py.py -K scheduler resulted in a TON of new
> python
> > processes starting - about one a second or so.
> > 1. Hitting ctrl+c seemed to result in as least one of the workers
> > trying to do its thing - it checked for and found my demo1 task and
> said it
> > was starting it...but the task doesn't seem to have actually run.
> (Output of
> > test run is at bottom of this message)
> > 4. Trying to run python gluon/scheduler.py still dies because it can't
> > find DAL. Not sure if this is currently intended to work though.
> >
> > Console output of test run of scheduler (rev2362) on Windows 7 with
> Python
> > 2.6.4
> >
> ---------------------------------------------------------------------------
> -------------------------------------------
> > C:\Users\Brian\Documents\development\web2py\google hg repo\trunk>python
> > web2py.py -K scheduler
> > web2py Web Framework
> > Created by Massimo Di Pierro, Copyright 2007-2011
> > Version 1.98.2 (2011-09-03 22:19:50)
> > Database drivers available: SQLite3, pymysql, MSSQL/DB2, mongoDB
> > starting scheduler for "scheduler"...
> > web2py Web Framework
> > Created by Massimo Di Pierro, Copyright 2007-2011
> > Version 1.98.2 (2011-09-03 22:19:50)
> > Database drivers available: SQLite3, pymysql, MSSQL/DB2, mongoDB
> > starting scheduler for "scheduler"...
> > web2py Web Framework
> > Created by Massimo Di Pierro, Copyright 2007-2011
> > Version 1.98.2 (2011-09-03 22:19:50)
> > Database drivers available: SQLite3, pymysql, MSSQL/DB2, mongoDB
> > starting scheduler for "scheduler"...
> > web2py Web Framework
> > Created by Massimo Di Pierro, Copyright 2007-2011
> > Version 1.98.2 (2011-09-03 22:19:50)
> > Database drivers available: SQLite3, pymysql, MSSQL/DB2, mongoDB
> > starting scheduler for "scheduler"...
> > Traceback (most recent call last):
> > File "<string>", line 1, in <module>
> > File "C:\Python26\lib\multiprocessing\forking.py", line 341, in main
> > prepare(preparation_data)
> > File "C:\Python26\lib\multiprocessing\forking.py", line 456, in prepare
> > '__parents_main__', file, path_name, etc
> > File "C:\Users\Brian\Documents\development\web2py\google hg
> > repo\trunk\web2py.
> > py", line 16, in <module>
> > import gluon.widget
> > File "C:\Users\Brian\Documents\development\web2py\google hg
> > repo\trunk\gluon\_
> > _init__.py", line 15, in <module>
> > from globals import current
> > File "C:\Users\Brian\Documents\development\web2py\google hg
> > repo\trunk\gluon\g
> > lobals.py", line 21, in <module>
> > from html import xmlescape, TABLE, TR, PRE
> > File "C:\Users\Brian\Documents\development\web2py\google hg
> > repo\trunk\gluon\h
> > tml.py", line 17, in <module>
> > import sanitizer
> > File "C:\Users\Brian\Documents\development\web2py\google hg
> > repo\trunk\gluon\s
> > anitizer.py", line 21, in <module>
> > from xml.sax.saxutils import quoteattr
> > File "C:\Python26\lib\xml\sax\__init__.py", line 61, in <module>
> > import os, sys
> > KeyboardInterrupt Because I hit ctrl+c after the 4th time web2py loaded
> > itself.
> > DEBUG:root:defining tables (migrate=False)
> > DEBUG:root:thread building own DAL object
> > DEBUG:root:defining tables (migrate=False)
> > DEBUG:root:looping...
> > Exception in thread Thread-1:
> > Traceback (most recent call last):
> > File "C:\Python26\lib\threading.py", line 525, in __bootstrap_inner
> > self.run()
> > File "C:\Users\Brian\Documents\development\web2py\google hg
> > repo\trunk\gluon\s
> > cheduler.py", line 196, in run
> > self.send_heartbeat(counter)
> > File "C:\Users\Brian\Documents\development\web2py\google hg
> > repo\trunk\gluon\s
> > cheduler.py", line 425, in send_heartbeat
> > self.define_tables(self.db_thread,migrate=False)
> > File "C:\Users\Brian\Documents\development\web2py\google hg
> > repo\trunk\gluon\s
> > cheduler.py", line 289, in define_tables
> > default=current.request.application,writable=False),
> > AttributeError: 'thread._local' object has no attribute 'request'
> >
> > DEBUG:root: grabbing all queued tasks
> > DEBUG:root: grabbed 1 tasks
> > DEBUG:root: releasing all but one (running)
> > DEBUG:root: new scheduler_run record
> > INFO:root:new task 3 "demo1" scheduler.demo1
> > DEBUG:root: new task allocated: scheduler.demo1
> > DEBUG:root: task starting
> > web2py Web Framework
> > Created by Massimo Di Pierro, Copyright 2007-2011
> > Version 1.98.2 (2011-09-03 22:19:50)
> > Database drivers available: SQLite3, pymysql, MSSQL/DB2, mongoDB
> > starting scheduler for "scheduler"...
> > web2py Web Framework
> > Created by Massimo Di Pierro, Copyright 2007-2011
> > Version 1.98.2 (2011-09-03 22:19:50)
> > Database drivers available: SQLite3, pymysql, MSSQL/DB2, mongoDB
> > starting scheduler for "scheduler"...
> > web2py Web Framework
> > Created by Massimo Di Pierro, Copyright 2007-2011
> > Version 1.98.2 (2011-09-03 22:19:50)
> > Database drivers available: SQLite3, pymysql, MSSQL/DB2, mongoDB
> > starting scheduler for "scheduler"...
> > web2py Web Framework
> > Created by Massimo Di Pierro, Copyright 2007-2011
> > Version 1.98.2 (2011-09-03 22:19:50)
> > Database drivers available: SQLite3, pymysql, MSSQL/DB2, mongoDB
> > starting scheduler for "scheduler"...
> > web2py Web Framework
> > Created by Massimo Di Pierro, Copyright 2007-2011
> > Version 1.98.2 (2011-09-03 22:19:50)
> > Database drivers available: SQLite3, pymysql, MSSQL/DB2, mongoDB
> > starting scheduler for "scheduler"...
> > web2py Web Framework
> > Created by Massimo Di Pierro, Copyright 2007-2011
> > Version 1.98.2 (2011-09-03 22:19:50)
> > Database drivers available: SQLite3, pymysql, MSSQL/DB2, mongoDB
> > starting scheduler for "scheduler"...
> > web2py Web Framework
> > Created by Massimo Di Pierro, Copyright 2007-2011
> > Version 1.98.2 (2011-09-03 22:19:50)
> > Database drivers available: SQLite3, pymysql, MSSQL/DB2, mongoDB
> > starting scheduler for "scheduler"...
> > web2py Web Framework
> > Created by Massimo Di Pierro, Copyright 2007-2011
> > Version 1.98.2 (2011-09-03 22:19:50)
> > Database drivers available: SQLite3, pymysql, MSSQL/DB2, mongoDB
> > starting scheduler for "scheduler"...
> > web2py Web Framework
> > Created by Massimo Di Pierro, Copyright 2007-2011
> > Version 1.98.2 (2011-09-03 22:19:50)
> > Database drivers available: SQLite3, pymysql, MSSQL/DB2, mongoDB
> > starting scheduler for "scheduler"...
> > web2py Web Framework
> > Created by Massimo Di Pierro, Copyright 2007-2011
> > Version 1.98.2 (2011-09-03 22:19:50)
> > Database drivers available: SQLite3, pymysql, MSSQL/DB2, mongoDB
> > starting scheduler for "scheduler"...
> > web2py Web Framework
> > Created by Massimo Di Pierro, Copyright 2007-2011
> > Version 1.98.2 (2011-09-03 22:19:50)
> > Database drivers available: SQLite3, pymysql, MSSQL/DB2, mongoDB
> > starting scheduler for "scheduler"...
> > web2py Web Framework
> > Created by Massimo Di Pierro, Copyright 2007-2011
> > Version 1.98.2 (2011-09-03 22:19:50)
> > Database drivers available: SQLite3, pymysql, MSSQL/DB2, mongoDB
> > starting scheduler for "scheduler"...
>
--
http://martin.tecnodoc.com.ar