Fail to Create new database

Asked by David

When trying to create a new DB I get the following.

Running: OpenERP Server 7.0-20130923-231151

Client Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/http.py", line 204, in dispatch
    response["result"] = method(self, **self.params)
  File "/usr/lib/pymodules/python2.7/openerp/addons/auth_signup/controllers/main.py", line 39, in get_config
    'signup': icp.get_param(cr, openerp.SUPERUSER_ID, 'auth_signup.allow_uninvited') == 'True',
  File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_config_parameter.py", line 74, in get_param
    ids = self.search(cr, uid, [('key','=',key)], context=context)
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 2356, in search
    return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 4860, in _search
    cr.execute('SELECT "%s".id FROM ' % self._table + from_clause + where_str + order_by + limit_str + offset_str, where_clause_params)
  File "/usr/lib/pymodules/python2.7/openerp/sql_db.py", line 161, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/openerp/sql_db.py", line 226, in execute
    res = self._obj.execute(query, params)
ProgrammingError: relation "ir_config_parameter" does not exist
LINE 1: SELECT "ir_config_parameter".id FROM "ir_config_parameter" W...

Question information

Language:
English Edit question
Status:
Solved
For:
Odoo Server (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Solved by:
David
Solved:
Last query:
Last reply:

This question was originally filed as bug #1229787.

Revision history for this message
David (trancen) said :
#1

When trying to create a new DB I get the following.

Running: OpenERP Server 7.0-20130923-231151

Client Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/http.py", line 204, in dispatch
    response["result"] = method(self, **self.params)
  File "/usr/lib/pymodules/python2.7/openerp/addons/auth_signup/controllers/main.py", line 39, in get_config
    'signup': icp.get_param(cr, openerp.SUPERUSER_ID, 'auth_signup.allow_uninvited') == 'True',
  File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_config_parameter.py", line 74, in get_param
    ids = self.search(cr, uid, [('key','=',key)], context=context)
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 2356, in search
    return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 4860, in _search
    cr.execute('SELECT "%s".id FROM ' % self._table + from_clause + where_str + order_by + limit_str + offset_str, where_clause_params)
  File "/usr/lib/pymodules/python2.7/openerp/sql_db.py", line 161, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/openerp/sql_db.py", line 226, in execute
    res = self._obj.execute(query, params)
ProgrammingError: relation "ir_config_parameter" does not exist
LINE 1: SELECT "ir_config_parameter".id FROM "ir_config_parameter" W...

Revision history for this message
Serpent Consulting Services (serpent-consulting-services) said :
#2

David,

I suspect following reasons:
1. You are trying to create DB as root? (not a common thing though)
2. The py files do not have enough access.

Thanks.

Revision history for this message
David (trancen) said :
#3

That error was from the openerp web interface.

Looking at one of the last files in the error:
lrwxrwxrwx 1 root root 37 Sep 24 10:35 /usr/lib/pymodules/python2.7/openerp/sql_db.py -> /usr/share/pyshared/openerp/sql_db.py

Revision history for this message
Serpent Consulting Services (serpent-consulting-services) said :
#4

David,

So, did you get rid of tit now?

Thanks.

Revision history for this message
David (trancen) said :
#5

I changed that file owner to openerp:openerp and still didn't work. Maybe I will try the other files listed in the error log.

Revision history for this message
David (trancen) said :
#6

Still no joy, still didn't work.

Revision history for this message
Serpent Consulting Services (serpent-consulting-services) said :
#7

All py files need access!

Revision history for this message
Serpent Consulting Services (serpent-consulting-services) said :
#8

Make sure you do not use7.0 code for 6.* compatible database!
It goes for search query I see!

Revision history for this message
David (trancen) said :
#9

I really don't know what happened. I created a new DB monday morning.

I have changed all the files above in their directories to openerp:openerp.

I'm able to use the system with the current DBs I have already.

Just tried, and I was able to make a duplicate of one of the current DBs .

Revision history for this message
David (trancen) said :
#10

I do have a running system. And have had one for a few weeks running 7.xx... For some reason creating the new DBs broke as of this morning, I know I created a new DB monday morning and it was fine. I also rebooted the machine it's running on.

Revision history for this message
Serpent Consulting Services (serpent-consulting-services) said :
#11

David,

This normally happnes due to old db and new code...OR access.

Send me the log file.

Thanks.

Revision history for this message
David (trancen) said :
#12

AH HA!!!!

Silly me, looking at the log file I was going to send you , I saw EXACTLY what was happening. I was messing around with a module. For some reason there was a issue with the "__openerp__.py" I removed the directory I had created for my test module and it now works!!

Thanks for the help in trying to find the source of this issue.

Next time I will look into the log file and not just trust the popup error.

Revision history for this message
Serpent Consulting Services (serpent-consulting-services) said :
#13

Welcome!
Good luck!