when I made the switch, this (just below) was working great. With the
latest code it doesn't. I was able to switch my import statements
"from blablabla.sql import DAL" to  "from blablabla.dal import DAL".
Has the syntax changed?

Thanks,

Mart :)

        tbl = tableParam
        for mTbl in db.tables:
            if tbl in mTbl:
                if mTbl.startswith(tbl):
                    rows = db(db[mTbl].name==name).select()
                    for row in rows:
                        if row.name == name and row.value > 0:
                            id = row.id

        if id != None:
            db(db[tbl].name==name).update(name=name,
                                          value=value)
        else:
            db[tbl].insert(name=name,
                               value=value)


On Dec 10, 10:12 am, mdipierro <[email protected]> wrote:
> On Dec 9, 11:49 pm, Michael McGinnis <[email protected]> wrote:
>
> > I could run 1.89.5 (2010-11-21 22:12:54)
> > with ./jython web2py/web2py.py (no cron because no file locking,
> > though) just fine onhttp://127.0.0.1:8000/admin/default/site
> > though I got errors on several other apps 
> > includinghttp://127.0.0.1:8000/welcome/default/index:
> > <type 'exceptions.RuntimeError'>(global name 'sqlite3' is not defined
> > (tried 5 times))
>
> this just means you do not have sqlite with jdbc.
>
>
>
> > For what it's worth, this is what I get when I try to run the old dal
> > as a standalone file:
> > mich...@doulos:~/jython2.5.2rc2$ ./jython dal.py
> > Traceback (most recent call last):
> >   File "dal.py", line 51, in <module>
> >     from utils import md5_hash, web2py_uuid
> > ImportError: No module named utils
>
> hmm. that line is not in line 51.
>
> > On Dec 9, 11:25 pm, mdipierro <[email protected]> wrote:
>
> > > I think the problem is that it not finding any driver. It is not even
> > > defining db.
> > > Did the old dal worked with jython.
>
> > > good pypy works for you. It crashes with "segmentation fault" on me.
>
> > > On Dec 9, 11:17 pm, Michael McGinnis <[email protected]> wrote:
>
> > > > I've never used either one before. But no errors on pypy-1.4.
> > > > For jython-2.5.2rc2, here is a typical message, apparently one of 77:
> > > > **********************************************************************
> > > > File "dal.py", line 4874, in __main__.test_all
> > > > Failed example:
> > > >     db.paper.drop()
> > > > Exception raised:
> > > >     Traceback (most recent call last):
> > > >       File "/home/michael/jython2.5.2rc2/Lib/doctest.py", line 1235,
> > > > in _DocTestRunner__run
> > > >         exec compile(example.source, filename, "single",
> > > >       File "<doctest __main__.test_all[63]>", line 1, in <module>
> > > >         db.paper.drop()
> > > >     NameError: name 'db' is not defined
> > > > **********************************************************************
> > > > 2 items had failures:
> > > >   15 of  15 in __main__
> > > >   62 of  64 in __main__.test_all
> > > > ***Test Failed*** 77 failures.
>
> > > > On Dec 8, 9:28 pm, mdipierro <[email protected]> wrote:
>
> > > > > Can you try jython and pypy and do
>
> > > > > jython dal.py
> > > > > pypy dal.py
>
> > > > > Please report any error.
>
> > > > > Massimo
>
>

Reply via email to