<div dir="ltr">Hi Peter,<div><br></div><div>Here it is:</div><div><br></div><div><div>Traceback (most recent call last):</div><div><br></div><div> File "<ipython-input-107-561cd74d2097>", line 1, in <module></div><div> runfile('D:/Dropbox/Pejvak Moghimi/DMT_project/blast_for_clav_seqs/blastScript(altered).py', wdir='D:/Dropbox/Pejvak Moghimi/DMT_project/blast_for_clav_seqs')</div><div><br></div><div> File "C:\Users\pezhv\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 880, in runfile</div><div> execfile(filename, namespace)</div><div><br></div><div> File "C:\Users\pezhv\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile</div><div> exec(compile(f.read(), filename, 'exec'), namespace)</div><div><br></div><div> File "D:/Dropbox/Pejvak Moghimi/DMT_project/blast_for_clav_seqs/blastScript(altered).py", line 116, in <module></div><div> result_handle = NCBIWWW.qblast("blastp", "nr", sequence, hitlist_size=500, entrez_query = orgn_specified)</div><div><br></div><div> File "C:\Users\pezhv\Anaconda3\lib\site-packages\Bio\Blast\NCBIWWW.py", line 164, in qblast</div><div> <b>time.sleep(wait)</b></div></div><div><b><br></b></div><div><b><br></b></div><div>Cheers,</div><div>Pej.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 26 July 2017 at 14:57, Peter Cock <span dir="ltr"><<a href="mailto:p.j.a.cock@googlemail.com" target="_blank">p.j.a.cock@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Pej.<br>
<br>
Hmm. Maybe setting the timeout is not going to solve your<br>
problem. I was hoping that would be a neat solution.<br>
<br>
Can you show us the stack trace when you had to stop a job<br>
please?<br>
<br>
I assume you are using control+c to do this, in which case<br>
Python ought to stop with the exception KeyboardInterrupt.<br>
What I am interested in here is where in the code Python<br>
is getting stuck. That would be a good clue.<br>
<br>
Peter<br>
<br>
On Wed, Jul 26, 2017 at 2:47 PM, Pejvak Moghimi<br>
<<a href="mailto:pejvak.moghimi@york.ac.uk">pejvak.moghimi@york.ac.uk</a>> wrote:<br>
> Hi Peter,<br>
><br>
<div class="HOEnZb"><div class="h5">> That solution, so far, does not seem to have worked nor with 10 neither with<br>
> 30 second options.<br>
><br>
> Cheers,<br>
> Pej.<br>
><br>
> On 26 July 2017 at 13:29, Peter Cock <<a href="mailto:p.j.a.cock@googlemail.com">p.j.a.cock@googlemail.com</a>> wrote:<br>
>><br>
>> I am hoping that putting this near the start of your script will<br>
>> apply the default timeout to all your BLAST calls (or other<br>
>> network calls, e.g. NCBI Entrez):<br>
>><br>
>> import socket<br>
>> socket.setdefaulttimeout(30) # timeout in seconds<br>
>><br>
>> Peter<br>
</div></div></blockquote></div><br></div>