Hi Massimo,
you can ignore this. I unintentionally ran python3 instead python2.
My mistake, sorry about that.
Marin
On Mon, Sep 12, 2011 at 2:28 PM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:
> can you try again please? What os?
>
> On Sep 12, 6:15 am, Marin Pranjić wrote:
> > Trac
can you try again please? What os?
On Sep 12, 6:15 am, Marin Pranjić wrote:
> Traceback (most recent call last):
> File "web2py.py", line 16, in
> import gluon.widget
> File "/srv/test/web2py/gluon/__init__.py", line 15, in
> from globals import current
> ImportError: No module name
Thanks, it is easy to see how the default parameter gets changed with that
example since the binding passes back outside the function through the
return value, gets assigned to another variable and then the container
contents modified through that assignment.
>>> def f(a={}): return a
...
>>> x=f()
>>> x[1]=1
>>> print x
{1: 1}
>>> y=f()
>>> print y
{1: 1}
On Mar 3, 5:49 pm, ron_m wrote:
> Ah Ok, I was trying to reproduce with a simple program containing a couple
> of classes with a main all in one file but it did not exhibit the problem
> behaviour.
Ah Ok, I was trying to reproduce with a simple program containing a couple
of classes with a main all in one file but it did not exhibit the problem
behaviour. So having the classes in a module is part of the recipe and lists
and dicts are passed around as object references to the container leav
class DAL:
def __init__(self,...,driver_args={})
so because this is defined in a module, every time driver_args is not
passed it is set to {}, the same {}. If one app changes, the default
changes for all apps. It is kind of counter intuitive but it works
that way.
It is very dangerous to set a
Wow that fixed it. You are a Python Ninja :-)
I would sure like to know what the mechanism was that caused driver_args to
bleed from SQLLite to the other adapters even though it is defaulted it to
an empty dict on the class initializer. I also printed driver_args as the
first line of code in DA
please try change line in dal
args =
(self,uri,pool_size,folder,db_codec,credential_decoder,driver_args)
to
args =
(self,uri,pool_size,folder,db_codec,credential_decoder,driver_args or
{})
On Mar 3, 4:07 pm, ron_m wrote:
> I just downloaded the nightly build, unpacked it, copied over my appl
I just downloaded the nightly build, unpacked it, copied over my application
and get the same problem.
I don't have a problem with 1.92.1. I don't normally use trunk but test it
once in a while to see what is coming. :-)
Ron
You must be using trunk. I think this is a bug in trunk but not
stable. Thanks for reporting it.
Massimo
On Mar 3, 2:02 pm, ron_m wrote:
> Additional information:
>
> I added a print to the front end of DAL.__init__ and was surprised to find
> driver_args was set to {'check_same_thread': False}
Additional information:
I added a print to the front end of DAL.__init__ and was surprised to find
driver_args was set to {'check_same_thread': False} but I did not set it in
my db = DAL() class constructor call.
So here is the issue. I start up the development environment on Linux with a
term
Thanks lots. All fixed.
On Nov 4, 5:01 pm, mdipierro wrote:
> Check if fixed.
>
> On Nov 4, 9:17 am, rochacbruno wrote:
>
>
>
> > +1
>
> > Enviado via iPhone
>
> > Em 04/11/2010, às 11:33, Seeker escreveu:
>
> > > Hi,
>
> > > In trunk:
> > > Not sure if i have done something wrong, but admin
Check if fixed.
On Nov 4, 9:17 am, rochacbruno wrote:
> +1
>
> Enviado via iPhone
>
> Em 04/11/2010, às 11:33, Seeker escreveu:
>
> > Hi,
>
> > In trunk:
> > Not sure if i have done something wrong, but admin seems to be without
> > a layout ...
> > Anyone else experiencing this?
>
> > Thanks.
>
please try again
On Jul 22, 1:43 am, David Marko wrote:
> Applying latest trunk I'm getting following error on console when
> navigating the first page e.g.http://localhost:8000
>
> ERROR:root:Traceback (most recent call last):
> File "c:\java\google_appengine\web2py\gluon\main.py", line 384, i
fixed
On 11 Giu, 14:39, Jose wrote:
> Hello,
>
> The next model is broken by a change in the trunk.
>
> db.define_table('TA',
> Field('f1'),
> Field('f2'),
> format='%(f1)s'
> )
>
> db.define_table('TB',
> Field('f1'),
> Field('f2', db.TA),
> )
>
> controller:
>
> def test():
15 matches
Mail list logo