# First run errors

**URL:** <https://discourse.beets.io/t/first-run-errors/869>\
**Category:** Help\
**Created:** [August 9, 2019, 4:19pm UTC](https://discourse.beets.io/t/first-run-errors/869 "2019-08-09T16:19:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![FlibrJibr](https://avatars.discourse-cdn.com/v4/letter/f/0ea827/32.png) [@FlibrJibr](https://discourse.beets.io/u/FlibrJibr)\
**Post date:** [August 9, 2019, 4:19pm UTC](https://discourse.beets.io/t/first-run-errors/869/1 "2019-08-09T16:19:13Z")

</div>

I was following the getting started guide and I spent quite some time going through all of the configuration options to get beets set up just how I want before I did anything else…  
When I was finally ready to test run beets this is what happened:

```
beet config -p
configuration error: include must be a dictionary or a list, not str

```

…which I quickly fixed, but the [documentation](https://beets.readthedocs.io/en/stable/reference/config.html#include) does clearly say to use a space-separated list. Anyway, so when I ran it again I got a _lot_ more errors…

```
beet                                                                                                              
Traceback (most recent call last):                                                                                  
  File "X:\PortableApps\WinPython\python-3.7.4.amd64\lib\runpy.py", line 193, in _run_module_as_main                
    " __main__", mod_spec)                                                                                           
  File "X:\PortableApps\WinPython\python-3.7.4.amd64\lib\runpy.py", line 85, in _run_code                           
    exec(code, run_globals)                                                                                         
  File "X:\PortableApps\WinPython\python-3.7.4.amd64\Scripts\beet.exe\ __main__.py", line 9, in <module>             
  File "X:\PortableApps\WinPython\python-3.7.4.amd64\lib\site-packages\beets\ui\ __init__.py", line 1266, in main    
    _raw_main(args)                                                                                                 
  File "X:\PortableApps\WinPython\python-3.7.4.amd64\lib\site-packages\beets\ui\ __init__.py", line 1249, in _raw_mai
n                                                                                                                   
    subcommands, plugins, lib = _setup(options, lib)                                                                
  File "X:\PortableApps\WinPython\python-3.7.4.amd64\lib\site-packages\beets\ui\ __init__.py", line 1131, in _setup  
    mb.configure()                                                                                                  
  File "X:\PortableApps\WinPython\python-3.7.4.amd64\lib\site-packages\beets\autotag\mb.py", line 83, in configure  
    hostname = config['musicbrainz']['host'].as_str()                                                               
  File "X:\PortableApps\WinPython\python-3.7.4.amd64\lib\site-packages\beets\util\confit.py", line 430, in as_str   
    return self.get(String())                                                                                       
  File "X:\PortableApps\WinPython\python-3.7.4.amd64\lib\site-packages\beets\util\confit.py", line 393, in get      
    return as_template(template).value(self, template)                                                              
  File "X:\PortableApps\WinPython\python-3.7.4.amd64\lib\site-packages\beets\util\confit.py", line 1014, in value   
    if view.exists():                                                                                               
  File "X:\PortableApps\WinPython\python-3.7.4.amd64\lib\site-packages\beets\util\confit.py", line 186, in exists   
    self.first()                                                                                                    
  File "X:\PortableApps\WinPython\python-3.7.4.amd64\lib\site-packages\beets\util\confit.py", line 178, in first    
    return iter_first(pairs)                                                                                        
  File "X:\PortableApps\WinPython\python-3.7.4.amd64\lib\site-packages\beets\util\confit.py", line 62, in iter_first
                                                                                                                    
    return next(it)                                                                                                 
  File "X:\PortableApps\WinPython\python-3.7.4.amd64\lib\site-packages\beets\util\confit.py", line 524, in resolve  
    for collection, source in self.parent.resolve():                                                                
  File "X:\PortableApps\WinPython\python-3.7.4.amd64\lib\site-packages\beets\util\confit.py", line 524, in resolve  
    for collection, source in self.parent.resolve():                                                                
  File "X:\PortableApps\WinPython\python-3.7.4.amd64\lib\site-packages\beets\util\confit.py", line 950, in resolve  
    self.read()                                                                                                     
  File "X:\PortableApps\WinPython\python-3.7.4.amd64\lib\site-packages\beets\ __init__.py", line 37, in read         
    self.set_file(filename)                                                                                         
  File "X:\PortableApps\WinPython\python-3.7.4.amd64\lib\site-packages\beets\util\confit.py", line 887, in set_file 
    self.set(ConfigSource(load_yaml(filename), filename))                                                           
  File "X:\PortableApps\WinPython\python-3.7.4.amd64\lib\site-packages\beets\util\confit.py", line 121, in __init__ 
    super(ConfigSource, self). __init__ (value)                                                                       
TypeError: 'NoneType' object is not iterable

```

I tried forcing a reinstall and got one error notification, but I don’t think/know if it’s related:  
`ERROR: datashader 0.7.0 has requirement testpath<0.4, but you'll have testpath 0.4.2 which is incompatible.`

---

<div class="post-metadata">

**Author:** ![adrian](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/adrian/32/4_2.png) [@adrian](https://discourse.beets.io/u/adrian)\
**Post date:** [August 9, 2019, 9:47pm UTC](https://discourse.beets.io/t/first-run-errors/869/2 "2019-08-09T21:47:51Z")

</div>

True! Those docs are definitely wrong. Any chance you could help us out by opening a PR to correct them or the code, or just an issue to remind us to do that?

I really don’t see where that error could be coming from! It doesn’t seem like that line of code could be producing a TypeError like that. Maybe it would be worth trying to install in a virtualenv to isolate the dependencies?

---

<div class="post-metadata">

**Author:** ![FlibrJibr](https://avatars.discourse-cdn.com/v4/letter/f/0ea827/32.png) [@FlibrJibr](https://discourse.beets.io/u/FlibrJibr)\
**Post date:** [August 10, 2019, 10:09am UTC](https://discourse.beets.io/t/first-run-errors/869/3 "2019-08-10T10:09:19Z")

</div>

Sure I’ll have a look to try to correct the code / docs (and failing that just report the issue) 👍

In the meantime though I created a virtual environment to test with

```
pip list
Package Version
-------------- -------
beets 1.4.9
colorama 0.4.1
jellyfish 0.7.2
munkres 1.1.2
musicbrainzngs 0.6
mutagen 1.42.0
pip 19.0.3
PyYAML 5.1.2
setuptools 40.8.0
six 1.12.0
Unidecode 1.1.1
You are using pip version 19.0.3, however version 19.2.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

```

…but when I ran beets it still came up with the errors…

```
beet
Traceback (most recent call last):
  File "X:\PortableApps\WinPython\python-3.7.4.amd64\lib\runpy.py", line 193, in _run_module_as_main
    " __main__", mod_spec)
  File "X:\PortableApps\WinPython\python-3.7.4.amd64\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "X:\Temp\Scripts\beet.exe\ __main__.py", line 9, in <module>
  File "x:\temp\lib\site-packages\beets\ui\ __init__.py", line 1266, in main
    _raw_main(args)
  File "x:\temp\lib\site-packages\beets\ui\ __init__.py", line 1249, in _raw_main
    subcommands, plugins, lib = _setup(options, lib)
  File "x:\temp\lib\site-packages\beets\ui\ __init__.py", line 1131, in _setup
    mb.configure()
  File "x:\temp\lib\site-packages\beets\autotag\mb.py", line 83, in configure
    hostname = config['musicbrainz']['host'].as_str()
  File "x:\temp\lib\site-packages\beets\util\confit.py", line 430, in as_str
    return self.get(String())
  File "x:\temp\lib\site-packages\beets\util\confit.py", line 393, in get
    return as_template(template).value(self, template)
  File "x:\temp\lib\site-packages\beets\util\confit.py", line 1014, in value
    if view.exists():
  File "x:\temp\lib\site-packages\beets\util\confit.py", line 186, in exists
    self.first()
  File "x:\temp\lib\site-packages\beets\util\confit.py", line 178, in first
    return iter_first(pairs)
  File "x:\temp\lib\site-packages\beets\util\confit.py", line 62, in iter_first
    return next(it)
  File "x:\temp\lib\site-packages\beets\util\confit.py", line 524, in resolve
    for collection, source in self.parent.resolve():
  File "x:\temp\lib\site-packages\beets\util\confit.py", line 524, in resolve
    for collection, source in self.parent.resolve():
  File "x:\temp\lib\site-packages\beets\util\confit.py", line 950, in resolve
    self.read()
  File "x:\temp\lib\site-packages\beets\ __init__.py", line 37, in read
    self.set_file(filename)
  File "x:\temp\lib\site-packages\beets\util\confit.py", line 887, in set_file
    self.set(ConfigSource(load_yaml(filename), filename))
  File "x:\temp\lib\site-packages\beets\util\confit.py", line 121, in __init__
    super(ConfigSource, self). __init__ (value)
TypeError: 'NoneType' object is not iterable

```

It might be something odd happening because of the way I have my config files set up  
- I separated out the plugin configs in to a separate file for easier management (as well as the import and autotagger configs) then added those files to the `include`, shown below…

```
... \AppData\Roaming\beets
total 53K
8.0K config.yaml
1.0K config_autotagger.yaml
4.0K config_importer.yaml
4.0K config_plugins.yaml
 36K library.db

```

I’ll try them in one file and see if that’s what’s causing the problem

---

<div class="post-metadata">

**Author:** ![FlibrJibr](https://avatars.discourse-cdn.com/v4/letter/f/0ea827/32.png) [@FlibrJibr](https://discourse.beets.io/u/FlibrJibr)\
**Post date:** [August 10, 2019, 10:38am UTC](https://discourse.beets.io/t/first-run-errors/869/4 "2019-08-10T10:38:59Z")

</div>

🙄 yep merging the separate config files back in to one seems to have fixed it  
_(…baring having forgotten to install the additional modules required by plugins I had enabled)_  
No errors now!

---

<div class="post-metadata">

**Author:** ![adrian](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/adrian/32/4_2.png) [@adrian](https://discourse.beets.io/u/adrian)\
**Post date:** [August 10, 2019, 10:55am UTC](https://discourse.beets.io/t/first-run-errors/869/5 "2019-08-10T10:55:55Z")

</div>

Wow; that’s weird! That `import` functionality might have been a mistake in the first place…
