cri*_*sol 6 python indentation syntax-error
我收到错误:
\nSyntaxError: invalid non-printable character U+00A0
当我运行下面的代码时:
\n# coding=utf-8\nfrom PIL import Image\n\xc2\xa0\nimg = Image.open("img.png")\nRun Code Online (Sandbox Code Playgroud)\n我尝试加载不同格式的不同图像(png、jpg、jpeg)。我尝试过使用不同版本的 Pillow 库。我也尝试过使用 python 2 和 3 运行它。
\ncri*_*sol 15
该问题与第三行(空行)中发现的假空格有关。它是一个看起来像空格的字符,但实际上是 python 无法检测到的其他字符。通过删除该字符,错误消失了。人物是这样的:
\n\xc2\xa0\nRun Code Online (Sandbox Code Playgroud)\n