scratchattach version
2.1.17, 3.0.0b
What happened?
Whenever I attempt to use the create_project method on a valid Session object, it throws this:
scratchattach.utils.exceptions.Unauthorized: The user corresponding to the connected login / session is not allowed to perform this action. Request content: b'{"code":"Forbidden","message":""}'
I can still create and edit projects just fine on the Scratch website, so I don't think I am banned or suspended on there. I have tried logging in and out on the Scratch website, and creating a new Session object.
Please let me know if you need any more details.
Your code.
currentsession = sa.login("<user>", "<pass>")
currentsession.create_project(title="Hi")
Traceback
Traceback (most recent call last):
File "<python-input-14>", line 1, in <module>
currentsession.create_project(title="Hi")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
File "C:\Users\<private>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\scratchattach\site\session.py", line 561, in create_project
response = requests.post('https://projects.scratch.mit.edu/', params=params, cookies=self._cookies,
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
headers=self._headers, json=project_json).json()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\<private>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\scratchattach\utils\requests.py", line 50, in post
self.check_response(r)
~~~~~~~~~~~~~~~~~~~^^^
File "C:\Users\<private>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\scratchattach\utils\requests.py", line 23, in check_response
raise exceptions.Unauthorized(f"Request content: {r.content!r}")
scratchattach.utils.exceptions.Unauthorized: The user corresponding to the connected login / session is not allowed to perform this action. Request content: b'{"code":"Forbidden","message":""}'
scratchattach version
2.1.17, 3.0.0b
What happened?
Whenever I attempt to use the
create_projectmethod on a validSessionobject, it throws this:scratchattach.utils.exceptions.Unauthorized: The user corresponding to the connected login / session is not allowed to perform this action. Request content: b'{"code":"Forbidden","message":""}'I can still create and edit projects just fine on the Scratch website, so I don't think I am banned or suspended on there. I have tried logging in and out on the Scratch website, and creating a new
Sessionobject.Please let me know if you need any more details.
Your code.
Traceback
Traceback (most recent call last): File "<python-input-14>", line 1, in <module> currentsession.create_project(title="Hi") ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^ File "C:\Users\<private>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\scratchattach\site\session.py", line 561, in create_project response = requests.post('https://projects.scratch.mit.edu/', params=params, cookies=self._cookies, ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ headers=self._headers, json=project_json).json() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\<private>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\scratchattach\utils\requests.py", line 50, in post self.check_response(r) ~~~~~~~~~~~~~~~~~~~^^^ File "C:\Users\<private>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\scratchattach\utils\requests.py", line 23, in check_response raise exceptions.Unauthorized(f"Request content: {r.content!r}") scratchattach.utils.exceptions.Unauthorized: The user corresponding to the connected login / session is not allowed to perform this action. Request content: b'{"code":"Forbidden","message":""}'