chanzuckerberg / cellxgene

An interactive explorer for single-cell transcriptomics data

Home Page:https://chanzuckerberg.github.io/cellxgene/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] AttributeError: module 'flask.json' has no attribute 'JSONEncoder'

xaviergeorge opened this issue · comments

Describe the bug
When I run the command
cellxgene launch --host 0.0.0.0 --port 8080 --annotations-dir annotations ${GCS_FILE_LOCATION}
I'm getting an error

File "/usr/local/bin/cellxgene", line 5, in <module>
    from server.cli.cli import cli
  File "/usr/local/lib/python3.10/site-packages/server/__init__.py", line 3, in <module>
    from server.common.utils.utils import import_plugins
  File "/usr/local/lib/python3.10/site-packages/server/common/utils/utils.py", line 68, in <module>
    class StrictJSONEncoder(json.JSONEncoder):
AttributeError: module 'flask.json' has no attribute 'JSONEncoder'

This probably has to do with the latest flask version that was released (2.3.1)

To Reproduce
Steps to reproduce the behavior:
Install cellxgene freshly in a new conda env.
Run simple cellxgene command

Expected behavior
You will get a bug that is

File "/usr/local/bin/cellxgene", line 5, in <module>
    from server.cli.cli import cli
  File "/usr/local/lib/python3.10/site-packages/server/__init__.py", line 3, in <module>
    from server.common.utils.utils import import_plugins
  File "/usr/local/lib/python3.10/site-packages/server/common/utils/utils.py", line 68, in <module>
    class StrictJSONEncoder(json.JSONEncoder):
AttributeError: module 'flask.json' has no attribute 'JSONEncoder'

Screenshots
Screenshot 2023-04-26 at 3 28 27 PM

Version (please complete the following information):
Cellxgene version - 1.1.1

Additional context
Add any other context about the problem here.

Hey Xavier - thanks for brining this to our attention - a fix has been issued and is included with newest release of CELLxGENE 1.1.2. Upgrading to the newest version should resolve your issue.