This topic created in 4508 days ago, the information mentioned may be changed or developed.
用PIL保存图片是的路径是相对路径,如果直接运行
$ python server.py
操作时不会出现找不到路径的错误,但如果换成用supervisor来管理进程就会报错。
如:
img.save("./static/images/%s.png" % img_name, "PNG")
supervisor下"./static/images/"要换成绝对路径才可以,不然会报找不到文件夹错误。
请问如何让supervisor也可以用相对路径?
2 replies • 1970-01-01 08:00:00 +08:00