tg-admin sql create problem.

12 views
Skip to first unread message

Ant

unread,
Jun 28, 2007, 4:38:01 AM6/28/07
to TurboGears
Hi all,

I have a problem running sql create. I have developed a basic app on
my windows box, and am now trying to deploy it on my Linux server. The
differences (apart from OS) are as follows:

Windows Gentoo
Python 2.5 2.4
sqlite (builtin) 3.3.12
pysqlite (builtin) 2.3.1
turbogears 1.0.2.2 1.0.2.2


tg-admin sql create works like a charm on Windows. However I have run
into various problems on the server.

Initially, I got the following issue:
File "/usr/lib/python2.4/ConfigParser.py", line 570, in _interpolate
raise InterpolationMissingOptionError(
ConfigParser.InterpolationMissingOptionError: Bad value substitution:
section: [global]
option : sqlobject.dburi
key : current_dir_uri
rawval : "sqlite://%(current_dir_uri)s/devdata.sqlite"

This I "solved" by hardcoding in the current directory (not ideal of
course). It got a bit further, but now it thinks it can't import
identity from turbogears:

File "/usr/lib/python2.4/site-packages/SQLObject-0.7.7-py2.4.egg/
sqlobject/util/moduleloader.py", line 5, in load_module
mod = __import__(module_name)
File "/srv/tg/ludwig/ludwig/model.py", line 4, in ?
from turbogears import identity
ImportError: cannot import name identity

However, python has no trouble importing it:

Python 2.4.3 (#1, Jan 2 2007, 22:23:32)
[GCC 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from turbogears import identity
>>>

Does anyone have any ideas on this issue?

--
Ant...

http://antroy.blogspot.com/

Jorge Vargas

unread,
Jun 28, 2007, 9:59:44 AM6/28/07
to turbo...@googlegroups.com
this seems like an instalation issue, are you using the system's SO
and a easy_installed TG? gentoo's management for setuptools is simply
not present and emerged packages won't see easy_installed packages
(although the other way around it works if I recall correctly)

my suggestion will be to remove all emerged packages and have a full
TG stack, in fact it will be even better if you use something like
workingenv that way you will know you have the best versions of each
dependency, for example SO 0.7 is very old!
>
> --
> Ant...
>
> http://antroy.blogspot.com/
>
>
> >
>

Ant

unread,
Jun 28, 2007, 11:05:53 AM6/28/07
to TurboGears

> this seems like an instalation issue, are you using the system's SO
> and a easy_installed TG? gentoo's management for setuptools is simply
> not present and emerged packages won't see easy_installed packages
> (although the other way around it works if I recall correctly)

It seems that this was exactly the problem. I unemerged pysqlite, and
easy_installed it. Updated SQLObject while I was at it. The database
was created without problems this time!

Thanks for the help,

--
Ant...

http://antroy.blogspot.com/


Reply all
Reply to author
Forward
0 new messages