[Solved] SyntaxError: Generator expression must be parenthesized (widgets.py, line 152)

Run Django with pycharm, python manage Py runserver error

Checked the Internet and said to put widgets Delete the comma in line 152 of Py, which may be a compatibility problem between Python and Django. Try it. You can click the hyperlink above. Pycharm can quickly open the document, and then find the widgets under admin Py file is OK, because the prompt says form Django contrib. Admin import helpers, widgets, and options The PY file is in the admin directory.

Read More: