Skip to content
This repository has been archived by the owner on Oct 3, 2022. It is now read-only.

json.decoder.JSONDecodeError: Expecting value: line 2 column 1 (char 1) #8

Closed
axsddlr opened this issue Jul 1, 2021 · 20 comments
Closed

Comments

@axsddlr
Copy link

axsddlr commented Jul 1, 2021

Traceback (most recent call last):
  File "main.py", line 6, in <module>
    from src.cli.command_prompt import Prompt
  File "/mnt/e/Programs/gitrepos/valorant-skin-cli/src/cli/command_prompt.py", line 18, in <module>
    from .validator import Command_Validator
  File "/mnt/e/Programs/gitrepos/valorant-skin-cli/src/cli/validator.py", line 4, in <module>
    commands = Completer.generate_completer_dict()
  File "/mnt/e/Programs/gitrepos/valorant-skin-cli/src/cli/completer_generator.py", line 19, in generate_completer_dict
    skin_data = Loader.fetch_skin_data()
  File "/mnt/e/Programs/gitrepos/valorant-skin-cli/src/flair_loader/skin_loader.py", line 217, in fetch_skin_data
    return json.load(f)
  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 2 column 1 (char 1)
@colinhartigan
Copy link
Owner

try the latest commit

@axsddlr
Copy link
Author

axsddlr commented Jul 1, 2021

try the latest commit

works now but selecting skins and such creates this error:

Traceback (most recent call last): File "main.py", line 34, in <module> Onboarder(client) File "E:\Programs\gitrepos\valorant-skin-cli\src\utility\onboarding.py", line 41, in __init__ self.run() File "E:\Programs\gitrepos\valorant-skin-cli\src\utility\onboarding.py", line 57, in run returned = item["method"]() File "E:\Programs\gitrepos\valorant-skin-cli\src\flair_loader\skin_editor.py", line 40, in select_weapon_type Editor.select_weapon(skin_data,type_choice) File "E:\Programs\gitrepos\valorant-skin-cli\src\flair_loader\skin_editor.py", line 59, in select_weapon Editor.select_skin(skin_data,weapon_choice) File "E:\Programs\gitrepos\valorant-skin-cli\src\flair_loader\skin_editor.py", line 91, in select_skin weapon_data['skins'][skin_choice] = Editor.set_skin_preferences(weapon_skin_data) File "E:\Programs\gitrepos\valorant-skin-cli\src\flair_loader\skin_editor.py", line 135, in set_skin_preferences skin_data['levels'][preference.removeprefix('level_')]['enabled'] = True AttributeError: 'str' object has no attribute 'removeprefix'

@IIIBlueberry
Copy link

What version of Python did you use? IINC you need Python 3.9.x

@colinhartigan
Copy link
Owner

colinhartigan commented Jul 2, 2021

removeprefix was introduced with 3.9 (i think), this won't be a problem once the exe is out

@axsddlr
Copy link
Author

axsddlr commented Jul 2, 2021 via email

@axsddlr
Copy link
Author

axsddlr commented Jul 2, 2021

removeprefix was introduced with 3.9 (i think), this won't be a problem once the exe is out

updated to python 3.9, runs but doesnt work in game

image

@colinhartigan
Copy link
Owner

runs but doesnt work in game

elaborate?

@axsddlr
Copy link
Author

axsddlr commented Jul 2, 2021

runs but doesnt work in game

elaborate?

cli picks up the guns and skins yes, however:

image

@colinhartigan
Copy link
Owner

run modify and set up which guns you want in the randomizer pool

@axsddlr
Copy link
Author

axsddlr commented Jul 2, 2021

also closing and re-runnning script while game is open is causing Typerror:

File "E:\Programs\gitrepos\valorant-skin-cli\src\flair_loader\skin_loader.py", line 128, in generate_skin_data
    level_already_exists = skin_previously_owned and level["uuid"] in existing_skin_data[weapon_uuid]["skins"][skin_uuid]["levels"]
TypeError: 'NoneType' object is not subscriptable

maybe try/except may bypass this

@colinhartigan
Copy link
Owner

can you attach your skin_data.json file?

@axsddlr
Copy link
Author

axsddlr commented Jul 2, 2021

can you attach your skin_data.json file?

https://gist.github.com/Rehkloos/f7f4ecc53af8675f068d6721281b3c55

also even running modify, receiving same no skins in pool verbose

@colinhartigan
Copy link
Owner

looks like none of the skins are actually enabled, make sure you toggle the skin_enabled bool while modifying

https://streamable.com/wzmoid

@axsddlr
Copy link
Author

axsddlr commented Jul 2, 2021

looks like none of the skins are actually enabled, make sure you toggle the skin_enabled bool while modifying

https://streamable.com/wzmoid

seems like youre using a cmd prompt ascii colorizer, maybe also my issue

@colinhartigan
Copy link
Owner

i was going to recommend you try in a different terminal (windows terminal, some IDE's integrated terminal) if it's still not working

@axsddlr
Copy link
Author

axsddlr commented Jul 2, 2021

vscode terminal it is lol

@colinhartigan
Copy link
Owner

vscode works!

@axsddlr
Copy link
Author

axsddlr commented Jul 2, 2021

all good to go! just waiting for enable all button lol

@axsddlr
Copy link
Author

axsddlr commented Jul 2, 2021

good work, ill contribute when i can

@colinhartigan colinhartigan added enhancement New feature or request and removed enhancement New feature or request labels Jul 2, 2021
@colinhartigan
Copy link
Owner

thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants