AdvancedPhotonSource / GSAS-II

Home for GSAS-II: crystallographic and diffraction-based structural characterization of materials
Other
33 stars 14 forks source link

CIF export error (quick CIF?) #78

Closed briantoby closed 1 month ago

briantoby commented 1 month ago

I've noticed that trying to export the phase as a CIF through the GSAS-II GUI causes the following error: Writing CIF output to file GSASmanref_HRPD_TbScO3_T=150K_30-130ms_2.cif Traceback (most recent call last): File "C:\Users\dafda1\Anaconda3\envs\GSASII\GSAS-II\GSASII\exports\G2export_CIF.py", line 4924, in Exporter self.MasterExporter(event=event,phaseOnly=name) File "C:\Users\dafda1\Anaconda3\envs\GSASII\GSAS-II\GSASII\exports\G2export_CIF.py", line 3876, in MasterExporter WritePhaseInfo(phaseOnly) File "C:\Users\dafda1\Anaconda3\envs\GSASII\GSAS-II\GSASII\exports\G2export_CIF.py", line 2440, in WritePhaseInfo WriteCIFitem(self.fp,"_cell_measurement_temperature",T) ^ UnboundLocalError: cannot access local variable 'T' where it is not associated with a value

briantoby commented 1 month ago

Yes, error is in phase-only CIF. Fixed this in 6c77df27. While at it addressed issues in https://github.com/COMCIFS/comcifs.github.io/issues/24