[SOLVED] DCC.graph turns black instead of coloured when importing too many functions

EDIT: SOLVED seemed to be a bug in one of my packages

I have a very weird bug / issue. I have build quite a big app and when I import some functions from a few different python files, my graphs (PCP plot) suddenly turns black (and i believe the same happened to my bar charts, as these are also black).
I have tested extensively whether it could be due to some specific function imports, but no matter what functions i import, after importing functions from several different files, or just one big file, suddenly my graphs turn black. In addition, I do not even use the imported functions yet. Just importing is already enough to glitch.

I have tested this on a very simple app, of which the code is added below. To visually explain the problem:
the pcp turns black:

while if i do not import these functions, it looks like this (as it should be)

the code of the simple file (the code like this does not give black graphs, but importing two random function imports, cause the graphs to turn black):

import pandas as pd
import plotly.express as px
import plotly.graph_objects as go
import dash
from dash import html, dcc, dash_table
import io
import datetime
import base64
from dash.dependencies import Input, Output, State
from DataTypeInference import obtain_feature_type_table, createDatasetObject
import arff
from sklearn.preprocessing import LabelEncoder

# from duplicates_and_missing import missing_values, duplicates
# from type_integrity import amount_of_diff_values, mixed_data_types, special_characters, string_mismatch
# from outliers_and_correlations import feature_label_correlation, feature_feature_correlation, outlier_detection
# from label_purity import class_imbalance, conflicting_labels
# from plot_and_transform_functions import pandas_dq_report, encode_categorical_columns, pcp_plot, missingno_plot, plot_dataset_distributions
noye: putting all these files in one file gives the same problem.

sortingHatInf_datatypes = ['not-generalizable', 'floating', 'integer', 'categorical', 'boolean', 'datetime', 'sentence', 'url',
                           'embedded-number', 'list', 'context-specific', 'numeric']

button_style = {'background-color': 'blue',
                    'color': 'white',
                    'height': '50px',
                    'margin-top': '50px',
                    'margin-left': '50px'}

app = dash.Dash(__name__,  suppress_callback_exceptions=True)
app.title = "Data quality toolkit"

df = pd.read_csv('datasets/iris.csv')

# Label encode the 'species' column using LabelEncoder from scikit-learn
le = LabelEncoder()
df['species_encoded'] = le.fit_transform(df['Species'])

# Create the PCP plot using Plotly Express
fig = px.parallel_coordinates(df, color='species_encoded')

# Create the app layout
app.layout = html.Div([dcc.Upload(
            'Drag and Drop or ',
            html.A('Select Files')
            'width': '100%',
            'height': '60px',
            'lineHeight': '60px',
            'borderWidth': '1px',
            'borderStyle': 'dashed',
            'borderRadius': '5px',
            'textAlign': 'center',
            'margin': '10px'
        # Allow multiple files to be uploaded

if __name__ == '__main__':

Again, it does not matter which files i comment out, after importing two files or more, or just one large file, the graphs turn black. If I put all the functions from the files in one file, it still happens. These files all do not contain any formatting or anything alike.
Is this a known problem, or are there alternative solutions? If i am doing something wrong iā€™d love to hear it as well.

1 Like