努力读研的小常 2021-05-18 09:39 采纳率: 100%
浏览 1576
已采纳

python做词云图出现错误?

python做词云图的时候出错

ValueError: Couldn't find space to draw. Either the Canvas size is too small or too much of the image is masked out怎么进行调试,谢谢各位大佬

  • 写回答

2条回答 默认 最新

  • 关注

    你这个输出图像没有空间了,也可能是设置的太小或太大,建议把字体设置合适一些,因为我发现这个错误的原因 和字体有关

    except IndexError:
                        try:
                            font_size = sizes[0]
                        except IndexError:
                            raise ValueError(
                                "Couldn't find space to draw. Either the Canvas size"
                                " is too small or too much of the image is masked "
                                "out.")
    
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?