An integer is required? open()

前端 未结 5 1570
遇见更好的自我
遇见更好的自我 2020-11-28 10:43

I have a very simple python script that should scan a text file, which contains lines formatted as id=\'value\' and put them into a dict.

5条回答
  •  情书的邮戳
    2020-11-28 11:09

    Because you did from os import *, you are (accidenally) using os.open, which indeed requires an integer flag instead of a textual "r" or "w". Take out that line and you'll get past that error.

提交回复
热议问题