Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1026 (closed defect: fixed)

Opened 13 years ago

Last modified 12 years ago

tg-admin toolbox doesn't work outside a project's dir

Reported by: alberto Owned by: elvelind
Priority: normal Milestone: 1.0b1
Component: Toolbox Version: 0.9a6
Severity: normal Keywords:
Cc:

Description

When launched outside a project's dir. it barfs with:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools.py", line 103, in _run
    applyFilters('before_main')
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/filters/__init__.py", line 151, in applyFilters
    method()
  File "/Users/alberto/src/turbogears/turbogears/visit/api.py", line 144, in before_main
    visit= _manager.new_visit_with_key( visit_key )
  File "/Users/alberto/src/turbogears/turbogears/visit/sovisit.py", line 43, in new_visit_with_key
    hub.begin()
  File "/Users/alberto/src/turbogears/turbogears/database.py", line 181, in __getattr__
    self.set_hub()
  File "/Users/alberto/src/turbogears/turbogears/database.py", line 189, in set_hub
    raise KeyError, "No database configuration found!"
KeyError: 'No database configuration found!'

This is rather inconvenient when all you need is to preview widgets in the browser. I guess it's related to [1615] since the toolbox is now secured using identity. BTW, why?? I think IP based security was enough as the toolbox is only needed during development. Catwalk can always be protected with SecureObject if needed on production IMO.

Alberto

Change History

comment:1 Changed 13 years ago by roger.demetrescu

Hi Alberto,

I'm pretty sure that this error ("No database configuration found!") was happening before [1615]. I remember talking about it with Godoy a few weeks ago.

comment:2 Changed 13 years ago by roger.demetrescu

Hmmm... forget my last comment. The last releases didn't show this error. Maybe it was fixed a long time ago.

It seems that this error appeared again with [1615]. :(

Cheers,

Roger

comment:3 Changed 13 years ago by elvelind

Yes. the problem is with identity. it needs a db for storing the visit data. I've commited 1622 which solves this by creating a sqlite db and removes it on shutdown.

I need to add something to disable it all if sqlite isn't availible. I'll look at that later today.

comment:4 Changed 13 years ago by alberto

Great! :) Works perfect now (you're right, after installing sqlite...). Thanks

comment:5 Changed 13 years ago by elvelind

  • Owner changed from anonymous to elvelind
  • Status changed from new to assigned

comment:6 Changed 13 years ago by elvelind

  • Status changed from assigned to closed
  • Resolution set to fixed

fixed for real now No need for a db.

comment:7 Changed 13 years ago by alberto

  • Status changed from closed to reopened
  • Resolution fixed deleted

The widget browser at the toolbox now is broken in another way :( It seems that the static directories are not being registered properly or are being "protected" by identity. When loading the widget browser none of the js/css links are being loaded and the logfile is filled with messages like:

127.0.0.1 - - [17/Jul/2006:12:38:25] "GET /tg_widgets/turbogears.widgets/sh/shBrushPython.js HTTP/1.1" 404 1513 "http://localhost:7654/widgets/" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4"
17/Jul/2006:12:38:25 HTTP INFO Page handler: "The path '/tg_widgets/turbogears.widgets/sh/shBrushXml.js' was not found."

The problem was introduced after [1629] (sorry Evelind, I really like using the toolbox outside project's dirs ;) )

comment:8 Changed 13 years ago by elvelind

  • Status changed from reopened to closed
  • Resolution set to fixed

it should finaly be fixed now. It works for me both inside and outside projects.

comment:9 Changed 13 years ago by alberto

It certainly does. Thanks! Alberto

Note: See TracTickets for help on using tickets.