I have encountered an error using cif2cell while covering a CIF file from COD to quantum ESPRESSO format. The error is as follows.

command typed: $cif2cell crystal.cif -p quantum-espresso -o crystal.in

***Warning: Space group operation check failed for Hall symbol -P 1 (H-M symbol P-1). ***Warning: Site occupancies not found, assuming all occupancies = 1. Traceback (most recent call last): File “/usr/local/bin/cif2cell”, line 1574, in docstring = StandardDocstring() File “/usr/local/bin/cif2cell”, line 1021, in StandardDocstring tmpstring2 += “. Reference number : “+ref.databasecode TypeError: must be str, not NoneType

This seems to be a bug in the Quantum Mobile platform too.

  • $\begingroup$ If that program (cif2cell) is still maintained, it's best to report such problems to the developers. $\endgroup$
    – marcin
    Commented Oct 11, 2020 at 20:39
  • $\begingroup$ @marcin Do you refer to *this cif2cell, release 2.0.0a3 by Mar 3, 2021 ? $\endgroup$
    – Buttonwood
    Commented Oct 18, 2021 at 20:31
  • $\begingroup$ Is the .cif plausible in first place (e.g., by checkcif)? $\endgroup$
    – Buttonwood
    Commented Oct 18, 2021 at 20:36

1 Answer 1


There is a way around it you can include a NULL database code [using the _cod_database_code keyword ]under the data_global keyword in CIF and it will work.


_cod_database_code               None

This worked for me. Since the cod_databse_code is just for printing the first few comments in the input file created by cif2cell it will resolve the issue without affecting the crystal information which we intend to provide.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .