[ase-users] python3 encoding error?

Jens Jørgen Mortensen jjmo at dtu.dk
Wed Jan 10 08:40:58 CET 2018


Den 09-01-2018 kl. 17:33 skrev Glenn Jones via ase-users:
>
> Hi,
>
> I am trying to run the example ga code found on 
> https://wiki.fysik.dtu.dk/ase/tutorials/ga/ga_optimize.html
>
> However I keep getting the following error
>
> File 
> "/home/gjones/.local/lib/python3.4/site-packages/ase/ga/parallellocalrun.py", 
> line 72, in <listcomp>
>
>     lines = [l for l in lines if l.find('defunct') == -1]
>
> TypeError: 'str' does not support the buffer interface
>
> Looking around on google they suggest this may be due to some changes 
> in python3 from python2 to make handling of encoding more rigorous.
>
> Does anyone know the syntax I should use to modify the text encoding 
> (I’ve tried a few things from google to no avail), or perhaps it is a 
> different problem?
>

Maybe use l.find(b'defunct')?

Steen:  Could you take a look at this?

Jens Jørgen

> Thanks
>
>
> Glenn
>
>
>
> If the reader of this email is not the intended recipient(s), please 
> be advised that any dissemination, distribution or copying of this 
> information is strictly prohibited. Johnson Matthey Plc has its main 
> place of business at 5th Floor, 25 Farringdon Street, London (0207269 
> 8400).
>
> Johnson Matthey Public Limited Company Registered Office: 5th Floor, 
> 25 Farringdon Street, London EC4A 4AB.Registered in England No 33774
>
> Whilst Johnson Matthey aims to keep its network free from viruses you 
> should note that we are unable to scan certain emails, particularly if 
> any part is encrypted or password-protected, and accordingly you are 
> strongly advised to check this email and any attachments for viruses. 
> The company shall not accept any liability with regard to computer 
> viruses transferred by way of email.
>
> Please note that your communication may be monitored in accordance 
> with Johnson Matthey internal policy documentation.
>
>
>
> _______________________________________________
> ase-users mailing list
> ase-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20180110/5a1efed8/attachment-0001.html>


More information about the ase-users mailing list