I use Debian (testing), Postgres 9.4,
and Web2py 2.14.6 (with current trunk is problem the same)
I use such command (assigned to an alias) for long time to start my
application
python web2py.py -K codex2020 -X $@
Today I received strange behaviour, errors like
web2py.scheduler TICKER: error assigning tasks
or such something (with no effect if I have deleted scheduler_* tables and
their databases/ metadata earlier)
starting scheduler for "codex2020"...
Currently running 1 scheduler processes
Traceback (most recent call last):
File "/home/mirek/mz/web2py/gluon/restricted.py", line 227, in restricted
exec ccode in environment
File "applications/codex2020/models/scheduler.py", line 80, in <module>
scheduler = Scheduler(db)
File "/home/mirek/mz/web2py/gluon/scheduler.py", line 567, in __init__
self.define_tables(db, migrate=migrate)
File "/home/mirek/mz/web2py/gluon/scheduler.py", line 659, in
define_tables
migrate=self.__get_migrate('scheduler_worker', migrate)
File "/home/mirek/mz/web2py/gluon/packages/dal/pydal/base.py", line 834,
in define_table
table = self.lazy_define_table(tablename,*fields,**args)
File "/home/mirek/mz/web2py/gluon/packages/dal/pydal/base.py", line 873,
in lazy_define_table
polymodel=polymodel)
File "/home/mirek/mz/web2py/gluon/packages/dal/pydal/adapters/base.py",
line 510, in create_table
fake_migrate=fake_migrate
File "/home/mirek/mz/web2py/gluon/packages/dal/pydal/adapters/base.py",
line 623, in migrate_table
self.execute(sub_query)
File
"/home/mirek/mz/web2py/gluon/packages/dal/pydal/adapters/postgres.py", line
362, in execute
return BaseAdapter.execute(self, *a, **b)
File "/home/mirek/mz/web2py/gluon/packages/dal/pydal/adapters/base.py",
line 1388, in execute
return self.log_execute(*a, **b)
File "/home/mirek/mz/web2py/gluon/packages/dal/pydal/adapters/base.py",
line 1382, in log_execute
ret = self.get_cursor().execute(command, *a[1:], **b)
ProgrammingError: column "worker_stats__tmp" is of type json but expression
is of type text
LINE 1: UPDATE scheduler_worker SET worker_stats__tmp=worker_stats;
^
HINT: You will need to rewrite or cast the expression.
Then I decided then if I run without $@, all will start well:
python web2py.py -K codex2020 -X
After testing of everything I went back to:
python web2py.py -K codex2020 -X $@
or
python web2py.py -K codex2020 -X "$@"
and I have now no more the previous problem. All works well.
Has somebody any idea about the reason of problems
and can you explain me the difference between $@ and "$@". Which one is
more safe to use? Is there a difference?
Thanks...
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
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 [email protected].
For more options, visit https://groups.google.com/d/optout.