MolecularAI / aizynthfinder

A tool for retrosynthetic planning
https://molecularai.github.io/aizynthfinder/
MIT License
571 stars 130 forks source link

Problem with graphviz when running under a webserver environment #87

Closed danisetiawan closed 1 year ago

danisetiawan commented 1 year ago

I am trying to implement aizynthfinder into a webserver. When trying to generate and to load the reaction route graph, I got this error :

Warning: file loading is disabled because the environment contains SERVER_NAME=["some.server"] and the GV_FILE_PATH variable is unset or empty.

Warning: Filename "/tmp/tmp62vcms4e/DWARVEFTXURXDY-GFCCVEGCSA-N.png" is unsafe Warning: No or improper image="/tmp/tmp62vcms4e/DWARVEFTXURXDY-GFCCVEGCSA-N.png" for node "140005957508736"

The error seems to be related to graphviz: https://graphviz.org/doc/info/command.html#GV_FILE_PATH

I have tried to include the GV_FILE_PATH environment within the make_graphviz_image() function in the utils.image module, while it calls the dot executable, as suggested by the link above, but it doesn't work.

I also tried to set the environment direcly, (using os.environ), which also does not work.

Any suggestions with this?

SGenheden commented 1 year ago

Thanks for your feedback.

No suggestion. I just know that getting graphviz to work is sometimes not that easy.

Before the end of the year, I will release a new version of the package where we have implemented a native drawing algorithm so that graphviz is not a dependency anymore.

SGenheden commented 1 year ago

In the latest release we have implemented a python-native route for drawing routes.