I am new to Tinyerp. I have installed tinyerp-server-4.2.0-rc2 on debian etch.
the server starts fine, I can connect with the GTK cient installed on remote
system. I have installed eTiny-0.0.1 on the server. etiny startsfine.
command line output
> python2.4 ./start-tinyerp.py
2007-08-22 18:31:58,853 cherrypy.msg INFO CONFIG: Server parameters:
2007-08-22 18:31:58,854 cherrypy.msg INFO CONFIG: server.environment:
development
2007-08-22 18:31:58,854 cherrypy.msg INFO CONFIG: server.log_to_screen: True
2007-08-22 18:31:58,854 cherrypy.msg INFO CONFIG: server.log_file:
2007-08-22 18:31:58,855 cherrypy.msg INFO CONFIG: server.log_tracebacks: True
2007-08-22 18:31:58,855 cherrypy.msg INFO CONFIG: server.log_request_headers:
True
2007-08-22 18:31:58,855 cherrypy.msg INFO CONFIG: server.protocol_version:
HTTP/1.0
2007-08-22 18:31:58,855 cherrypy.msg INFO CONFIG: server.socket_host:
2007-08-22 18:31:58,856 cherrypy.msg INFO CONFIG: server.socket_port: 8080
2007-08-22 18:31:58,856 cherrypy.msg INFO CONFIG: server.socket_file:
2007-08-22 18:31:58,856 cherrypy.msg INFO CONFIG: server.reverse_dns: False
2007-08-22 18:31:58,857 cherrypy.msg INFO CONFIG: server.socket_queue_size: 5
2007-08-22 18:31:58,857 cherrypy.msg INFO CONFIG: server.thread_pool: 10
2007-08-22 18:31:59,068 cherrypy.msg INFO HTTP: Serving HTTP on
http://localhost:8080/
64.237.115.60 - - "GET / HTTP/1.1" 401 32499 "" "Mozilla/5.0 (Windows; U;
Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"
64.237.115.60 - - "GET / HTTP/1.1" 401 32499 "" "Mozilla/5.0 (X11; U; Linux
i686; en-US; rv:1.8.1.6) Gecko/20070723 Iceweasel/2.0.0.6
(Debian-2.0.0.6-0etch1)"
the browser displays this
NameError Python 2.4.4: /usr/bin/python
Wed Aug 22 18:45:39 2007
A problem occurred in a Python script. Here is the sequence of function calls
leading up to the error, in the order they occurred.
/var/lib/python-support/python2.4/cherrypy/_cphttptools.py in
_run(self=<cherrypy>)
103 applyFilters('before_main')
104 if self.execute_main:
105 self.main()
106 break
107 except cherrypy.InternalRedirect, ir:
self = <cherrypy>, self.main = <bound method Request.main of <cherrypy>>
/var/lib/python-support/python2.4/cherrypy/_cphttptools.py in
main(self=<cherrypy>, path='/')
252 self.object_path = '/' + '/'.join(object_path[1:])
253 try:
254 body = page_handler(*virtual_path, **self.params)
255 except Exception, x:
256 if hasattr(x, "args"):
body undefined, page_handler = <function>, virtual_path = [], self =
<cherrypy>, self.params = {}
/usr/lib/eTiny-0.0.1/tinyerp/tinyres.py in wrapper(*args=(), **kw={})
124
125 cherrypy.response.status = 401
126 return _login(cherrypy.request.path, message=message,
dblist=dblist, db=db, user=user, action=action, origArgs=get_orig_args(kw))
127
128 # Authorized. Set db, user name in cookies
global _login = <function>, global cherrypy = <module>, cherrypy.request =
<cherrypy>, cherrypy.request.path = '/', message = None, dblist = ['terp',
'hgnterp'], db = None, user = None, action = None, origArgs undefined,
get_orig_args = <function>, kw = {}
/usr/lib/eTiny-0.0.1/<string> in _login(target='/', dblist=['terp',
'hgnterp'], db=None, user=None, action=None, message=None, origArgs={},
*_decorator__varargs=(), **_decorator__kwargs={})
/var/lib/python-support/python2.4/turbogears/controllers.py in
expose(func=<function>, *args=('/',), **kw={'action': None, 'db': None,
'dblist': ['terp', 'hgnterp'], 'message': None, 'origArgs': {}, 'user': None})
332 else:
333 cherrypy.request.in_transaction = True
334 output = database.run_with_transaction(
335 func._expose, func, accept, func._allow_json,
336 *args, **kw)
output undefined, global database = <module>, database.run_with_transaction =
<function>, func = <function>, func._expose = <function>, accept =
'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5',
func._allow_json = False, args = ('/',), kw = {'action': None, 'db': None,
'dblist': ['terp', 'hgnterp'], 'message': None, 'origArgs': {}, 'user': None}
/usr/lib/eTiny-0.0.1/<string> in run_with_transaction(func=<function>,
*args=(<function>,
'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5',
False, '/'), **kw={'action': None, 'db': None, 'dblist': ['terp', 'hgnterp'],
'message': None, 'origArgs': {}, 'user': None})
/var/lib/python-support/python2.4/turbogears/database.py in
so_rwt(func=<function>, *args=(<function>,
'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5',
False, '/'), **kw={'action': None, 'db': None, 'dblist': ['terp', 'hgnterp'],
'message': None, 'origArgs': {}, 'user': None})
258 try:
259 try:
260 retval = func(*args, **kw)
261 commit_all()
262 return retval
retval undefined, func = <function>, args = (<function>,
'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5',
False, '/'), kw = {'action': None, 'db': None, 'dblist': ['terp', 'hgnterp'],
'message': None, 'origArgs': {}, 'user': None}
/usr/lib/eTiny-0.0.1/<string> in _expose(func=<function>,
accept='text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5',
allow_json=False, *args=('/',), **kw={'action': None, 'db': None, 'dblist':
['terp', 'hgnterp'], 'message': None, 'origArgs': {}, 'user': None})
/var/lib/python-support/python2.4/turbogears/controllers.py in
(_func=<function>,
accept='text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5',
allow_json=False, *args=('/',), **kw={'action': None, 'db': None, 'dblist':
['terp', 'hgnterp'], 'message': None, 'origArgs': {}, 'user': None})
349 *args, **kw:
350 _execute_func(_func, template, format, content_type,
351 mapping, fragment, args, kw)))
352
353 if allow_json:
mapping = None, fragment = False, args = ('/',), kw = {'action': None, 'db':
None, 'dblist': ['terp', 'hgnterp'], 'message': None, 'origArgs': {}, 'user':
None}
/var/lib/python-support/python2.4/turbogears/controllers.py in
_execute_func(func=<function>, template='tinyerp.templates.login', format=None,
content_type=None, mapping=None, fragment=False, args=('/',), kw={'action':
None, 'db': None, 'dblist': ['terp', 'hgnterp'], 'message': None, 'origArgs':
{}, 'user': None})
389 if template and template.startswith("."):
390 template = func.__module__[:func.__module__.rfind('.')]+template
391 return _process_output(output, template, format, content_type,
mapping, fragment)
392
393 def flash(message):
global _process_output = <function>, output = {'action': None, 'db': None,
'dblist': ['terp', 'hgnterp'], 'message': None, 'origArgs': {}, 'passwd': None,
'target': '/', 'tg_css': [], 'tg_flash': None, 'tg_js_bodybottom': [], ...},
template = 'tinyerp.templates.login', format = None, content_type = None,
mapping = None, fragment = False
/var/lib/python-support/python2.4/turbogears/controllers.py in
_process_output(output={'action': None, 'db': None, 'dblist': ['terp',
'hgnterp'], 'message': None, 'origArgs': {}, 'passwd': None, 'target': '/',
'tg_css': [], 'tg_flash': None, 'tg_js_bodybottom': [], ...},
template='tinyerp.templates.login', format=None, content_type=None,
mapping=None, fragment=False)
80 output = view.render(output, template=template, format=format,
81 mapping=mapping, content_type=content_type,
82 fragment=fragment)
83 else:
84 if content_type:
fragment = False
/var/lib/python-support/python2.4/turbogears/view/base.py in
render(info={'action': None, 'db': None, 'dblist': ['terp', 'hgnterp'],
'message': None, 'origArgs': {}, 'passwd': None, 'target': '/', 'tg_css': [],
'tg_flash': None, 'tg_js_bodybottom': [], ...},
template='tinyerp.templates.login', format='html', content_type='text/html;
charset=utf8', mapping=None, fragment=False)
129 args, kw = adapt_call(engine.render, args= [],
130 kw = dict(info=info, format=format, fragment=fragment,
template=template, mapping=mapping), start=1)
131 return engine.render(**kw)
132
133 def transform(info, template):
engine = <turbokid>, engine.render = <bound method KidSupport.render of
<turbokid>>, kw = {'format': 'html', 'fragment': False, 'info': {'action':
None, 'db': None, 'dblist': ['terp', 'hgnterp'], 'message': None, 'origArgs':
{}, 'passwd': None, 'target': '/', 'tg_css': [], 'tg_flash': None,
'tg_js_bodybottom': [], ...}, 'template': 'tinyerp.templates.login'}
/var/lib/python-support/python2.4/turbokid/kidsupport.py in
render(self=<turbokid>, info={'action': None, 'db': None, 'dblist': ['terp',
'hgnterp'], 'message': None, 'origArgs': {}, 'passwd': None, 'target': '/',
'tg_css': [], 'tg_flash': None, 'tg_js_bodybottom': [], ...}, format='html',
fragment=False, template='tinyerp.templates.login')
156 tclass = template
157 else:
158 tclass = self.load_template(template)
159 log.debug("Applying template %s" % (tclass.__module__))
160 data = dict()
tclass undefined, self = <turbokid>, self.load_template = <bound method
KidSupport.load_template of <turbokid>>, template = 'tinyerp.templates.login'
/var/lib/python-support/python2.4/turbokid/kidsupport.py in
load_template(self=<turbokid>, classname='tinyerp.templates.login',
template_string=None, loadingSite=False)
126 # in self.compiled_templates their mtime.
127 log.debug("Compiling template for %s" % classname)
128 mod = _compile_template(package, basename, tfile,
classname)
129 tclass = mod.Template
130 involved_modules = [classname] +
_get_extended_modules(tclass)
mod undefined, global _compile_template = <function>, package =
'tinyerp.templates', basename = 'login', tfile =
'/usr/lib/eTiny-0.0.1/tinyerp/templates/login.kid', classname =
'tinyerp.templates.login'
/var/lib/python-support/python2.4/turbokid/kidsupport.py in
_compile_template(package='tinyerp.templates', basename='login',
tfile='/usr/lib/eTiny-0.0.1/tinyerp/templates/login.kid',
classname='tinyerp.templates.login')
13
14 def _compile_template(package, basename, tfile, classname):
15 mod = kid.load_template(tfile, name=classname)
16 setattr(sys.modules[package], basename, mod)
17 return mod
mod undefined, global kid = <module>, kid.load_template = <function>, tfile =
'/usr/lib/eTiny-0.0.1/tinyerp/templates/login.kid', name undefined, classname =
'tinyerp.templates.login'
/var/lib/python-support/python2.4/kid/__init__.py in
load_template(file='/usr/lib/eTiny-0.0.1/tinyerp/templates/login.kid',
name='tinyerp.templates.login', cache=1, encoding=None, ns={})
123 code = template.compile(dump_code=cache,
dump_source=os.environ.get('KID_OUTPUT_PY'))
124
125 mod = importer._create_module(code, name, filename, store=cache,
ns=ns)
126 return mod
127
mod undefined, importer = <module>, importer._create_module = <function>, code
= <code>, name = 'tinyerp.templates.login', filename =
'/usr/lib/eTiny-0.0.1/tinyerp/templates/login.kid', store undefined, cache = 1,
ns = {}
/var/lib/python-support/python2.4/kid/importer.py in
_create_module(code=<code>, name='tinyerp.templates.login',
filename='/usr/lib/eTiny-0.0.1/tinyerp/templates/login.kid', store=1, ns={})
54 mod.__ctime__ = time.time()
55 mod.__dict__.update(ns)
56 exec code in mod.__dict__
57 if store:
58 sys.modules[name] = mod
code = <code>, mod = <module>, mod.__dict__ = {'BaseTemplate': <class>,
'COMMENT': 13, 'Comment': <function>, 'DOCTYPE': 4, 'END': 2, 'Element':
<built>, 'ElementStream': <class>, 'PI': 12, 'ProcessingInstruction':
<function>, 'START': 1, ...}
/usr/lib/eTiny-0.0.1/tinyerp/templates/login.py
NameError: ("name 'master' is not defined", <function>)
args = ("name 'master' is not defined", <function>)
the log file for tinyerp-server displays this
Wed, 22 Aug 2007 18:45:39 INFO:pooler:Connecting to None
Wed, 22 Aug 2007 18:45:39 ERROR:web-services:Exception in call: Traceback (most
recent call last):
File "/usr/lib/tinyerp-server/netsvc.py", line 317, in run
r=m(*msg[2:])
File "/usr/lib/tinyerp-server/service/web_services.py", line 292, in login
res = security.login(db, login, password)
File "/usr/lib/tinyerp-server/service/security.py", line 36, in login
cr = pooler.get_db(db).cursor()
File "/usr/lib/tinyerp-server/pooler.py", line 83, in get_db
return get_db_and_pool(db_name)[0]
File "/usr/lib/tinyerp-server/pooler.py", line 45, in get_db_and_pool
db = sql_db.db_connect(db_name)
File "/usr/lib/tinyerp-server/sql_db.py", line 172, in db_connect
tdb = psycopg.connect('%s %s %s %s %s' % (host, port, name, user,
password), serialize=0, maxconn=maxconn)
OperationalError: FATAL: no pg_hba.conf entry for host "206.40.242.152", user
"terp", database "None", SSL off
I looks likeeTiny is connecting to the tinyerp-server but fails to pass the
database_name.
Any hepl would be greatly appreciated
henryg
_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman/listinfo/tinyerp-users