Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 989981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:52:40+00:00 2026-05-16T05:52:40+00:00

So I have a file that looks like so: #!/usr/bin/python import MySQLdb import subprocess

  • 0

So I have a file that looks like so:

#!/usr/bin/python
import MySQLdb
import subprocess
from subprocess import call
import re

conx = MySQLdb.connect (user = 'root', passwd = '******', db = 'vaxijen_antigens')
cursor = conx.cursor()
cursor.execute('select * from sequence')
row = cursor.fetchall()

f = open('/home/rv/ncbi-blast-2.2.23+/db/vdatabase.fasta', 'w')

for i in row:
    f.write('>'+i[0].strip()+'\n')
    s = re.sub(r'[^\w]','',str(i[1]))
    s = ''.join(s)
    for k in range(0, len(s), 60):
        f.write('%s\n' % (s[k:k+60]))
    f.write('\n')

f.close()

subprocess.call(['formatdb', '-p', 'T', '-i', r'/home/rv/ncbi-blast-2.2.23+/db/vdatabase.fasta'])

The file runs no problem from the command line but when I try and run it with crontab I get this error:

  File "/home/rv/ncbi-blast-2.2.23+/db/formatdb.py", line 29, in <module>
    subprocess.call(['formatdb', '-p', 'T', '-i',
r'/home/rv/ncbi-blast-2.2.23+/db/vdatabase.fasta'])
OSError: [Errno 2] No such file or directory

I don’t understand, the file exist in that directory, I’ve double and triple checked. I tried converting the file path to a raw string hence the lower case “r” before the path but that didn’t do it either.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T05:52:41+00:00Added an answer on May 16, 2026 at 5:52 am

    I suspect it’s complaining about the path to “formatdb” in your subprocess call. Try changing that to the full path:

    subprocess.call(['/home/path/formatdb', ...])
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a file structure that looks like this ./501.res/1.bin ./503.res/1.bin ./503.res/2.bin ./504.res/1.bin and
I have a file that looks like: 1 1 C C 1.9873 2.347 3.88776
I have a file that looks like: SECTION1 id name sub section1 sub section2
I have a file that contain lines that looks like this: >AF001546_1 [88 -
I have a file that contain list of numbers that looks like this: 10^-92
I have an XML file that looks like <?xml version=1.0> <playlist> <name>My Playlist</name> <song>
I have a data file that looks like this: xyz123 2.000 -0.3974 0.0 hij123
I have a text file that looks like this. A 102 B 456 C
I have an XML file that looks like <?xml version='1.0' encoding='UTF-8'?> <root> <node name=foo1
I have a text file that looks like this: value1 value2 value3 There are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.