Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Script #6

Open
NightLady0 opened this issue Mar 31, 2024 · 5 comments
Open

Bug Script #6

NightLady0 opened this issue Mar 31, 2024 · 5 comments
Assignees

Comments

@NightLady0
Copy link

photo_2024-03-31_17-26-04

C:\Users\Juno Arcove\Desktop\discord-token-onliner-py-main>python main.py
Traceback (most recent call last):
  File "C:\Users\Juno Arcove\Desktop\discord-token-onliner-py-main\main.py", line 369, in <module>
    config: Dict[str, Union[List[str], Dict[str, List[str]]]] = json.loads(config_file.read())
                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Lib\json\__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Lib\json\decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 11 column 13 (char 367)

Config :

{
    "choose_random_online_status_from": ["dnd"],
    "choose_random_activity_type_from": ["listening"],
    "listening": {
        "choose_random_name_from": ["Spotify"]
    },
    "listening": {
        "choose_random_name_from": [
            "Spotify",
            "https://open.spotify.com/intl-fr/track/4Bts64N4oyorK045CU7xDd?si=8c82d8c4e3294a28",
            // Add more listening options here
        ]
    } 
}

image

@PiggyAwesome
Copy link
Owner

It seems like you have the "listening" field listed twice. Remove one of them from your config and it will work fine

@NightLady0
Copy link
Author

It seems like you have the "listening" field listed twice. Remove one of them from your config and it will work fine

Can u give me the right code ?

@PiggyAwesome
Copy link
Owner

PiggyAwesome commented Apr 6, 2024

It seems like you have the "listening" field listed twice. Remove one of them from your config and it will work fine

Can u give me the right code ?

{
    "choose_random_online_status_from": ["dnd"],
    "choose_random_activity_type_from": ["listening"],
    "listening": {
        "choose_random_name_from": [
            "Spotify",
            "https://open.spotify.com/intl-fr/track/4Bts64N4oyorK045CU7xDd?si=8c82d8c4e3294a28"
        ]
    } 
}

As you can see, I removed the first listening field. I also removed the part with the // (comments) as this will usually not work in .json files. I only put it there in the documentation to explain what the setting does. Lastly, I removed the comma (,) at the end because it should only be there if there is still items being listed after it.

@NightLady0
Copy link
Author

It seems like you have the "listening" field listed twice. Remove one of them from your config and it will work fine

Can u give me the right code ?

{
    "choose_random_online_status_from": ["dnd"],
    "choose_random_activity_type_from": ["listening"],
    "listening": {
        "choose_random_name_from": [
            "Spotify",
            "https://open.spotify.com/intl-fr/track/4Bts64N4oyorK045CU7xDd?si=8c82d8c4e3294a28"
        ]
    } 
}

As you can see, I removed the first listening field. I also removed the part with the // (comments) as this will usually not work in .json files. I only put it there in the documentation to explain what the setting does. Lastly, I removed the comma (,) at the end because it should only be there if there is still items being listed after it.

image

Now it tells me that I didn't put the right token, even though I put the right token.

@NightLady0
Copy link
Author

Answer fr ?

@PiggyAwesome PiggyAwesome self-assigned this Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants