Pandas not working with plotly python

I have been using Plotly with plain Python and was able to create a number of charts with a funnel chart at the top and a 3 line scatter chart below with mode = lines+markers and changed each of the 3 lines to a different color. These charts were created from PostgreSQL SQL queries.

I then changed to using Pandas with a pd.read_sql command. The command works fine for the Funnel chart and it seems to work with the scatter but the problem comes when I issue the command “fig.write_html”. On that line I get thefollowing errors:
"Traceback (most recent call last):
File “/mnt/seagate/Weather/wx_env/./”, line 50, in
fig1.write_html(’/mnt/seagate/’, include_plotlyjs=False)
File “/home/gerald/.local/lib/python3.9/site-packages/plotly/”, line 3685, in write_html
return pio.write_html(self, *args, **kwargs)
File “/home/gerald/.local/lib/python3.9/site-packages/plotly/io/”, line 508, in write_html
html_str = to_html(
File “/home/gerald/.local/lib/python3.9/site-packages/plotly/io/”, line 137, in to_html
jdata = json.dumps(
File “/usr/local/lib/python3.9/json/”, line 234, in dumps
return cls(
File “/home/gerald/.local/lib/python3.9/site-packages/_plotly_utils/”, line 59, in encode
encoded_o = super(PlotlyJSONEncoder, self).encode(o)
File “/usr/local/lib/python3.9/json/”, line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File “/usr/local/lib/python3.9/json/”, line 257, in iterencode
return _iterencode(o, 0)
File “/home/gerald/.local/lib/python3.9/site-packages/_plotly_utils/”, line 134, in default
return _json.JSONEncoder.default(self, obj)
File “/usr/local/lib/python3.9/json/”, line 179, in default
raise TypeError(f’Object of type {} ’
TypeError: Object of type method is not JSON serializablet "

Also when I tried to use it did not recognize the following commands: “mode, name or line_color”

How can get rid of those JSON errors and be able to use “graph_objects as go” again???

I have done a lot of Googling the past 2 days and not been able to find a solution to this problem.