Error connecting to Turbowarp cloud
I only ran this part of my code:
import scratchattach as scratch3
from getpass import getpass
# try:
do_finally = True
session = scratch3.login(username="fhghfvhgfv", password=getpass("Confirm password:"))
conn = session.connect_tw_cloud(project_id=877175882, contact="fhghfvhgfv", purpose="Server")
And it had an error on the last line.
Traceback (most recent call last):
File "c:\Users\nolan\OneDrive\Documents\Code\python\Space_generate\main.py", line 6, in <module>
conn = session.connect_tw_cloud(project_id=877175882, contact="fhghfvhgfv", purpose="Server")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\nolan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\scratchattach\site\session.py", line 582, in connect_tw_cloud
return cloud.TwCloud(project_id=project_id, purpose=purpose, contact=contact, cloud_host=cloud_host, _session=self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: TwCloud.__init__() got an unexpected keyword argument '_session'
(Note that I tried again 5 times)
You need to update
I already have the newest version.
(of scratchattach and pip)
do you have multiple python versions installed?
htmlcoder1562 @.***> schrieb am Di., 4. Feb. 2025, 22:14:
(of scratchattach and pip)
— Reply to this email directly, view it on GitHub https://github.com/TimMcCool/scratchattach/issues/339#issuecomment-2635090728, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATCKMZUVDABKD5RBMWOJS5L2OEUS3AVCNFSM6AAAAABWOZ3RCSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMZVGA4TANZSHA . You are receiving this because you commented.Message ID: @.***>
Yes.
Use python.exe -m pip install -U scratchattach
(Use the python.exe that you use to execute python code)
Nothing changed.
check the value of sys.executable
If you are sure that the version is correct, then use scratchattach.get_tw_cloud instead
I noticed two things. 1: The Scratch cloud broke 2: scratchattach.get_tw_cloud isn't there for me.
session.connect_tw_cloud won't work because TW doesn't have authentication. Normally, it'd be scratchattach.get_tw_cloud. But with your import as, it needs to be scratch3.get_tw_cloud.
It is working in the next version
50-scratch-tabs @.***> schrieb am So., 9. Feb. 2025, 01:08:
session.connect_tw_cloud won't work because TW doesn't have authentication. Normally, it'd be scratchattach.get_tw_cloud. But with your import as, it needs to be scratch3.get_tw_cloud.
— Reply to this email directly, view it on GitHub https://github.com/TimMcCool/scratchattach/issues/339#issuecomment-2645991509, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATCKMZTC3THQS6P3PB5RSF32O2MALAVCNFSM6AAAAABWOZ3RCSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNBVHE4TCNJQHE . You are receiving this because you commented.Message ID: @.***>
Am closing this for now. If you are still encountering the issue after the fix, please create a new issue.
ok.