[cctbxbb] cctbx versions causing indentation crash?

Magnus Andersson magnus.andersson at scilifelab.se
Fri Nov 10 01:32:01 PST 2017


Thanks for your suggestions, Markus.

I should have mentioned that I did a tab/space check & also tried indenting like you suggest.

I installed the old version of Coot (vers 0.8) and now it works. I guess they’ve changed the way commands are called slightly between versions.

Cheers,

Magnus

> On 09 Nov 2017, at 22:27, <markus.gerstel at diamond.ac.uk> <markus.gerstel at diamond.ac.uk> wrote:
> 
> Dear Magnus,
> 
> I suspect that the error is unrelated to all those things and instead a change in your code. An IndentationError happens in parsing a python file, and all python files contained in cctbx are syntax checked. The python syntax has not changed within 2.7.
> 
> I suggest searching the problematic file for tab characters and if you find any, replace them with spaces.
> Otherwise I can take a look at the file if you upload it somewhere (github.com/pastebin.com/email)
> 
> Does the IndentationError happen inside coot? If I parse the code correctly it should be approximately equivalent to:
> 
> from dials.util.procrunner import run_process
> coot_input = '''
>  (handle-read-draw-molecule-with-recentre "{inf}" 1)
>  (set-refinement-immediate-replacement 1)
>  (set-refine-max-residues 40)
>  (regularize-zone 0 " "  {res1minus} {res3}" ")
>  (accept-regularizement)
>  (regularize-zone 0 " "  {res3} {res2plus}" ")
>  (accept-regularizement)
>  (write-pdb-file 0 "{outf}")
>  (coot-real-exit 0)
> '''.format(inf=inf, outf=outf, res1minus=res1-2, res3=res3, res2plus=res2+2)
> run_process(['coot', '--no-graphics'], stdin=coot_input)
> 
> Does coot allow space in front of commands?
> (And I'm not sure about coot console commands. but some of the "-pairs look a bit strange to me)
> 
> -Markus
> 
> 
> ________________________________________
> From: cctbxbb-bounces at phenix-online.org [cctbxbb-bounces at phenix-online.org] on behalf of Magnus Andersson [magnus.andersson at scilifelab.se]
> Sent: Thursday, November 09, 2017 20:15
> To: cctbx mailing list
> Subject: [cctbxbb] cctbx versions causing indentation crash?
> 
> Hi all,
> 
> I have a script that runs fine on my old computer, but crashes on my new computer with the error message:
> 
> IndentationError: unexpected indent
> 
> This script is (amongst other things) calling the softwatre Coot such as:
> 
> subprocess.call(["""coot --no-graphics<<end/n
>              (handle-read-draw-molecule-with-recentre \""""+str(inf)+"""\" 1)
>              (set-refinement-immediate-replacement 1)
>              (set-refine-max-residues 40)
>              (regularize-zone 0 \" \"  """+str(res1-2)+""" """+str(res3)+"""\" \")
>              (accept-regularizement)
>              (regularize-zone 0 \" \"  """+str(res3)+""" """+str(res2+2)+"""\" \")
>              (accept-regularizement)
>              (write-pdb-file 0 \""""+str(outf)+"""\")
>              (coot-real-exit 0)"""], shell=True)
> 
> which is ok on my old system. I am trying to find the most likely source of this error. Here are the differences:
> 
> - OLD cctbx = uses Python 2.7.10, NEW cctbx 2.7.14
> - OLD OSX = 10.10.5 (i.e. Yosemite), NEW OSX = 10.11.5 (i.e. El Capitan)
> - OLD Coot = vers 0.8, NEW Coot = vers 0.8.8 [old Coot install was from Fink but this shouldn’t matter I think]
> 
> Perhaps someone has encountered something similar or has an educated guess on whether different cctbx versions can cause such errors?
> 
> Thanks,
> 
> Magnus
> 
> 
> 
> ####
> Magnus Andersson, Docent, Ph.D.
> 
> Email: magnus.andersson at scilifelab.se
> Phone: 0769469872
> 
> Mailing address:
> Science For Life Laboratory
> Alpha 6
> Box 1031
> 171 21 Solna
> 
> Visiting address:
> Tomtebodavägen 23A
> 171 65 Solna
> 
> 
> _______________________________________________
> cctbxbb mailing list
> cctbxbb at phenix-online.org
> http://phenix-online.org/mailman/listinfo/cctbxbb
> 
> -- 
> This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
> Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. 
> Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
> Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
> 
> 
> _______________________________________________
> cctbxbb mailing list
> cctbxbb at phenix-online.org
> http://phenix-online.org/mailman/listinfo/cctbxbb

####
Magnus Andersson, Docent, Ph.D.

Email: magnus.andersson at scilifelab.se
Phone: 0769469872

Mailing address:
Science For Life Laboratory
Alpha 6
Box 1031
171 21 Solna

Visiting address:
Tomtebodavägen 23A
171 65 Solna

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://phenix-online.org/pipermail/cctbxbb/attachments/20171110/57f32cb4/attachment-0001.htm>


More information about the cctbxbb mailing list