NUKnightLab / tarbell

A Flask-based static site authoring tool.
BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

Handle missing settings.yaml files #13

Closed hbillings closed 9 years ago

hbillings commented 9 years ago

Attempting to run the Tarbell admin server with no .tarbell folder results in:

File "/Users/hbillings/KnightLab/Repos/tarbell-kl/tarbell/cli.py", line 422, in tarbell_admin
    admin_site = TarbellAdminSite(settings)
File "/Users/hbillings/KnightLab/Repos/tarbell-kl/tarbell/admin.py", line 36, in __init__
    self.credentials = json.loads(api.credentials.to_json())
AttributeError: 'NoneType' object has no attribute 'credentials'

Attempting to run the server with a .tarbell folder but no settings.yamlfires the following TypeError:

File "/Users/hbillings/KnightLab/Repos/tarbell-kl/tarbell/admin.py", line 91, in main
    project_list = list_projects(self.settings.config.get('projects_path'))
File "/Users/hbillings/KnightLab/Repos/tarbell-kl/tarbell/admin_utils.py", line 154, in list_projects
    for directory in os.listdir(projects_dir):
TypeError: coercing to Unicode: need string or buffer, NoneType found
jywsn commented 9 years ago

Running the server with a .tarbell folder but no settings.yaml starts up with configuration modal sequence for me.

jywsn commented 9 years ago

Attempting to run the Tarbell admin server with no .tarbell folder also starts up the configuration modal sequence for me. Please verify. If you're still getting the error, then I'd like to look at your setup in person.

hbillings commented 9 years ago

Derp derp.