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

json.decoder.JSONDecodeError #1

Open
khvalera opened this issue Feb 4, 2025 · 0 comments
Open

json.decoder.JSONDecodeError #1

khvalera opened this issue Feb 4, 2025 · 0 comments

Comments

@khvalera
Copy link

khvalera commented Feb 4, 2025

I tried your script and when I run it I get an error:

/home/user/matrix-admin-panel/./main.py:32: SyntaxWarning: invalid escape sequence '\/'
  LOGO = " __  __    _  _____ ____  _____  __     _    ____  __  __ ___ _   _ \n\
 __  __    _  _____ ____  _____  __     _    ____  __  __ ___ _   _ 
|  \/  |  / \|_   _|  _ \|_ _\ \/ /    / \  |  _ \|  \/  |_ _| \ | |
| |\/| | / _ \ | | | |_) || | \  /    / _ \ | | | | |\/| || ||  \| |
| |  | |/ ___ \| | |  _ < | | /  \   / ___ \| |_| | |  | || || |\  |
|_|  |_/_/   \_\_| |_| \_\___/_/\_\ /_/   \_\____/|_|  |_|___|_| \_|

               Welcome to Matrix Admin Control Panel!

[MATRIX ADMIN] Enter your matrix admin account authentication token: 
[MATRIX ADMIN] Enter homeserver URL: http://snug.pp.ua
Traceback (most recent call last):
  File "/home/user/matrix-admin-panel/./main.py", line 102, in <module>
    main()
    ~~~~^^
  File "/home/user/matrix-admin-panel/./main.py", line 93, in main
    check_auth(homeserver, auth_token)
    ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/matrix-admin-panel/./main.py", line 48, in check_auth
    user = json.loads(acc_request.content.decode())["user_id"]
           ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ~~~~~~~~~~~~~~~~~~~~~~~^^^
  File "/usr/lib/python3.13/json/decoder.py", line 345, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/json/decoder.py", line 363, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
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

1 participant