python - Sphinx warning image file not readable - Stack Overflow

I am developing a custom Sphinx directive that generates an image file and then adds an image node for

I am developing a custom Sphinx directive that generates an image file and then adds an image node for that file with

img_node = nodes.image(uri=image_uri)

That basically works and I can see the image in the generated html.

But I am getting the warning 'image file not readable'. Seems Sphinx looks for the file in the doc folder, but I am generating the file into the build folder. Not sure if Sphinx registers the file due to adding the image node.

I registered the file with env.images.add_file(env.docname, path), where path is _images/myfile.svg. This didn't help. I guess, again, this refers to the doc folder, not the build folder.

Can somehow help how I can tell Sphinx not to search for the file and not to try to copy it? Generating the file into the doc folder seems wrong since it's a build output.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744153092a4560729.html

相关推荐

  • python - Sphinx warning image file not readable - Stack Overflow

    I am developing a custom Sphinx directive that generates an image file and then adds an image node for

    9天前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信