getnikola / coil

A user-friendly CMS frontend for Nikola.
https://coil.readthedocs.org/
MIT License
22 stars 10 forks source link

coil devserver doesn't run on windows #40

Closed carlkl closed 9 years ago

carlkl commented 9 years ago

With Python-3.4 (win32), coil-1.3.6, Nikola-7.6.4 and a configured folder with nikola init -qd n the command coil devserver raises following traceback:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "D:\devel\nikola\lib\site-packages\coil\__main__.py", line 62, in main
    sys.exit(devserver(arguments))
  File "D:\devel\nikola\lib\site-packages\coil\__main__.py", line 80, in devserver
    import coil.web
  File "D:\devel\nikola\lib\site-packages\coil\web.py", line 1230, in <module>
    configure_site()
  File "D:\devel\nikola\lib\site-packages\coil\web.py", line 81, in configure_site
    _dn.sub_cmds = _dn.get_cmds()
  File "D:\devel\nikola\lib\site-packages\nikola\__main__.py", line 310, in get_cmds
    for name, cmd in self.nikola._commands.items():
AttributeError: 'Nikola' object has no attribute '_commands'
Kwpolska commented 9 years ago

While coil was never tested on Windows, this particular bug is not a Windows problem. Nikola v7.6.4 had some backwards-compatibility-breaking changes. Fix upcoming.

Kwpolska commented 9 years ago

Please try it now. I hope it works with Windows, and in case it doesn’t, we can probably fix it.

carlkl commented 9 years ago

thanks! However, I get now another error with coil devserver

[2015-08-25T14:42:08Z] NOTICE: Coil: THEME does not inherit from 'bootstrap3' or 'bootstrap3-jinja', using 'bootstrap3' instead.
[2015-08-25T14:42:08Z] NOTICE: Coil: THEME does not inherit from 'bootstrap3' or 'bootstrap3-jinja', using 'bootstrap3' instead.
Scanning posts....done!
[2015-08-25T14:42:08Z] INFO: Coil: Coil CMS running @ http://localhost:8001/
[2015-08-25T14:42:08Z] INFO: Coil: Coil CMS running @ http://localhost:8001/
[2015-08-25T14:42:08Z] INFO: werkzeug:  * Running on http://localhost:8001/ (Press CTRL+C to quit)
[2015-08-25T14:42:08Z] INFO: werkzeug:  * Restarting with windowsapi reloader
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'devserver' is not defined

I used the limited mode:

COIL_SECRET_KEY = b'...secret key...'
COIL_URL = 'example.com'

_MAKO_DISABLE_CACHING = True

COIL_LIMITED = True

COIL_USERS = {
    '1': {
        'username': 'admin',
        'realname': 'Website Administrator',
        'password': '$bcrypt-.........',
        'must_change_password': False,
        'email': 'someone__@gmail.com',
        'active': True,
        'is_admin': True,
        'can_edit_all_posts': True,
        'wants_all_posts': True,
        'can_upload_attachments': True,
        'can_rebuild_site': True,
        'can_transfer_post_authorship': True,
    },
}
Kwpolska commented 9 years ago

It seems to be a weird limitation of the Werkzeug thing, which tries to run [sys.executable] + sys.argv while restarting. Does running python -m coil devserver work?

carlkl commented 9 years ago

this works for a first sight! Thank you.

Kwpolska commented 9 years ago

Added note to the docs.