Skip to content

(3.0.0 3.5.1) ParallelCluster CLI raises exception “module 'flask.json' has no attribute 'JSONEncoder'”

Hanwen edited this page Apr 27, 2023 · 4 revisions

The issue

Flask is a Python dependency of ParallelCluster. Due to a recent change in flask, when flask > 2.2.4 is installed, the ParallelCluster CLI will raise an exception when executing any command. If affected by this issue, the pcluster command will raise an exception with the following message:

AttributeError: module 'flask.json' has no attribute 'JSONEncoder'

Mitigation

To workaround this issue, install the 2.2.4 version of flask with the following command:

python3 -m pip install flask==2.2.4

After updating the dependency, the CLI should work normally.

Clone this wiki locally