[ase-users] writing lammps-data and python 3.7

Ask Hjorth Larsen asklarsen at gmail.com
Fri Feb 28 13:43:50 CET 2020


Am Do., 27. Feb. 2020 um 21:33 Uhr schrieb Noam Bernstein via
ase-users <ase-users at listserv.fysik.dtu.dk>:
>
> Has anyone tried writing lammps-data file with python 3.7?  Before I open an issue, I'm trying to understand if I'm just missing something.  I get the error
>
> TypeError: write() argument must be str, not bytes
>
> which the internet suggests is caused by the file object not being opened with "wb".  Poking around ase.io I get the impression that it's being specifically opened with "wt".
>
> Does anyone know that code and have any idea whether this is a python issue or a genuine ASE bug?

Please post the full stack trace.

The format is text, not binary.  If someone tries to write bytes to
it, that would be the error.

Best regards
Ask

>
> Noam
>
> _______________________________________________
> ase-users mailing list
> ase-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users


More information about the ase-users mailing list