Closed Nohet closed 3 years ago
You are using the wrong repo. That is the old minecraft wrapper. It is not supported any longer.
The code you are actually running is from here (old version): https://github.com/benbaptist/minecraft-wrapper You are posting this issue here (this repo): https://github.com/benbaptist/wrapper.py
No guarantees.. but: you can change the code of wrapper\api\helpers.py: def getjsonfile(filename, directory=".", encodedas="UTF-8"):
Read a json file and return its contents as a dictionary.
:Args:
:filename: filename without extension.
:directory: by default, wrapper script directory.
:encodedas: the encoding
:returns:
:if successful: a dictionary
:if unsuccessful: None/{}
:File not found: False (any requested directory would be created)
"""
if not os.path.exists(directory):
mkdir_p(directory)
if os.path.exists("%s/%s.json" % (directory, filename)):
with open("%s/%s.json" % (directory, filename)) as f:
try:
return json.loads(f.read(), encoding=encodedas) <== CHANGE THIS; REMOVE 'encoding=encodeas'
except ValueError:
return None
# Exit yielding None (no data)
else:
return False # bad directory or filename
Looks like a problem/inconsitency with the windows python for your language/encoding version perhaps...
@benbaptist you may want to close this and (maybe?) re-open in the old wrapper repo.
Oh shoot! My apologies, I don't know how I missed this. Encoding errors are always fun in Python.
I'll close this for now, and if someone would like, they can re-open in the old repo.
When i try to start server, this error appears.