Body: <p>I've recently been pulling TLR genes for different species and keep running across an error called file.fa whenever I start pulling them. Whenever I pull the first gene it's fine and makes the file.fa but when I pull the second gene (TLR4) it comes up with a file.fa error and deleted the previous file.fa
  made from when I pulled the first gene. Any feedback would be greatly appreciated.</p>
  <pre><code>['NP_001273862', 'XP_006138208', 'XP_006138164', 'XP_014427015', 'XP_014429739']
  Traceback (most recent call last):
    File &quot;blastp.py&quot;, line 104, in &lt;module&gt;
      SeqIO.write(record, &quot;file.fa&quot;, 'fasta')
    File &quot;/home/dylan_w190/miniconda3/lib/python3.8/site-packages/Bio/SeqIO/__init__.py&quot;, line 522, in write
      with as_handle(handle, &quot;w&quot;) as fp:
    File &quot;/home/dylan_w190/miniconda3/lib/python3.8/contextlib.py&quot;, line 113, in __enter__
      return next(self.gen)
    File &quot;/home/dylan_w190/miniconda3/lib/python3.8/site-packages/Bio/File.py&quot;, line 72, in as_handle
      with open(handleish, mode, **kwargs) as fp:
  FileNotFoundError: [Errno 2] No such file or directory: 'file.fa'
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-13T07:48:48.433Z
Comments.Text: Can U plz provide enough detail for me to try to reproduce the error?
Comments.UserDisplayName: Liam McIntyre
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-13T17:13:51.807Z
Comments.Text: Show your code please- the error is slightly counterintuitive to me since *writing* to a file should not lead to `FileNotFoundError`
Comments.UserDisplayName: Chris_Rands
Tags: <file-formats>
Title: Not Able to pull genes due to file.fa error
ThreadText: # Not Able to pull genes due to file.fa error
  
  (Asked by: username_0 on 2021-02-13)
  
  I've recently been pulling TLR genes for different species and keep running across an error called file.fa whenever I start pulling them. Whenever I pull the first gene it's fine and makes the file.fa but when I pull the second gene (TLR4) it comes up with a file.fa error and deleted the previous file.fa
  made from when I pulled the first gene. Any feedback would be greatly appreciated.
  
  ```
  ['NP_001273862', 'XP_006138208', 'XP_006138164', 'XP_014427015', 'XP_014429739']
  Traceback (most recent call last):
    File "blastp.py", line 104, in <module>
      SeqIO.write(record, "file.fa", 'fasta')
    File "/home/dylan_w190/miniconda3/lib/python3.8/site-packages/Bio/SeqIO/__init__.py", line 522, in write
      with as_handle(handle, "w") as fp:
    File "/home/dylan_w190/miniconda3/lib/python3.8/contextlib.py", line 113, in __enter__
      return next(self.gen)
    File "/home/dylan_w190/miniconda3/lib/python3.8/site-packages/Bio/File.py", line 72, in as_handle
      with open(handleish, mode, **kwargs) as fp:
  FileNotFoundError: [Errno 2] No such file or directory: 'file.fa'
  
  ```
  
  **Tags:** file-formats
  
  > **Comments:**
  > **username_1**: Can U plz provide enough detail for me to try to reproduce the error?  
  > **username_2**: Show your code please- the error is slightly counterintuitive to me since *writing* to a file should not lead to `FileNotFoundError`  
  
  ---
  
  ## 0 answers
  
  