Triclinic unit cell to cubic unit cell transformation

I am trying to turn a triclinic unit cell into a cubic cell with the following code:

import pymatgen.core as pmg
from pymatgen.symmetry.analyzer import SpacegroupAnalyzer
from pymatgen.transformations.advanced_transformations import CubicSupercellTransformation

atoms = pmg.Structure.from_file('POSCAR')

symm_analyzer = SpacegroupAnalyzer(atoms)
transform = CubicSupercellTransformation(max_atoms=3000, min_atoms=150, force_diagonal=True, force_90_degrees=True,
        min_length=15.0, angle_tolerance=0.001)

cubic_supercell = transform.apply_transformation(atoms)

cubic_supercell.to(fmt="poscar", filename="POSCAR_cubic_supercell")

The code runs but it does not transform the actual unit cell into a cubic unit cell, it actually does nothing to the structure. Any input would be great!

Hi!

Have you already tried to play around with the different arguments?
Maybe relaxing some of the constraints to see if it returns something?

I am so late, but yes. I have tried relaxing the constrains like the angle tolerance, the min length, and increasing the max_atoms. For any sort of combination I either obtain a structure that resembles the initial triclinic one. Or (specially when increasing the max_atoms) I never obtain a structure.