constellation icon indicating copy to clipboard operation
constellation copied to clipboard

Deprecated python code warning

Open Quasar985 opened this issue 3 weeks ago • 1 comments

Prerequisites

  • [x] Put an X between the brackets on this line if you have done all of the following:

    • Running the latest version of Constellation

    • Attached the Support Package via Help > Support Package

    • Checked the FAQs: https://github.com/constellation-app/constellation/wiki/FAQ

    • Checked that your issue isn’t already filed: https://github.com/constellation-app/constellation/issues

    • Checked that there is not already a module that provides the described functionality: https://github.com/constellation-app/constellation/wiki/Catalogue-of-Repositories

Description

Warning is thrown in constellation_client regarding the read_json function: FutureWarning: Passing literal json to 'read_json' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object.

Steps to Reproduce

  1. Open graph

  2. Start Jupyter Server

  3. Run the following code:

import io
import os
import pandas as pd
import PIL.Image, PIL.ImageDraw, PIL.ImageFilter, PIL.ImageFont

# Also import some of the notebook display methods so we can display nice things.
#
from IPython.display import display, HTML, Image

# This is a convenient Python interface to the REST API.
#
import constellation_client

cc = constellation_client.Constellation()

df = cc.get_dataframe()
df.head()

Expected behaviour: No warnings are thrown.

**Actual behaviour:**Warning is thrown, regarding deprecated code

Reproduces how often: Always

Quasar985 avatar Jun 12 '24 02:06 Quasar985