SyntaxError: Generator expression must be parenthesized

This bug fix is brought to you by the developer of MoneyPhone: Personal Expense Tracking for Android and iOS. Consistently spend less than you earn each month and get your finances under control when you start monitoring your expenses with MoneyPhone!

I’ve been trying to teach myself a little Django here over the past few days for a new side project I’m working on that requires Python instead of my usual goto language PHP. I was attempting to run Django 1.11.11 on my Windows machine running Python 3.7.1 and ran into the following error (SyntaxError: Generator expression must be parenthesized) when attempting to run the built-in Django development server. According to one StackOverflow post the problem is that Django 1.11.11 isn’t compatible with Python 3.7.1. If you happened to have stumbled upon this blog post searching for an answer to this error message, I suggest uninstalling Django and reinstalling the latest version of Django 1 which happens to be Django 1.11.20 (NOT 1.11.11), or simply upgrade to Django 2.
Personally, I was attempting to run Django 1.11.11 because that is the version of Django that comes with the DigitalOcean Django server droplet image.  Going forward I’m going to try running 1.11.20 on my Windows machine and see how that goes, as I would prefer to stick with using DigitalOcean’s pre-configured Django server droplet images as opposed to setting everything up from scratch myself.

 

topherPedersen