Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal Server Error #3

Closed
rwmontalvao opened this issue Feb 5, 2024 · 8 comments
Closed

Internal Server Error #3

rwmontalvao opened this issue Feb 5, 2024 · 8 comments

Comments

@rwmontalvao
Copy link

rwmontalvao commented Feb 5, 2024

After following the web server installation instructions, I get an "Internal Server Error" message when accessing it.
I am using OpenSUSE Leap 15.5 and a Conda Python installation.
server_error

@kntkb
Copy link

kntkb commented Feb 9, 2024

Hi! First of all, thank you for sharing this fantastic repo!

I also get the same error mentioned above using macOS Monterey with Apple M1 Pro. Attached is my conda environment just in case this helps in anyway.

myenv.yaml.txt

@sherryliu987
Copy link

If you're struggling to run Admet_AI locally, feel free to try https://www.tamarind.bio/admet. Tamarind is an online platform for bioinformatics tools that offers property prediction workflows, including ADMET, for free.

@kntkb
Copy link

kntkb commented Feb 12, 2024

It seems like a quick solution is to pass the absolute pass for static_folder and template_folder in web/app/__init__.py.

@RuikangSun
Copy link

It seems like a quick solution is to pass the absolute pass for static_folder and template_folder in web/app/__init__.py.

Hi! I have the same issue. Could you please provide more information on how to solve this? I did not find anything about 'static_folder or template_folder' in 'miniconda3\envs\admet_ai\Lib\site-packages\admet_ai\web/app/__init__.py' . Thank you!

@swansonk14
Copy link
Owner

@rwmontalvao thank you for bringing up this issue!

@kntkb thank you for the suggested solution!

@RuikangSun, I think @kntkb has the solution. To provide some more detail, what you need to do is go into admet_ai/web/app/__init__.py and modify app = Flask(__name__) to instead be:

app = Flask(__name__, template_folder='/path/to/admet_ai/web/app/templates', static_folder='/path/to/admet_ai/web/app/static')

where the paths are the absolute paths on your system. By default, Flask uses the relative paths template_folder='template' and static_folder='static' which work for me, but the absolute paths might help on other systems.

Please let me know if you're still having trouble getting it to work.

Best,
Kyle

@RuikangSun
Copy link

RuikangSun commented Apr 8, 2024

@rwmontalvao thank you for bringing up this issue!

@kntkb thank you for the suggested solution!

@RuikangSun, I think @kntkb has the solution. To provide some more detail, what you need to do is go into admet_ai/web/app/__init__.py and modify app = Flask(__name__) to instead be:

app = Flask(__name__, template_folder='/path/to/admet_ai/web/app/templates', static_folder='/path/to/admet_ai/web/app/static')

where the paths are the absolute paths on your system. By default, Flask uses the relative paths template_folder='template' and static_folder='static' which work for me, but the absolute paths might help on other systems.

Please let me know if you're still having trouble getting it to work.

Best, Kyle

Thank you!
I found there is no 'static' or 'templates' folder in '/path/to/admet_ai/web/app/' folder after default installation via pip, so I downloaded the 'web' folder and pasted it in '/path/to/admet_ai/web/app/'. Now everything works well.

@rwmontalvao
Copy link
Author

@rwmontalvao thank you for bringing up this issue!

@kntkb thank you for the suggested solution!

@RuikangSun, I think @kntkb has the solution. To provide some more detail, what you need to do is go into admet_ai/web/app/__init__.py and modify app = Flask(__name__) to instead be:

app = Flask(__name__, template_folder='/path/to/admet_ai/web/app/templates', static_folder='/path/to/admet_ai/web/app/static')

where the paths are the absolute paths on your system. By default, Flask uses the relative paths template_folder='template' and static_folder='static' which work for me, but the absolute paths might help on other systems.

Please let me know if you're still having trouble getting it to work.

Best, Kyle

@swansonk14, @kntkb, and @RuikangSun, thank you very much for your help with this issue. Now it works for me. I copied the web folder from the GitHub repo, as did @RuikangSun.

@swansonk14 Congratulations, and thank you very much for making this code available. It is very helpful!!!

@swansonk14
Copy link
Owner

Great, I'm glad that worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants