Boa noite.
Não estou conseguindo salvar o gráfico.
ps.: Estou utilizando o VSCode.
FileNotFoundError Traceback (most recent call last) Cell In[67], line 1 ----> 1 fig.write_html("graf_imigracao_america_sul.html")
File c:\Users\Matheus\AppData\Local\Programs\Python\Python312\Lib\site-packages\plotly\basedatatypes.py:3714, in BaseFigure.write_html(self, *args, **kwargs) 3605 """ 3606 Write a figure to an HTML file representation 3607 (...) 3710 None 3711 """ 3712 import plotly.io as pio -> 3714 return pio.write_html(self, *args, **kwargs)
File c:\Users\Matheus\AppData\Local\Programs\Python\Python312\Lib\site-packages\plotly\io_html.py:535, in write_html(fig, file, config, auto_play, include_plotlyjs, include_mathjax, post_script, full_html, animation_opts, validate, default_width, default_height, auto_open, div_id) 532 # Write HTML string 533 if path is not None: 534 # To use a different file encoding, pass a file descriptor --> 535 path.write_text(html_str, "utf-8") 536 else: 537 file.write(html_str)
File c:\Users\Matheus\AppData\Local\Programs\Python\Python312\Lib\pathlib.py:1047, in Path.write_text(self, data, encoding, errors, newline) 1044 raise TypeError('data must be str, not %s' % ... 1011 if "b" not in mode: 1012 encoding = io.text_encoding(encoding) -> 1013 return io.open(self, mode, buffering, encoding, errors, newline)
FileNotFoundError: [Errno 2] No such file or directory: 'graf_imigracao_america_sul.html'