Repository: mopidy/mopidy
Issue: TypeError: setup_console_logging() takes exactly 2 arguments (1 given)

Hi,

I'm using this doc : http://docs.mopidy.com/en/latest/installation/#otherwise-install-from-source-using-pip
At the end, I do this : sudo pip install mopidy==dev
I'm using the new file format : https://github.com/mopidy/mopidy/issues/280
When I do mopidy-scan > tag_cache, I have this error : 

> Traceback (most recent call last):
>   File "/usr/local/bin/mopidy-scan", line 9, in <module>
>     load_entry_point('Mopidy==0.13.0', 'console_scripts', 'mopidy-scan')()
>   File "/usr/local/lib/python2.7/dist-packages/mopidy/scanner.py", line 47, in main
>     log.setup_console_logging(options.verbosity_level)
> **TypeError: setup_console_logging() takes exactly 2 arguments (1 given)**
#### Server

**Hardware** : HackBerry A10
**Operating system** : Debian Sid ARM
**Web server** : Nginx
**Mopidy** : 0.13.0
**Python** : 2.7.3
**MPD** : 0.17.4

Thanks in advance :)


Changed files:
mopidy/config/__init__.py, mopidy/scanner.py

diff --git a/mopidy/config/__init__.py b/mopidy/config/__init__.py
index a8ece9c1..6cf9a802 100644
--- a/mopidy/config/__init__.py
+++ b/mopidy/config/__init__.py
@@ -112,7 +112,7 @@ def _validate(raw_config, schemas):
             errors.append('%s: section not found.' % name)
         except exceptions.ConfigError as error:
             for key in error:
-                errors.append('%s/%s: %s' % (name, key, error[key]))
+                errors.append('%s/%s: %s' % (schema.name, key, error[key]))
     # TODO: raise errors instead of return
     return config, errors
 
diff --git a/mopidy/scanner.py b/mopidy/scanner.py
index d28d328a..226fd410 100644
--- a/mopidy/scanner.py
+++ b/mopidy/scanner.py
@@ -34,6 +34,7 @@ import pygst
 pygst.require('0.10')
 import gst
 
+from mopidy import config as config_lib, ext
 from mopidy.frontends.mpd import translator as mpd_translator
 from mopidy.models import Track, Artist, Album
 from mopidy.utils import log, path, versioning
@@ -41,10 +42,22 @@ from mopidy.utils import log, path, versioning
 
 def main():
     options = parse_options()
-    config = {}  # TODO Read config from new config system
+    # TODO: support config files and overrides (shared from main?)
+    config_files = ['/etc/mopidy/mopidy.conf',
+                    '$XDG_CONFIG_DIR/mopidy/mopidy.conf']
+    config_overrides = []
 
+    # TODO: decide if we want to avoid this boilerplate some how.
+    logging_config = config_lib.load(config_files, config_overrides)
     log.setup_root_logger()
-    log.setup_console_logging(options.verbosity_level)
+    log.setup_console_logging(logging_config, options.verbosity_level)
+
+    extensions = ext.load_extensions()
+    raw_config = config_lib.load(config_files, config_overrides, extensions)
+    extensions = ext.filter_enabled_extensions(raw_config, extensions)
+    config = config_lib.validate(
+        raw_config, config_lib.core_schemas, extensions)
+    log.setup_log_levels(config)
 
     tracks = []
 
@@ -68,7 +81,7 @@ def main():
     logging.info('Done scanning; writing tag cache...')
 
     for row in mpd_translator.tracks_to_tag_cache_format(
-            tracks, config['mpd']['media_dir']):
+            tracks, config['local']['media_dir']):
         if len(row) == 1:
             print ('%s' % row).encode('utf-8')
         else: