questo codice:

import os
from docutils.core import publish_string

def convert_rst_to_txt(input_path, output_path):
   # Leggi il contenuto del file .rst
   with open(input_path,'r', encoding='utf-8') as rst_file:
       rst_content = rst_file.read()

   # Converti il contenuto rst in formato testo semplice
   text_content = publish_string(rst_content, writer_name='text').decode('utf-8')

   # Scrivi il contenuto convertito nel file .txt
   with open(output_path,'w', encoding='utf-8') as txt_file:
       txt_file.write(text_content)

   print(f"File {input_path} convertito con successo a {output_path}")

def find_and_convert_rst_files(root_dir, output_dir):
   for subdir, _, files in os.walk(root_dir):
       for file in files:
           if file.endswith('.rst'):
               input_file_path = os.path.join(subdir, file)
               
               # Crea percorso output, mantenendo la struttura delle directory originali
               relative_path = os.path.relpath(subdir, root_dir)
               output_subdir = os.path.join(output_dir, relative_path)

               # Assicurati che la directory di output esista
               os.makedirs(output_subdir, exist_ok=True)
               
               output_file_path = os.path.join(output_subdir, os.path.splitext(file)[0] +'.txt')
               convert_rst_to_txt(input_file_path, output_file_path)

if __name__ == "__main__":
   # Specifica la directory root dove cercare i file .rst
   root_dir =r'C:\Users\Utente\Desktop\odoo\content'   # sostituisci con il percorso della tua cartella
   
   # Specifica la directory di output dove salvare i file convertiti
   output_dir = os.path.join(root_dir,'odoo_txt')
   
   # Esegui la conversione
   find_and_convert_rst_files(root_dir, output_dir)

   print("Tutti i file sono stati convertiti con successo!")


mi da questo errore
Traceback (most recent call last):
  File "C:\Users\Utente\AppData\Local\Programs\Python\Python36\lib\site-packages\docutils\writers\__init__.py", line 147, in get_writer_class
    module = import_module('docutils.writers.'+writer_name)
  File "C:\Users\Utente\AppData\Local\Programs\Python\Python36\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 978, in _gcd_import
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load
  File "<frozen importlib._bootstrap>", line 948, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'docutils.writers.text'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Utente\AppData\Local\Programs\Python\Python36\lib\site-packages\docutils\writers\__init__.py", line 150, in get_writer_class
    module = import_module(writer_name)
  File "C:\Users\Utente\AppData\Local\Programs\Python\Python36\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 978, in _gcd_import
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load
  File "<frozen importlib._bootstrap>", line 948, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'text'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Utente\Desktop\odoo\Convert_txt.py", line 42, in <module>
    find_and_convert_rst_files(root_dir, output_dir)
  File "C:\Users\Utente\Desktop\odoo\Convert_txt.py", line 32, in find_and_convert_rst_files
    convert_rst_to_txt(input_file_path, output_file_path)
  File "C:\Users\Utente\Desktop\odoo\Convert_txt.py", line 10, in convert_rst_to_txt
    text_content = publish_string(rst_content, writer_name='text').decode('utf-8')
  File "C:\Users\Utente\AppData\Local\Programs\Python\Python36\lib\site-packages\docutils\core.py", line 417, in publish_string
    enable_exit_status=enable_exit_status)
  File "C:\Users\Utente\AppData\Local\Programs\Python\Python36\lib\site-packages\docutils\core.py", line 660, in publish_programmatically
    pub.set_components(reader_name, parser_name, writer_name)
  File "C:\Users\Utente\AppData\Local\Programs\Python\Python36\lib\site-packages\docutils\core.py", line 100, in set_components
    self.set_writer(writer_name)
  File "C:\Users\Utente\AppData\Local\Programs\Python\Python36\lib\site-packages\docutils\core.py", line 89, in set_writer
    writer_class = writers.get_writer_class(writer_name)
  File "C:\Users\Utente\AppData\Local\Programs\Python\Python36\lib\site-packages\docutils\writers\__init__.py", line 152, in get_writer_class
    raise ImportError('No writer named "%s".' % writer_name)
ImportError: No writer named "text".
>>>