Issue 501213
Created on 2002-01-09 08:33 by pohly, last changed 2002-01-11 08:26 by pohly.
msg115 |
Author: [hidden] (pohly) |
Date: 2002-01-09 08:33 |
|
I tried migration from 0.3.0 to the current cvs version.
I used the classic template and never edited dbinit.py,
so I simply copied roundup/templates/classic/dbinit.py
to a copy of the 0.3.0 instance.
Now the following problem occurs:
ratbert:/Projects/psp/roundup/cvs
$ PYTHONPATH=. ./roundup-admin -i ../unstable/tool-issues list user
Traceback (most recent call last):
File "./roundup-admin", line 30, in ?
sys.exit(tool.main())
File "roundup/admin.py", line 987, in main
ret = self.run_command(args)
File "roundup/admin.py", line 912, in run_command
self.db = instance.open('admin')
AttributeError: '_roundup_instance_1' module has no attribute 'open'
As soon as I uncomment the new lines in
IssueClass, then it works again:
class IssueClass(roundupdb.IssueClass):
''' issues need the email information
'''
# INSTANCE_NAME = instance_config.INSTANCE_NAME
ISSUE_TRACKER_WEB = instance_config.ISSUE_TRACKER_WEB
ISSUE_TRACKER_EMAIL = instance_config.ISSUE_TRACKER_EMAIL
ADMIN_EMAIL = instance_config.ADMIN_EMAIL
MAILHOST = instance_config.MAILHOST
MESSAGES_TO_AUTHOR = instance_config.MESSAGES_TO_AUTHOR
# EMAIL_SIGNATURE_POSITION = instance_config.EMAIL_SIGNATURE_POSITION
Enabling either of the two lines causes the failure.
I have a localconfig with
EMAIL_SIGNATURE_POSITION = 'bottom'
INSTANCE_NAME = 'tool-issues'
but this doesn't seem to affect the problem,
I can remove these settings and with the lines
above enabled still get the same error.
|
msg116 |
Author: [hidden] (pohly) |
Date: 2002-01-09 13:06 |
|
Logged In: YES
user_id=416927
Removing these lines isn't the solution to the problem;
I was only hoping that it might help to locate the problem.
In fact, the mail gateway really needs the instance name
and does not work without it.
|
msg117 |
Author: [hidden] (anonymous) |
Date: 2002-01-09 23:05 |
|
Logged In: NO
[richard here - not logged in]
Do you get the same problem with a fresh 0.4 instance?
I just simulated the same setup - having a localconfig
with those two variables - and it worked OK. I guess we
need to figure why the open function isn't being imported.
Can you put some debugging in the instance __init__ and
try to see what's going on there?
|
msg118 |
Author: [hidden] (pohly) |
Date: 2002-01-10 08:18 |
|
Logged In: YES
user_id=416927
Putting
EMAIL_SIGNATURE_POSITION = 'bottom'
INSTANCE_NAME = 'Roundup issue tracker'
into my instance_config.py solves the problem,
so it seems that importing localconfig did not
work. Where do I have to place this file? Putting
it into the same directory as instance_config.py
did not work, as a
try:
from localconfig import *
except ImportError:
localconfig = None
print localconfig
shows - localconfig is None.
Anyway, this is a different problem, and most
likely a user error.
After removing the try/except around import dbinit
(as suggested on the roundup list) reveals the real
problem:
Traceback (most recent call last):
File "./roundup-admin", line 30, in ?
sys.exit(tool.main())
File "roundup/admin.py", line 987, in main
ret = self.run_command(args)
File "roundup/admin.py", line 904, in run_command
instance = roundup.instance.open(self.instance_home)
File "./roundup/instance.py", line 47, in open
return imp.load_package(modname, instance_home)
File "../unstable/tool-issues/__init__.py", line 22, in ?
from dbinit import *
File "../unstable/tool-issues/dbinit.py", line 35, in ?
class IssueClass(roundupdb.IssueClass):
File "../unstable/tool-issues/dbinit.py", line 38, in IssueClass
INSTANCE_NAME = instance_config.INSTANCE_NAME
AttributeError: '_roundup_instance_1.instance_config' module has no attribute 'INSTANCE_NAME'
|
msg119 |
Author: [hidden] (pohly) |
Date: 2002-01-11 08:26 |
|
Logged In: YES
user_id=416927
Putting EMAIL_SIGNATURE_POSITION and
INSTANCE_NAME into the instance's instance_config.py
instead of localconfig works - this is now correctly
mentioned in the MIGRATION.txt, so I close this bug.
|
|
Date |
User |
Action |
Args |
2002-01-09 08:33:40 | pohly | create | |
|