diff --git a/content/faq.md b/content/faq.md index 60b8848..c1bb34f 100644 --- a/content/faq.md +++ b/content/faq.md @@ -232,7 +232,29 @@ If you want to convert a Movable Type blog's content over, see [mt2publ](https:/ There currently aren't any converters for other blogging systems, but since the [entry file format](/entry-format) is so simple, it shouldn't be too difficult to write converters from other systems either. -## Okay, so, how can I help? +## Troubleshooting + +### I get `OSError: [Errno 8] Exec format error: '/path/to/main.py'` when running in debug + +Flask 0.15 changed the way the automatic reload works, which makes it so that if `main.py` is set executable, this will +fail. (See [an associated GitHub issue](https://github.com/pallets/werkzeug/issues/1482) for more information.) + +If you're on Linux or macOS, the easiest solution is to make sure that `main.py` is not set executable, with e.g. + +```bash +chmod a-x main.py +``` + +A more general fix (which includes Windows) is to use the `flask run` script instead: + +```bash +FLASK_ENV=development FLASK_DEBUG=1 FLASK_APP=main.py pipenv run flask run +``` + +The scripts bundled with the [publ-site repository](https://github.com/PlaidWeb/publ-site) have been updated accordingly. + + +## How can I help out? Glad you asked! diff --git a/content/manual/Getting started.md b/content/manual/Getting started.md index 2515cbc..275b7a6 100644 --- a/content/manual/Getting started.md +++ b/content/manual/Getting started.md @@ -160,13 +160,13 @@ mkdir -p content templates static Then you can launch your (not yet very functional) site with ```bash -pipenv run python3 main.py +FLASK_APP=main.py pipenv run flask run ``` if you're using `pipenv`, or ```bash -env/bin/python3 main.py +FLASK_APP=main.py env/bin/flask run ``` if you're using `virtualenv`. diff --git a/run.sh b/run.sh index 76a3f3b..488696b 100755 --- a/run.sh +++ b/run.sh @@ -1,3 +1,3 @@ #!/bin/sh -FLASK_ENV=development FLASK_DEBUG=1 pipenv run python main.py +FLASK_ENV=development FLASK_DEBUG=1 FLASK_APP=main.py pipenv run flask run diff --git a/winrun.cmd b/winrun.cmd index daf6215..1d45d41 100644 --- a/winrun.cmd +++ b/winrun.cmd @@ -5,4 +5,5 @@ ECHO Starting up Publ... SET PORT=5000 SET FLASK_DEBUG=1 set FLASK_ENV=development -pipenv run python main.py +set FLASK_APP=main.py +pipenv run flask run