Skip to content

error that stops the code running.  #48

Open
@stuald

Description

@stuald

Hi guys,

Having used this code successfully for a long time now, I have started getting this intermittent error in the python code.

Traceback (most recent call last):
File "c:\Users\sturobot\Desktop\DWXi1\DWX\python\samm_2_0_v3.py", line 797, in
processor = tick_processor(MT4_files_dir)
File "c:\Users\sturobot\Desktop\DWXi1\DWX\python\samm_2_0_v3.py", line 28, in init
self.dwx = dwx_client(self, MT4_directory_path, sleep_delay,
File "c:\Users\sturobot\Desktop\DWXi1\DWX\python\api\dwx_client.py", line 87, in init
self.load_orders()
File "c:\Users\sturobot\Desktop\DWXi1\DWX\python\api\dwx_client.py", line 353, in load_orders
data = json.loads(text)
File "C:\Users\sturobot\AppData\Local\Programs\Python\Python39\lib\json_init_.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Users\sturobot\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\sturobot\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

it seems to be doing this from time to time when opening and parsing the orders files coming from the MQL element.
it happens across multiple instances, on multiple machines. (so i don't think its the desktop setup)
I can resolve this by manually deleting all the text files in the MQL/files/DWX = data folder where MQL stores the information.

anyone else experiencing this?
any ideas?

thanks
Stuart

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions