skozlovf/flask-json

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

Closed this issue · 5 comments

File "/opt/hostedtoolcache/Python/3.9.13/x64/lib/python3.9/site-packages/flask_json.py", line 423, in <module>
class JSONEncoderEx(json.JSONEncoder):
AttributeError: module 'flask.json' has no attribute 'JSONEncoder'

Github actions runner is failing to build new commits due to the above error.
Not sure why it suddenly decided to break. Below are the flask related versions Im having:

Flask==2.1.0
Flask-Cors==3.0.9
Flask-JSON==0.3.5
Flask-SQLAlchemy==2.5.1

Possibly related issue? #10
But I haven't updated flask to 2.3.x though. Don't know why the sudden breakage.

Any help would be appreciated, thank you!!

That's strange, flask 2.1.0 should work.
Are you sure it's Flask==2.1.0?

PS I have 2.3 compatible code but have not released it yet.

Hey @skozlovf , yeah I'm having Flask==2.1.0 version only.

Oh alright. Can you release it? Perhaps I can try using that one.

@skozlovf , made few changes to the actions runner and it worked.

Python 3.9.13 -> 3.9.6
Ubuntu latest -> 20.4

Python pkg version dependency is hard :/

@PaulisMatrix Yes, I'll try to release this week. Pretty busy these days.

Fixed in 0.4.0.