scratchattach icon indicating copy to clipboard operation
scratchattach copied to clipboard

Cannot get value of a variable

Open pmfcmu opened this issue 9 months ago • 6 comments

Hi, I followed your example but I am unable to make it work. Any hint what might be triggering this error?

import scratchattach as sa session = sa.login("username", "password") cloud = session.connect_scratch_cloud("1128495096") value = cloud.get_var("Score") print(value)

I use my Scratch username and password the the script runs fine if I comment get_var. However, the above results in:

File "/Users/pedroassisferreira/PyCharmMiscProject/.venv/lib/python3.12/site-packages/scratchattach/cloud/cloud.py", line 75, in get_all_vars logs.reverse() ^^^^^^^^^^^^ AttributeError: 'FetchError' object has no attribute 'reverse'

I am not really sure what to do. My Scratch project has 1 sprite with a cloud variable called Score. Thanks!

Image

pmfcmu avatar Feb 04 '25 01:02 pmfcmu