Interested in Luban, but can not make it work

14 views
Skip to first unread message

Eduardo Bergel

unread,
Jun 11, 2013, 5:53:21 PM6/11/13
to luban...@googlegroups.com
Hi,

Luban seems to be what I am looking for, as I want to migrate a scientific desktop application developed in python to the web.

is Luban still under development??

I have almost no experience with web frameworks. I installed luban under ubuntu 12.10, using python 3.2 (python 2.7 is also installed).

When I first run the examples, I got an error because SQLAlchemy was missing. I installed it and now I get the following message:

user@user-virtual-machine:~/luban$ luban start widgetsdemo
starting cherryd server ...
/usr/local/lib/python3.2/dist-packages/luban/timber/controller/CherrypyFullController.py:64: UserWarning: db not configured: Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/luban/AppConfig.py", line 60, in _retrieveValue
    v = getattr(luban_app_config, name)
AttributeError: 'module' object has no attribute 'db'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/luban/timber/controller/CherrypyFullController.py", line 60, in _initdb
    luban.app_config.db
  File "/usr/local/lib/python3.2/dist-packages/luban/AppConfig.py", line 45, in __getattr__
    return self._retrieveValue(name)
  File "/usr/local/lib/python3.2/dist-packages/luban/AppConfig.py", line 65, in _retrieveValue
    raise RuntimeError(msg)
RuntimeError: Missing option...

Please assign value to option 'db' in /home/user/luban/widgetsdemo/deployments/cherrypy/luban_app_config.py

What it is:
  db configuration dictionary.

    uri: uri of db
    echo: boolean
    convert_unicode: boolean
   

Example
  db = {'uri': 'sqlite:///mydb.sqlite', 'convert_unicode': True, 'echo': False}


  warnings.warn("db not configured: %s" % tb)
[12/Jun/2013:00:51:08] ENGINE Mounted: cherrypy._cptree.Application(<cpapp.Root object at 0x2eb2850>, '') on /
[12/Jun/2013:00:51:08] ENGINE Listening for SIGHUP.
[12/Jun/2013:00:51:08] ENGINE Listening for SIGTERM.
[12/Jun/2013:00:51:08] ENGINE Listening for SIGUSR1.
[12/Jun/2013:00:51:08] ENGINE Bus STARTING
[12/Jun/2013:00:51:08] ENGINE PID 2878 written to '/home/user/luban/widgetsdemo/deployments/cherrypy/cherryd.PID'.
[12/Jun/2013:00:51:08] ENGINE Started monitor thread 'Autoreloader'.
[12/Jun/2013:00:51:08] ENGINE Started monitor thread '_TimeoutMonitor'.
[12/Jun/2013:00:51:08] ENGINE Serving on 0.0.0.0:8080
[12/Jun/2013:00:51:08] ENGINE Bus STARTED
127.0.0.1 - - [12/Jun/2013:00:51:10] "GET / HTTP/1.1" 200 10154 "" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:16.0) Gecko/20100101 Firefox/16.0"
[12/Jun/2013:00:51:10] ENGINE Error in background task thread function <bound method Autoreloader.run of <cherrypy.process.plugins.Autoreloader object at 0x2b5e9d0>>.
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/cherrypy/process/plugins.py", line 485, in run
    self.function(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.2/dist-packages/cherrypy/process/plugins.py", line 607, in run
    for filename in self.sysfiles() | self.files:
  File "/usr/local/lib/python3.2/dist-packages/cherrypy/process/plugins.py", line 593, in sysfiles
    for k, m in sys.modules.items():
RuntimeError: dictionary changed size during iteration

Exception in thread Autoreloader:
Traceback (most recent call last):
  File "/usr/lib/python3.2/threading.py", line 740, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.2/dist-packages/cherrypy/process/plugins.py", line 485, in run
    self.function(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.2/dist-packages/cherrypy/process/plugins.py", line 607, in run
    for filename in self.sysfiles() | self.files:
  File "/usr/local/lib/python3.2/dist-packages/cherrypy/process/plugins.py", line 593, in sysfiles
    for k, m in sys.modules.items():
RuntimeError: dictionary changed size during iteration

127.0.0.1 - - [12/Jun/2013:00:51:10] "GET /static/css/widgetsdemo.css HTTP/1.1" 304 - "http://localhost:8080/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:16.0) Gecko/20100101 Firefox/16.0"

thanks

Eduardo

linjiao

unread,
Jun 12, 2013, 2:28:33 AM6/12/13
to luban...@googlegroups.com
Hi Eduardo,

Thanks for your interests in luban.

When you ran the examples first time, and saw the error message about missing SQLAlchemy, did you see a web browser window showing up with a web page? That error message actually does not matter, and it should not prevent you from seeing your first example running. 

After you install sqlalchemy, luban assumes that you are going to use database. And it will try to get db information from the luban_app_config.py under <project>/deployments/cherrypy/. But that error still should not prevent you from seeing the example running -- you should see a new web browser window (or a new tab, if a browser window already exists somewhere in your desktop. btw, under ubuntu, your existing browser window may be in a different workspace!).

Please give the simplest example (hello world) a try, and see if it works. Let me know if you still cannot find the browser window with the new web application.

I just tested it on ubuntu 12.04 and it is working as expected. I don't have an installation of 12.10, but I will test it under 13.04 tomorrow.

Thanks!
Jiao
Reply all
Reply to author
Forward
0 new messages