mangunowsky / MFBotDocker

2 stars 0 forks source link

JSONDecodeError #1

Closed MrLoLf closed 8 months ago

MrLoLf commented 1 year ago

When run and taking a look at the logs with docker logs container ID

Traceback (most recent call last):
  File "MainProgram.py", line 227, in <module>
    initHTML()
  File "MainProgram.py", line 68, in initHTML
    initDetails()
  File "MainProgram.py", line 34, in initDetails
    AccountFun.updateAccs(False)
  File "/mfbot/Web/Functions/AccountFun.py", line 36, in updateAccs
    details = ComUtils.curlGet("?head=1")
  File "/mfbot/Web/Utils/ComUtils.py", line 23, in curlGet
    return json.loads(rString)
  File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
  File "MainProgram.py", line 227, in <module>
    initHTML()
  File "MainProgram.py", line 68, in initHTML
    initDetails()
  File "MainProgram.py", line 34, in initDetails
    AccountFun.updateAccs(False)
  File "/mfbot/Web/Functions/AccountFun.py", line 36, in updateAccs
    details = ComUtils.curlGet("?head=1")
  File "/mfbot/Web/Utils/ComUtils.py", line 23, in curlGet
    return json.loads(rString)
  File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
  File "MainProgram.py", line 227, in <module>
    initHTML()
  File "MainProgram.py", line 68, in initHTML
    initDetails()
  File "MainProgram.py", line 34, in initDetails
    AccountFun.updateAccs(False)
  File "/mfbot/Web/Functions/AccountFun.py", line 36, in updateAccs
    details = ComUtils.curlGet("?head=1")
  File "/mfbot/Web/Utils/ComUtils.py", line 23, in curlGet
    return json.loads(rString)
  File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
  File "MainProgram.py", line 227, in <module>
    initHTML()
  File "MainProgram.py", line 68, in initHTML
    initDetails()
  File "MainProgram.py", line 34, in initDetails
    AccountFun.updateAccs(False)
  File "/mfbot/Web/Functions/AccountFun.py", line 36, in updateAccs
    details = ComUtils.curlGet("?head=1")
  File "/mfbot/Web/Utils/ComUtils.py", line 23, in curlGet
    return json.loads(rString)
  File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
 * Running on all addresses.
   WARNING: This is a development server. Do not use it in a production deployment.
 * Running on http://172.17.0.3:8050/ (Press CTRL+C to quit)

This is what I get. It tells me that it's running, but when I try to access this address, I get a timeout. I have used the port 6969 and default admin accounts for the Acc.ini and changed nothing on the docker setup. The actual bot is running, as I get automatically logged out if I would want to log in manually. I can ping the IP without the port and don't receive a timeout error.

MrLoLf commented 1 year ago

To get the webinterface working I had to map the port to my local ip via docker run -p ip_adress:8050:8050 -dit mfbot

mangunowsky commented 8 months ago

Updated run command in readme. Thanks for submitting the issue!