Closed GitbyteMaster closed 1 year ago
Oh. If you are using replit, you need to use the Online IDE Login feature: https://github.com/Sid72020123/scratchconnect#using-scratchconnect-in-online-ides-like-replit
If you have any problems, ask me here! Steps to get session ID: https://sid72020123.github.io/scratchconnect/session_id/#steps-to-get-the-session-id
Okay, thanks! I will check this out, and tell you if I find an error on my end.
Ok. If the issue is resolved you can close it anytime and we can still continue our communication here...
Okay, I've decided to just use a desktop for this job instead. Now, connecting cloud variables isn't working. I'm using a MacBook Air if it helps.
Hm... Can you share the code here? Or is there any error message you get?
Sorry for the delay! Here's my error:
Traceback (most recent call last):
File "/Users/*/Desktop/*/Cloud Handler.py", line 5, in <module>
variables = project.connect_cloud_variables()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/scratchconnect/Project.py", line 504, in connect_cloud_variables
return CloudConnection.CloudConnection(project_id=self.project_id, client_username=self.client_username,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/scratchconnect/CloudConnection.py", line 55, in __init__
self._make_connection()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/scratchconnect/CloudConnection.py", line 124, in _make_connection
self._ws = websocket.WebSocket(enable_multithread=True)
TypeError: WebSocket.__init__() got an unexpected keyword argument 'enable_multithread'
Oh. Then uninstall the library and install it again!
Try running this command:
pip uninstall websocket && pip uninstall scratchconnect && pip uninstall websocket-client && pip install scratchconnect
If that gives an error then try running each command manually (the commands are separated by "&&")
And now, on execution:
Traceback (most recent call last):
File "~/Desktop/SORA/Cloud Handler.py", line 5, in <module>
variables = project.connect_cloud_variables()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/scratchconnect/Project.py", line 504, in connect_cloud_variables
return CloudConnection.CloudConnection(project_id=self.project_id, client_username=self.client_username,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/scratchconnect/CloudConnection.py", line 55, in __init__
self._make_connection()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/scratchconnect/CloudConnection.py", line 125, in _make_connection
self._ws.connect(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/websocket/_core.py", line 249, in connect
self.sock, addrs = connect(url, self.sock_opt, proxy_info(**options),
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/websocket/_http.py", line 136, in connect
sock = _ssl_socket(sock, options.sslopt, hostname)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/websocket/_http.py", line 271, in _ssl_socket
sock = _wrap_sni_socket(sock, sslopt, hostname, check_hostname)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/websocket/_http.py", line 247, in _wrap_sni_socket
return context.wrap_socket(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 513, in wrap_socket
return self.sslsocket_class._create(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1071, in _create
self.do_handshake()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1342, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)
Oh looks like your computer's SSL certificates got old (or expired) or maybe IDK what's happening. I don't know much about certificates so, I can't help you. Sorry.
BTW you can also try to use TimMcCool's scratchattach and tell me if that library works on your device??
It did, on a Windows. Sorry for being so late!
It's ok. No problem.
So, did ScratchAttach worked on your device??
Anyways I'm so busy these days that I don't get time to update this unused library. I recommend you to switch to ScratchAttach.
I am simply trying to login with my Scratch account with this function. I'm working in Replit.
Assigning the env. variable and importing
os
andscratchconnect
are the only things in this script at the moment. When I run this code, however:This might just be a problem internally, but could you help out anyways?