KennthShang / PhaBOX

Local version of the virus identification and analysis web server (tool set)
https://phage.ee.cityu.edu.hk/
Academic Free License v3.0
37 stars 5 forks source link

print(f'Database directory {db_dir} missing or unreadable') #19

Closed 2061574124 closed 1 month ago

2061574124 commented 4 months ago

firstly, i run: git clone https://github.com/KennthShang/PhaBOX.git and then, cd PhaBOX/ conda env create -f webserver.yml -n phabox conda activate phabox

download the database.zip and parameters.zip to the PhaBOX folder with baidu cloud.

and run: unzip phagesuite_database.zip > /dev/null unzip phagesuite_parameters.zip > /dev/null

after that i make a test; python PhaMer_single.py --contigs test_contigs.fa --threads 8 --len 3000 --rootpth simple_test --out out/ --dbdir database/ --parampth parameters/ --scriptpth scripts/ File "PhaMer_single.py", line 65 print(f'Database directory {db_dir} missing or unreadable') ^ SyntaxError: invalid syntax

I don't know that it was caused by my operation error in that step. I am looking forward to your reply very much

KennthShang commented 4 months ago

Hi,

it seems the 'database' folder is not exist under our PhaBOX path.

Can you check whether the zip files are unzipped correctly? try

unzip phagesuite_database.zip
unzip phagesuite_parameters.zip 

You can also attach a screenshot for all the files within your PhaBOX

Best, Jiayu

2061574124 commented 4 months ago

Hi,

it seems the 'database' folder is not exist under our PhaBOX path.

Can you check whether the zip files are unzipped correctly? try

unzip phagesuite_database.zip
unzip phagesuite_parameters.zip 

You can also attach a screenshot for all the files within your PhaBOX

Best, Jiayu

2024-07-10 14-45-46屏幕截图 Thanks so much!ABOVE IS THE SCREENSHOT FOR ALL FILES WITHIN PhaBOX

KennthShang commented 4 months ago

I suddenly found your error message is SyntaxError: invalid syntax

which means there should be a problem with your environment. Can you show the terminal you run the codes?

Best, Jiayu

KennthShang commented 4 months ago

And this error usually occurs when your python is 2, but the phabox env should be 3

2061574124 commented 4 months ago

And this error usually occurs when your python is 2, but the phabox env should be 3

Thank you very much for your patient. It is true that python2 was used before. I directly conda install python=3.8 in phabox environment. However, the following error occurs when i run following code: 2024-07-10 17-42-23屏幕截图

2061574124 commented 4 months ago

And this error usually occurs when your python is 2, but the phabox env should be 3

Thank you very much for your patient. It is true that python2 was used before. I directly conda install python=3.8 in phabox environment. However, the following error occurs when i run following code: 2024-07-10 17-42-23屏幕截图

KennthShang commented 4 months ago

This should be a problem caused by your personal computer, because when running conda env create -f webserver.yml -n phabox, it will only install the python3.

There are several steps maybe you can try:

  1. Please try to remove or uninstall the python2 in your env PATH
  2. Please try to install anaconda/miniconda with python3 default.
  3. Reinstall phabox using conda env create -f webserver.yml -n phabox

Hope this will help.

If you still cannot solve the problem, please try our webserver PhaBOX

Best, Jiayu