-
Notifications
You must be signed in to change notification settings - Fork 73
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Expected Behavior
The minestat call should've run as intended with no errors
Actual Behavior/Symptoms
The minestat call causes an exception error
How to Reproduce Behavior/Symptoms
The error seems to happen randomly, fixing itself after a while/after a restart.
MineStat Version
2.6.3
Programming Language and Compiler/Interpreter Version
Python
Operating System
Linux
Output/Screenshot(s)
TypeError: string indices must be integers, not 'str'
ERROR:apscheduler.executors.default:Job "update_schedule (trigger: interval[0:01:00], next run at: 2025-10-23 15:25:03 -03)" raised an exception
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/apscheduler/executors/base.py", line 181, in run_coroutine_job
retval = await job.func(*job.args, **job.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/main.py", line 61, in update_schedule
ms = minestat.MineStat(
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/minestat/__init__.py", line 317, in __init__
self.json_query()
File "/usr/local/lib/python3.12/site-packages/minestat/__init__.py", line 776, in json_query
return self.__parse_json_payload(payload_raw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/minestat/__init__.py", line 791, in __parse_json_payload
self.version = payload_obj["version"]["name"]
~~~~~~~~~~~^^^^^^^^^^^Snippet code:
async def update_schedule():
ms = minestat.MineStat(
os.getenv('SERVER_IP'),
int(os.getenv('SERVER_PORT'))
)
if ms.online:
pass
)
refresh_schedule = AsyncIOScheduler()
refresh_schedule.add_job(update_schedule, 'interval', minutes=1)
refresh_schedule.start()Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working