Write_html Raise error: AttributeError: 'dict' object has no attribute 'write_html'

My packages : import pandas as pd
import numpy as np
import plotly.graph_objects as go
import plotly.express as px
import plotly.io as pio
from plotly.offline import iplot
import plotly.offline as pyo
import matplotlib.pyplot as plt
pyo.init_notebook_mode()

Im trying to save my graph : fig.write_html(“C:/Users/vladi/Documents/Seven Hightest Purchases.html”) And i get this error: AttributeError: ‘dict’ object has no attribute ‘write_html’

Ocra and caleido installed
Can anyone tell me how to save my graph in html format ?

Thanks