Reputation: 900
Please help, i'm getting this error:
with open('Data/language.json') as settings_file:
TypeError: Required argument 'flags' (pos 2) not found
My code is:
import json
with open('Data/settings.json') as settings_file:
Settings = json.load(settings_file)
Upvotes: 3
Views: 1695
Reputation: 298176
It looks like you imported open
from the os
module with something like:
from os import open
os.open
isn't the same as the builtin open
function (which you don't need to import). Remove that import and you'll use the builtin open
, which defaults to read mode.
Upvotes: 5