Discuss Scratch

VIGARPAST_777
Scratcher
75 posts

scratchattach - A Scratch API wrapper (Python)

I have a code that requires a username and password, not a session ID, but the problem is that I get logged out of my Scratch account, and when I log in to Scratch, the session in the code closes and it no longer works. How can I fix this?
TheCommCraft
Scratcher
500+ posts

scratchattach - A Scratch API wrapper (Python)

wvzack wrote:

(#3079)
Scrtachattach projects are currently getting these errors and im wondering if it is possible to just skip over them and keep going when they come up.

Warning: Caught error in request 'get_all_info' - Full error below
Traceback (most recent call last):
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/cloud/cloud.py", line 50, in logs
    data = requests.get(f"https://clouddata.scratch.mit.edu/logs?projectid={self.project_id}&limit={limit}&offset={offset}", timeout=10).json()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/utils/requests.py", line 34, in get
    Requests.check_response(r)
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/utils/requests.py", line 19, in check_response
    raise exceptions.APIError("Internal Scratch server error")
scratchattach.utils.exceptions.APIError: Internal Scratch server error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/eventhandlers/cloud_requests.py", line 33, in __call__
    output = self.on_call(*received_request.arguments)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/Python_Projects/ByteBank/cloud_requests.py", line 97, in get_all_info
    username = str(client.get_requester()).lower()
                   ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/eventhandlers/cloud_requests.py", line 384, in get_requester
    activity.load_log_data()
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/site/cloud_activity.py", line 75, in load_log_data
    logs = self.cloud.logs(filter_by_var_named=self.var, limit=100)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/cloud/cloud.py", line 58, in logs
    raise exceptions.FetchError(str(e))
scratchattach.utils.exceptions.FetchError: Internal Scratch server error
Warning: Caught error in request 'get_all_info' - Full error below
Traceback (most recent call last):
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/cloud/cloud.py", line 50, in logs
    data = requests.get(f"https://clouddata.scratch.mit.edu/logs?projectid={self.project_id}&limit={limit}&offset={offset}", timeout=10).json()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/utils/requests.py", line 34, in get
    Requests.check_response(r)
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/utils/requests.py", line 19, in check_response
    raise exceptions.APIError("Internal Scratch server error")
scratchattach.utils.exceptions.APIError: Internal Scratch server error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/eventhandlers/cloud_requests.py", line 33, in __call__
    output = self.on_call(*received_request.arguments)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/Python_Projects/ByteBank/cloud_requests.py", line 97, in get_all_info
    username = str(client.get_requester()).lower()
                   ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/eventhandlers/cloud_requests.py", line 384, in get_requester
    activity.load_log_data()
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/site/cloud_activity.py", line 75, in load_log_data
    logs = self.cloud.logs(filter_by_var_named=self.var, limit=100)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/cloud/cloud.py", line 58, in logs
    raise exceptions.FetchError(str(e))
scratchattach.utils.exceptions.FetchError: Internal Scratch server error 
I suspect that this means that the cloudlogs are just not available. Please create an issue on github.
kRxZy_kRxZy
Scratcher
1000+ posts

scratchattach - A Scratch API wrapper (Python)

wvzack wrote:

Scrtachattach projects are currently getting these errors and im wondering if it is possible to just skip over them and keep going when they come up.

Warning: Caught error in request 'get_all_info' - Full error below
Traceback (most recent call last):
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/cloud/cloud.py", line 50, in logs
    data = requests.get(f"https://clouddata.scratch.mit.edu/logs?projectid={self.project_id}&limit={limit}&offset={offset}", timeout=10).json()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/utils/requests.py", line 34, in get
    Requests.check_response(r)
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/utils/requests.py", line 19, in check_response
    raise exceptions.APIError("Internal Scratch server error")
scratchattach.utils.exceptions.APIError: Internal Scratch server error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/eventhandlers/cloud_requests.py", line 33, in __call__
    output = self.on_call(*received_request.arguments)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/Python_Projects/ByteBank/cloud_requests.py", line 97, in get_all_info
    username = str(client.get_requester()).lower()
                   ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/eventhandlers/cloud_requests.py", line 384, in get_requester
    activity.load_log_data()
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/site/cloud_activity.py", line 75, in load_log_data
    logs = self.cloud.logs(filter_by_var_named=self.var, limit=100)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/cloud/cloud.py", line 58, in logs
    raise exceptions.FetchError(str(e))
scratchattach.utils.exceptions.FetchError: Internal Scratch server error
Warning: Caught error in request 'get_all_info' - Full error below
Traceback (most recent call last):
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/cloud/cloud.py", line 50, in logs
    data = requests.get(f"https://clouddata.scratch.mit.edu/logs?projectid={self.project_id}&limit={limit}&offset={offset}", timeout=10).json()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/utils/requests.py", line 34, in get
    Requests.check_response(r)
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/utils/requests.py", line 19, in check_response
    raise exceptions.APIError("Internal Scratch server error")
scratchattach.utils.exceptions.APIError: Internal Scratch server error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/eventhandlers/cloud_requests.py", line 33, in __call__
    output = self.on_call(*received_request.arguments)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/Python_Projects/ByteBank/cloud_requests.py", line 97, in get_all_info
    username = str(client.get_requester()).lower()
                   ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/eventhandlers/cloud_requests.py", line 384, in get_requester
    activity.load_log_data()
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/site/cloud_activity.py", line 75, in load_log_data
    logs = self.cloud.logs(filter_by_var_named=self.var, limit=100)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/cloud/cloud.py", line 58, in logs
    raise exceptions.FetchError(str(e))
scratchattach.utils.exceptions.FetchError: Internal Scratch server error 
scratch servers are unstable, this is why im not running my project scratch gpt
wvzack
Scratcher
500+ posts

scratchattach - A Scratch API wrapper (Python)

kRxZy_kRxZy wrote:

wvzack wrote:

Scrtachattach projects are currently getting these errors and im wondering if it is possible to just skip over them and keep going when they come up.

Warning: Caught error in request 'get_all_info' - Full error below
Traceback (most recent call last):
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/cloud/cloud.py", line 50, in logs
    data = requests.get(f"https://clouddata.scratch.mit.edu/logs?projectid={self.project_id}&limit={limit}&offset={offset}", timeout=10).json()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/utils/requests.py", line 34, in get
    Requests.check_response(r)
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/utils/requests.py", line 19, in check_response
    raise exceptions.APIError("Internal Scratch server error")
scratchattach.utils.exceptions.APIError: Internal Scratch server error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/eventhandlers/cloud_requests.py", line 33, in __call__
    output = self.on_call(*received_request.arguments)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/Python_Projects/ByteBank/cloud_requests.py", line 97, in get_all_info
    username = str(client.get_requester()).lower()
                   ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/eventhandlers/cloud_requests.py", line 384, in get_requester
    activity.load_log_data()
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/site/cloud_activity.py", line 75, in load_log_data
    logs = self.cloud.logs(filter_by_var_named=self.var, limit=100)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/cloud/cloud.py", line 58, in logs
    raise exceptions.FetchError(str(e))
scratchattach.utils.exceptions.FetchError: Internal Scratch server error
Warning: Caught error in request 'get_all_info' - Full error below
Traceback (most recent call last):
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/cloud/cloud.py", line 50, in logs
    data = requests.get(f"https://clouddata.scratch.mit.edu/logs?projectid={self.project_id}&limit={limit}&offset={offset}", timeout=10).json()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/utils/requests.py", line 34, in get
    Requests.check_response(r)
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/utils/requests.py", line 19, in check_response
    raise exceptions.APIError("Internal Scratch server error")
scratchattach.utils.exceptions.APIError: Internal Scratch server error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/eventhandlers/cloud_requests.py", line 33, in __call__
    output = self.on_call(*received_request.arguments)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/Python_Projects/ByteBank/cloud_requests.py", line 97, in get_all_info
    username = str(client.get_requester()).lower()
                   ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/eventhandlers/cloud_requests.py", line 384, in get_requester
    activity.load_log_data()
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/site/cloud_activity.py", line 75, in load_log_data
    logs = self.cloud.logs(filter_by_var_named=self.var, limit=100)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/cloud/cloud.py", line 58, in logs
    raise exceptions.FetchError(str(e))
scratchattach.utils.exceptions.FetchError: Internal Scratch server error 
scratch servers are unstable, this is why im not running my project scratch gpt
anyone found a fix? I think a service file would work but i cant get it to wrok
kRxZy_kRxZy
Scratcher
1000+ posts

scratchattach - A Scratch API wrapper (Python)

wvzack wrote:

kRxZy_kRxZy wrote:

wvzack wrote:

Scrtachattach projects are currently getting these errors and im wondering if it is possible to just skip over them and keep going when they come up.

Warning: Caught error in request 'get_all_info' - Full error below
Traceback (most recent call last):
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/cloud/cloud.py", line 50, in logs
    data = requests.get(f"https://clouddata.scratch.mit.edu/logs?projectid={self.project_id}&limit={limit}&offset={offset}", timeout=10).json()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/utils/requests.py", line 34, in get
    Requests.check_response(r)
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/utils/requests.py", line 19, in check_response
    raise exceptions.APIError("Internal Scratch server error")
scratchattach.utils.exceptions.APIError: Internal Scratch server error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/eventhandlers/cloud_requests.py", line 33, in __call__
    output = self.on_call(*received_request.arguments)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/Python_Projects/ByteBank/cloud_requests.py", line 97, in get_all_info
    username = str(client.get_requester()).lower()
                   ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/eventhandlers/cloud_requests.py", line 384, in get_requester
    activity.load_log_data()
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/site/cloud_activity.py", line 75, in load_log_data
    logs = self.cloud.logs(filter_by_var_named=self.var, limit=100)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/cloud/cloud.py", line 58, in logs
    raise exceptions.FetchError(str(e))
scratchattach.utils.exceptions.FetchError: Internal Scratch server error
Warning: Caught error in request 'get_all_info' - Full error below
Traceback (most recent call last):
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/cloud/cloud.py", line 50, in logs
    data = requests.get(f"https://clouddata.scratch.mit.edu/logs?projectid={self.project_id}&limit={limit}&offset={offset}", timeout=10).json()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/utils/requests.py", line 34, in get
    Requests.check_response(r)
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/utils/requests.py", line 19, in check_response
    raise exceptions.APIError("Internal Scratch server error")
scratchattach.utils.exceptions.APIError: Internal Scratch server error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/eventhandlers/cloud_requests.py", line 33, in __call__
    output = self.on_call(*received_request.arguments)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/Python_Projects/ByteBank/cloud_requests.py", line 97, in get_all_info
    username = str(client.get_requester()).lower()
                   ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/eventhandlers/cloud_requests.py", line 384, in get_requester
    activity.load_log_data()
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/site/cloud_activity.py", line 75, in load_log_data
    logs = self.cloud.logs(filter_by_var_named=self.var, limit=100)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/cloud/cloud.py", line 58, in logs
    raise exceptions.FetchError(str(e))
scratchattach.utils.exceptions.FetchError: Internal Scratch server error 
scratch servers are unstable, this is why im not running my project scratch gpt
anyone found a fix? I think a service file would work but i cant get it to wrok
I dont think there is a fix, the error is with scratch or maybe after scratch cloud fixes they might of change the way of how data is sent or sonethin
_c1919
Scratcher
90 posts

scratchattach - A Scratch API wrapper (Python)

VIGARPAST_777 wrote:

I have a code that requires a username and password, not a session ID, but the problem is that I get logged out of my Scratch account, and when I log in to Scratch, the session in the code closes and it no longer works. How can I fix this?
Use a sessionID? That is the most logical solution I can think of
kRxZy_kRxZy
Scratcher
1000+ posts

scratchattach - A Scratch API wrapper (Python)

VIGARPAST_777 wrote:

I have a code that requires a username and password, not a session ID, but the problem is that I get logged out of my Scratch account, and when I log in to Scratch, the session in the code closes and it no longer works. How can I fix this?
Use an alt account, you don't need to be a scratcher on your alt account, for example I use Dev-Server
cone_as
Scratcher
45 posts

scratchattach - A Scratch API wrapper (Python)

kRxZy_kRxZy wrote:

VIGARPAST_777 wrote:

I have a code that requires a username and password, not a session ID, but the problem is that I get logged out of my Scratch account, and when I log in to Scratch, the session in the code closes and it no longer works. How can I fix this?
Use an alt account, you don't need to be a scratcher on your alt account, for example I use Dev-Server
That's smart but don't you need to be a scratcher to be able to modify cloud variables? Or have I missed something.
kRxZy_kRxZy
Scratcher
1000+ posts

scratchattach - A Scratch API wrapper (Python)

cone_as wrote:

kRxZy_kRxZy wrote:

VIGARPAST_777 wrote:

I have a code that requires a username and password, not a session ID, but the problem is that I get logged out of my Scratch account, and when I log in to Scratch, the session in the code closes and it no longer works. How can I fix this?
Use an alt account, you don't need to be a scratcher on your alt account, for example I use Dev-Server
That's smart but don't you need to be a scratcher to be able to modify cloud variables? Or have I missed something.
You dont need to be scratcher, scratch only blocks Scratchers on the website from using cloud variables, they don't block it from the cloud server
TechNerd64
Scratcher
500+ posts

scratchattach - A Scratch API wrapper (Python)

_c1919 wrote:

VIGARPAST_777 wrote:

I have a code that requires a username and password, not a session ID, but the problem is that I get logged out of my Scratch account, and when I log in to Scratch, the session in the code closes and it no longer works. How can I fix this?
Use a sessionID? That is the most logical solution I can think of
Whenever I try logging in with username and password, it never works. I have to use sessionID

Last edited by TechNerd64 (Oct. 12, 2025 13:08:56)

wvzack
Scratcher
500+ posts

scratchattach - A Scratch API wrapper (Python)

kRxZy_kRxZy wrote:

wvzack wrote:

kRxZy_kRxZy wrote:

wvzack wrote:

Scrtachattach projects are currently getting these errors and im wondering if it is possible to just skip over them and keep going when they come up.

Warning: Caught error in request 'get_all_info' - Full error below
Traceback (most recent call last):
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/cloud/cloud.py", line 50, in logs
    data = requests.get(f"https://clouddata.scratch.mit.edu/logs?projectid={self.project_id}&limit={limit}&offset={offset}", timeout=10).json()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/utils/requests.py", line 34, in get
    Requests.check_response(r)
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/utils/requests.py", line 19, in check_response
    raise exceptions.APIError("Internal Scratch server error")
scratchattach.utils.exceptions.APIError: Internal Scratch server error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/eventhandlers/cloud_requests.py", line 33, in __call__
    output = self.on_call(*received_request.arguments)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/Python_Projects/ByteBank/cloud_requests.py", line 97, in get_all_info
    username = str(client.get_requester()).lower()
                   ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/eventhandlers/cloud_requests.py", line 384, in get_requester
    activity.load_log_data()
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/site/cloud_activity.py", line 75, in load_log_data
    logs = self.cloud.logs(filter_by_var_named=self.var, limit=100)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/cloud/cloud.py", line 58, in logs
    raise exceptions.FetchError(str(e))
scratchattach.utils.exceptions.FetchError: Internal Scratch server error
Warning: Caught error in request 'get_all_info' - Full error below
Traceback (most recent call last):
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/cloud/cloud.py", line 50, in logs
    data = requests.get(f"https://clouddata.scratch.mit.edu/logs?projectid={self.project_id}&limit={limit}&offset={offset}", timeout=10).json()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/utils/requests.py", line 34, in get
    Requests.check_response(r)
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/utils/requests.py", line 19, in check_response
    raise exceptions.APIError("Internal Scratch server error")
scratchattach.utils.exceptions.APIError: Internal Scratch server error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/eventhandlers/cloud_requests.py", line 33, in __call__
    output = self.on_call(*received_request.arguments)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/Python_Projects/ByteBank/cloud_requests.py", line 97, in get_all_info
    username = str(client.get_requester()).lower()
                   ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/eventhandlers/cloud_requests.py", line 384, in get_requester
    activity.load_log_data()
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/site/cloud_activity.py", line 75, in load_log_data
    logs = self.cloud.logs(filter_by_var_named=self.var, limit=100)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/cloud/cloud.py", line 58, in logs
    raise exceptions.FetchError(str(e))
scratchattach.utils.exceptions.FetchError: Internal Scratch server error 
scratch servers are unstable, this is why im not running my project scratch gpt
anyone found a fix? I think a service file would work but i cant get it to wrok
I dont think there is a fix, the error is with scratch or maybe after scratch cloud fixes they might of change the way of how data is sent or sonethin
What I mean is a workaround, the error is not a fatal error it just prevents the server from responding. If you restarted your script and killled the old one whenever that happened it would be fine, I just dont know enough about this type of programing to do this.
N8_D_GR8_1
Scratcher
1000+ posts

scratchattach - A Scratch API wrapper (Python)

nvm

Last edited by N8_D_GR8_1 (Oct. 24, 2025 20:30:16)

kRxZy_kRxZy
Scratcher
1000+ posts

scratchattach - A Scratch API wrapper (Python)

wvzack wrote:

kRxZy_kRxZy wrote:

wvzack wrote:

kRxZy_kRxZy wrote:

wvzack wrote:

Scrtachattach projects are currently getting these errors and im wondering if it is possible to just skip over them and keep going when they come up.

Warning: Caught error in request 'get_all_info' - Full error below
Traceback (most recent call last):
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/cloud/cloud.py", line 50, in logs
    data = requests.get(f"https://clouddata.scratch.mit.edu/logs?projectid={self.project_id}&limit={limit}&offset={offset}", timeout=10).json()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/utils/requests.py", line 34, in get
    Requests.check_response(r)
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/utils/requests.py", line 19, in check_response
    raise exceptions.APIError("Internal Scratch server error")
scratchattach.utils.exceptions.APIError: Internal Scratch server error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/eventhandlers/cloud_requests.py", line 33, in __call__
    output = self.on_call(*received_request.arguments)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/Python_Projects/ByteBank/cloud_requests.py", line 97, in get_all_info
    username = str(client.get_requester()).lower()
                   ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/eventhandlers/cloud_requests.py", line 384, in get_requester
    activity.load_log_data()
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/site/cloud_activity.py", line 75, in load_log_data
    logs = self.cloud.logs(filter_by_var_named=self.var, limit=100)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/cloud/cloud.py", line 58, in logs
    raise exceptions.FetchError(str(e))
scratchattach.utils.exceptions.FetchError: Internal Scratch server error
Warning: Caught error in request 'get_all_info' - Full error below
Traceback (most recent call last):
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/cloud/cloud.py", line 50, in logs
    data = requests.get(f"https://clouddata.scratch.mit.edu/logs?projectid={self.project_id}&limit={limit}&offset={offset}", timeout=10).json()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/utils/requests.py", line 34, in get
    Requests.check_response(r)
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/utils/requests.py", line 19, in check_response
    raise exceptions.APIError("Internal Scratch server error")
scratchattach.utils.exceptions.APIError: Internal Scratch server error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/eventhandlers/cloud_requests.py", line 33, in __call__
    output = self.on_call(*received_request.arguments)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/Python_Projects/ByteBank/cloud_requests.py", line 97, in get_all_info
    username = str(client.get_requester()).lower()
                   ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/eventhandlers/cloud_requests.py", line 384, in get_requester
    activity.load_log_data()
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/site/cloud_activity.py", line 75, in load_log_data
    logs = self.cloud.logs(filter_by_var_named=self.var, limit=100)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/bytebank/lib/python3.11/site-packages/scratchattach/cloud/cloud.py", line 58, in logs
    raise exceptions.FetchError(str(e))
scratchattach.utils.exceptions.FetchError: Internal Scratch server error 
scratch servers are unstable, this is why im not running my project scratch gpt
anyone found a fix? I think a service file would work but i cant get it to wrok
I dont think there is a fix, the error is with scratch or maybe after scratch cloud fixes they might of change the way of how data is sent or sonethin
What I mean is a workaround, the error is not a fatal error it just prevents the server from responding. If you restarted your script and killled the old one whenever that happened it would be fine, I just dont know enough about this type of programing to do this.
You would have to keep monitoring the server then.
You could just allow the error using:
import requests
url = "https://somerandomwebsite/api"
try:
    response = requests.get(url)
    response.raise_for_status()
except requests.exceptions.HTTPError as err:
    print(f"HTTP error occurred: {err}")
except requests.exceptions.ConnectionError as err:
    print(f"Connection error: {err}")
except requests.exceptions.Timeout as err:
    print(f"Timeout error: {err}")
except requests.exceptions.RequestException as err:
    print(f"An error occurred: {err}") 
fries09
Scratcher
67 posts

scratchattach - A Scratch API wrapper (Python)

I was wondering if anyone knew a way to send somewhat larger chunks of data to a project? Something like 500 chars without breaking it up into cloud vars
wvzack
Scratcher
500+ posts

scratchattach - A Scratch API wrapper (Python)

fries09 wrote:

I was wondering if anyone knew a way to send somewhat larger chunks of data to a project? Something like 500 chars without breaking it up into cloud vars
The requests template handles it quite well
fries09
Scratcher
67 posts

scratchattach - A Scratch API wrapper (Python)

wvzack wrote:

fries09 wrote:

I was wondering if anyone knew a way to send somewhat larger chunks of data to a project? Something like 500 chars without breaking it up into cloud vars
The requests template handles it quite well

Just got it working. Thanks! It currently fetches (user followers, user message count)
fries09
Scratcher
67 posts

scratchattach - A Scratch API wrapper (Python)

Hey! I'm using the cloud storage, database *, and I was wondering how to load a database from a JSON, or reset the whole thing.
GamerDAC
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

WHAT ERROR IS THIS: Warning: Logged in by id, but couldn't fetch XToken. Make sure the provided session id is valid.
redspacecat
Scratcher
1000+ posts

scratchattach - A Scratch API wrapper (Python)

GamerDAC wrote:

(#3099)
WHAT ERROR IS THIS: Warning: Logged in by id, but couldn't fetch XToken. Make sure the provided session id is valid.
Is the session id you provided valid?
heitorBrazillindo
Scratcher
17 posts

scratchattach - A Scratch API wrapper (Python)

cloud variables are shutdown…
(::#ff0000)

Powered by DjangoBB