[GH-ISSUE #310] Config-file is not working #263

Open
opened 2026-03-02 23:39:06 +03:00 by kerem · 2 comments
Owner

Originally created by @janbuhh on GitHub (Apr 8, 2021).
Original GitHub issue: https://github.com/alexal1/Insomniac/issues/310

Hello,
when I start Insomniac with a json config file I received errors. I get the same error when I start with my own config file and and every example file. Here is the output:
Traceback (most recent call last):
File "start.py", line 4, in
insomniac.run(activation_code)
File "/home/pi/.local/lib/python3.8/site-packages/insomniac/init.py", line 30, in run
insomniac_session.run()
File "", line 145, in run
File "/home/pi/.local/lib/python3.8/site-packages/insomniac/session.py", line 135, in parse_args
ok, args = parse_arguments(self.get_session_args(), self.starter_conf_file_path)
File "/home/pi/.local/lib/python3.8/site-packages/insomniac/params.py", line 46, in parse_arguments
refresh_args_by_conf_file(args)
File "/home/pi/.local/lib/python3.8/site-packages/insomniac/params.py", line 72, in refresh_args_by_conf_file
params = json.load(json_file)
File "/usr/lib/python3.8/json/init.py", line 293, in load
return loads(fp.read(),
File "/usr/lib/python3.8/json/init.py", line 357, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 7 column 1 (char 6)

Best regards
Jan

Originally created by @janbuhh on GitHub (Apr 8, 2021). Original GitHub issue: https://github.com/alexal1/Insomniac/issues/310 Hello, when I start Insomniac with a json config file I received errors. I get the same error when I start with my own config file and and every example file. Here is the output: Traceback (most recent call last): File "start.py", line 4, in <module> insomniac.run(activation_code) File "/home/pi/.local/lib/python3.8/site-packages/insomniac/__init__.py", line 30, in run insomniac_session.run() File "<string>", line 145, in run File "/home/pi/.local/lib/python3.8/site-packages/insomniac/session.py", line 135, in parse_args ok, args = parse_arguments(self.get_session_args(), self.starter_conf_file_path) File "/home/pi/.local/lib/python3.8/site-packages/insomniac/params.py", line 46, in parse_arguments refresh_args_by_conf_file(args) File "/home/pi/.local/lib/python3.8/site-packages/insomniac/params.py", line 72, in refresh_args_by_conf_file params = json.load(json_file) File "/usr/lib/python3.8/json/__init__.py", line 293, in load return loads(fp.read(), File "/usr/lib/python3.8/json/__init__.py", line 357, in loads return _default_decoder.decode(s) File "/usr/lib/python3.8/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 7 column 1 (char 6) Best regards Jan
Author
Owner

@alexal1 commented on GitHub (Apr 8, 2021):

Your .json is not properly formatted. You can attach it here if you want the community to help you

<!-- gh-comment-id:815634009 --> @alexal1 commented on GitHub (Apr 8, 2021): Your .json is not properly formatted. You can attach it here if you want the community to help you
Author
Owner

@janbuhh commented on GitHub (Apr 9, 2021):

Thanks for your fast answer.
I´ve tried it again with your example script "interact-likes-only.json" without any changes, because I only wanted to know if the script will work. Also your example stops with an error.
Here is the output:
Traceback (most recent call last):
File "start.py", line 4, in
insomniac.run(activation_code)
File "/home/pi/.local/lib/python3.8/site-packages/insomniac/init.py", line 30, in run
insomniac_session.run()
File "", line 155, in run
File "/home/pi/.local/lib/python3.8/site-packages/insomniac/sleeper.py", line 33, in update_random_sleep_range
speed = _get_internet_speed()
File "/home/pi/.local/lib/python3.8/site-packages/insomniac/sleeper.py", line 61, in _get_internet_speed
s = speedtest.Speedtest()
File "/home/pi/.local/lib/python3.8/site-packages/insomniac/tools/speedtest.py", line 964, in init
self.get_config()
File "/home/pi/.local/lib/python3.8/site-packages/insomniac/tools/speedtest.py", line 1046, in get_config
ignore_servers = list(
ValueError: invalid literal for int() with base 10: ''

For you, I´ve saved the file from json to txt and attached it here, if you could find an error in the format (copy and past error?).
interact-likes-only.txt

<!-- gh-comment-id:816790056 --> @janbuhh commented on GitHub (Apr 9, 2021): Thanks for your fast answer. I´ve tried it again with your example script "interact-likes-only.json" without any changes, because I only wanted to know if the script will work. Also your example stops with an error. Here is the output: Traceback (most recent call last): File "start.py", line 4, in <module> insomniac.run(activation_code) File "/home/pi/.local/lib/python3.8/site-packages/insomniac/__init__.py", line 30, in run insomniac_session.run() File "<string>", line 155, in run File "/home/pi/.local/lib/python3.8/site-packages/insomniac/sleeper.py", line 33, in update_random_sleep_range speed = _get_internet_speed() File "/home/pi/.local/lib/python3.8/site-packages/insomniac/sleeper.py", line 61, in _get_internet_speed s = speedtest.Speedtest() File "/home/pi/.local/lib/python3.8/site-packages/insomniac/tools/speedtest.py", line 964, in __init__ self.get_config() File "/home/pi/.local/lib/python3.8/site-packages/insomniac/tools/speedtest.py", line 1046, in get_config ignore_servers = list( ValueError: invalid literal for int() with base 10: '' For you, I´ve saved the file from json to txt and attached it here, if you could find an error in the format (copy and past error?). [interact-likes-only.txt](https://github.com/alexal1/Insomniac/files/6287089/interact-likes-only.txt)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Insomniac#263
No description provided.