Closed AlexanderPico closed 6 years ago
Does it appear the problem is that the SVG doesn't exist, or is it that Inkscape can't convert the new SVG to PNG?
The path to the svg contains a variable... _wpid_
/var/www/wikipathways/images/6/64/'_wpid_'.svg
cannot be opened (does not exist or not a valid SVG file)
Hmm... that's coming from the url @khanspers linked to in Slack... Problem might be there...
Test: https://webservice.wikipathways.org/getPathwayAs?fileType=png&pwId='+wpid+'&revision=0
Result: error 500 Unable to get pathway: exception 'Exception' with message 'Unable to convert to png: (inkscape:4294): CRITICAL : Inkscape::XML::Document sp_repr_read_file(const gchar, const gchar): assertion 'Inkscape::IO::file_test( filename, G_FILE_TEST_EXISTS )' failed (inkscape:4294): CRITICAL : Inkscape::XML::Document sp_repr_read_file(const gchar, const gchar): assertion 'Inkscape::IO::file_test( filename, G_FILE_TEST_EXISTS )' failed (inkscape:4294): WARNING : Specified document /var/www/wikipathways/images/6/64/'wpid'.svg cannot be opened (does not exist or not a valid SVG file) Command: inkscape -z -b white -w 1000 -f '/var/www/wikipathways/images/6/64/'\''wpid'\''.svg' -e '/var/www/wikipathways/images/2/2d/'\''wpid'\''.png' 2>&1' in /var/www/wikipathways/wpi/extensions/Pathways/Pathway.php:1324 Stack trace: #0 /var/www/wikipathways/wpi/extensions/Pathways/Pathway.php(1123): Pathway->savePngCache() #1 /var/www/wikipathways/wpi/extensions/Pathways/Pathway.php(640): Pathway->updateCache('png') #2 /var/www/wikipathways/wpi/webservice2.0/webservice.php(310): Pathway->getFileLocation('png') #3 [internal function]: getPathwayAs('png', '' wpid '', '0') #4 /var/www/wikipathways/wpi/webservice2.0/webservice.lib.php(402): ReflectionFunction->invokeArgs(Array) #5 /var/www/wikipathways/wpi/webservice2.0/webservice.lib.php(263): BCWebService->executeMethod() #6 /var/www/wikipathways/wpi/webservice2.0/index.php(172): BCWebService->listen() #7 {main} : Receiver :