[ase-users] python3 encoding error?

Jens Jørgen Mortensen jjmo at dtu.dk
Wed Jan 24 13:50:15 CET 2018


Den 11-01-2018 kl. 14:42 skrev Glenn Jones:
>
> Hi,
>
> I also needed to modify line 77 to get the script to run:
>
> if l.find(b'str(self.running_pids[i][1])') != -1:
>
> from
>
> if l.find(str(self.running_pids[i][1])) != -1:
>

Thanks:

     https://gitlab.com/ase/ase/issues/203

Jens Jørgen

> Glenn
>
> *From:*Glenn Jones
> *Sent:* 11 January 2018 13:14
> *To:* 'Jens Jørgen Mortensen' <jjmo at dtu.dk>; 
> ase-users at listserv.fysik.dtu.dk; Steen Lysgaard <stly at dtu.dk>
> *Subject:* RE: [ase-users] python3 encoding error?
>
> Hi Jens,
>
> Thanks, l.find(b'defunct'), gets me past that error.
>
> Cheers,
>
>
> Glenn
>
> *From:*Jens Jørgen Mortensen [mailto:jjmo at dtu.dk]
> *Sent:* 10 January 2018 07:41
> *To:* Glenn Jones <gjones at matthey.com <mailto:gjones at matthey.com>>; 
> ase-users at listserv.fysik.dtu.dk 
> <mailto:ase-users at listserv.fysik.dtu.dk>; Steen Lysgaard <stly at dtu.dk 
> <mailto:stly at dtu.dk>>
> *Subject:* Re: [ase-users] python3 encoding error?
>
> 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
>     <mailto:ase-users at listserv.fysik.dtu.dk>
>
>     https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
>
> This message has been scanned for viruses by MailControl 
> <http://www.mailcontrol.com/>, a service from BlackSpider Technologies 
> <http://www.blackspider.com/>.
>
> Click here 
> <https://www.mailcontrol.com/sr/QbwKFPmK1KfGX2PQPOmvUnk1PR6ftzo0fqCVmEq6r2OaknyDkCYvpdWeaOgLprs3SxkP3+BbJ8AAXoNDtAu6BA==> 
> to report this email as spam
>

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


More information about the ase-users mailing list