1      

Re:

[Phil reported this error at github]

When I installed Dinette I first had to realize that the documentation was out of date, since it did not tell me to add the following settings:

LOG_FILE_NAME = "test.log"
LOG_FILE_PATH = os.path.join(PROJECT_ROOT, "logs")

after adding these settings I do get an error though:

phil$ ./manage.py syncdb
Traceback (most recent call last):
File "./manage.py", line 27, in <module>
execute_from_command_line()
File "/Users/phil/virtualenvs/zweitwelt/lib/python2.6/site-packages/django/core/management/__init__.py", line 429, in execute_from_command_line
utility.execute()
File "/Users/phil/virtualenvs/zweitwelt/lib/python2.6/site-packages/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/phil/virtualenvs/zweitwelt/lib/python2.6/site-packages/django/core/management/base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
File "/Users/phil/virtualenvs/zweitwelt/lib/python2.6/site-packages/django/core/management/base.py", line 217, in execute
self.validate()
File "/Users/phil/virtualenvs/zweitwelt/lib/python2.6/site-packages/django/core/management/base.py", line 245, in validate
num_errors = get_validation_errors(s, app)
File "/Users/phil/virtualenvs/zweitwelt/lib/python2.6/site-packages/django/core/management/validation.py", line 28, in get_validation_errors
for (app_name, error) in get_app_errors().items():
File "/Users/phil/virtualenvs/zweitwelt/lib/python2.6/site-packages/django/db/models/loading.py", line 146, in get_app_errors
self._populate()
File "/Users/phil/virtualenvs/zweitwelt/lib/python2.6/site-packages/django/db/models/loading.py", line 61, in _populate
self.load_app(app_name, True)
File "/Users/phil/virtualenvs/zweitwelt/lib/python2.6/site-packages/django/db/models/loading.py", line 78, in load_app
models = import_module('.models', app_name)
File "/Users/phil/virtualenvs/zweitwelt/lib/python2.6/site-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/Users/phil/virtualenvs/zweitwelt/src/dinette/dinette/models.py", line 20, in <module>
logging.config.fileConfig(settings.LOG_FILE_NAME,defaults=dict(log_path=settings.LOG_FILE_PATH))
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/logging/config.py", line 76, in fileConfig
formatters = _create_formatters(cp)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/logging/config.py", line 109, in _create_formatters
flist = cp.get("formatters", "keys")
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ConfigParser.py", line 531, in get
raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'formatters'

I am not sure what I am doing wrong, can you please help?

thanks,
Phil

2      

Re: Error in install after Syncdb.

i still get an error. it asks for the LOG_FILE_PATH. In my settings i put:

LOG_FILE_PATH = "%s/logs/"%PROJECT_ROOT

and i get the following error:

File "/Users/phil/virtualenvs/zweitwelt/src/dinette/dinette/models.py", line 20, in <module>
logging.config.fileConfig(settings.LOG_FILE_NAME,defaults=dict(log_path=settings.LOG_FILE_PATH))
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/logging/config.py", line 84, in fileConfig
handlers = _install_handlers(cp, formatters)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/logging/config.py", line 158, in _install_handlers
args = eval(args, vars(logging))
File "<string>", line 1
(/Users/phil/Documents/workspace/zweitwelt/logs/forum.log,'a',50000,5)
^
SyntaxError: invalid syntax

I also tried to do a folder instead of 'forum.log' but also did not work.

3      

Re: Error in install after Syncdb.

Seems that the LOG_FILE_PATH is not going in as a string.

(/Users/phil/Documents/workspace/zweitwelt/logs/forum.log,'a',50000,5)

should have been

("/Users/phil/Documents/workspace/zweitwelt/logs/forum.log",'a',50000,5)

So, I would guess putting escaped quotes to the variable should fix it.

LOG_FILE_PATH = "\"%s/logs/"\"%PROJECT_ROOT

Here's our updated settings if it helps:

http://github.com/agiliq/Dinette/blob/master/dinette/extra_settings.py