Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » scratchattach - A Scratch API wrapper | v1.0 released (Python)
- grandpasp
-
20 posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
More information on the failure of project.comments()
I've confirmed that user.comments() works. It returns a list of dictionaries.
project.comments() continues to return an empty list
Tim, please help!
I've confirmed that user.comments() works. It returns a list of dictionaries.
project.comments() continues to return an empty list
Tim, please help!
- Mast_Scratch
-
100+ posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
i am writing this code into the python thingimport osi get this error
os.system(“pip install -U scratchattach”)
1
import scratchattach as scratch3Traceback (most recent call last):i have no idea why this script is not working i got no error when i download it so why wont this work
File “<pyshell#9>”, line 1, in <module>
import scratchattach
ModuleNotFoundError: No module named ‘scratchattach’
why is there 1, in the code?


- wvzack
-
100+ posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
idki am writing this code into the python thingimport osi get this error
os.system(“pip install -U scratchattach”)
1
import scratchattach as scratch3Traceback (most recent call last):i have no idea why this script is not working i got no error when i download it so why wont this work
File “<pyshell#9>”, line 1, in <module>
import scratchattach
ModuleNotFoundError: No module named ‘scratchattach’
why is there 1, in the code?
- wvzack
-
100+ posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
? Line one is import os…
- wvzack
-
100+ posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
oh know i understandimport os = line 1? Line one is import os…
os.system(“pip install -U scratchattach”) = line 2
1 = line 3
import scratchattach as scratch3 = line 4
- KROKOBIL
-
100+ posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
Use:Scratch has blocked replit from accessing scratch, with the exception of clouddata.scratch.mit.edukk
~~~
Error? Here's the code:Then, it gives me:import os import scratchattach as scratch3 from replit import db Session = os.environ["sessionID"] session = scratch3.Session(Session, username="Knightbot63") conn = scratch3.TwCloudConnection("790734555") client = scratch3.TwCloudRequests(conn) ...Code... @client.event def on_request(request): print("Received request", request.name, request.requester, request.arguments, request.timestamp, request.id) @client.event def on_unknown_request(request): print("Received unknown request", request.name, request.requester, request.arguments, request.timestamp, request.id) @client.event def on_error(request, e): print("Request: ", request.name, request.requester, request.arguments, request.timestamp, request.id) print("Error that occured: ", e) def start(): client.run()Traceback (most recent call last): File "main.py", line 1, in <module> from attach import start File "/home/runner/CatBits-Server/attach.py", line 8, in <module> conn = scratch3.TwCloudConnection("790734555") TypeError: __init__() takes 1 positional argument but 2 were given
conn = scratch3.TwCloudConnection(project_id = "790734555")




Magst du in meinem Studio für deutsche Scratcher mitmachen?
Scrolling Platformer Creator für meine 50 Follower!
- Knightbot63
-
1000+ posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
Huh, now it worked. Thanks! Use:conn = scratch3.TwCloudConnection(project_id = "790734555")
This is a Signature, I am allowed to advertise or put whatever is appropriate.
Good Song
Check out my website if you could!
Fun Fact: If you follow me when reading this, you get good luck for the rest of your life!
See my shop!
Cheats, Coming Soon for Stickman Quest(Useful):
C&MBLECTRL
X&RVSE
Must be in the Name Enter Screen
- grandpasp
-
20 posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
I have some scratchattach code that runs OK from my computer eg:
cloud_var_dict = scratch3.get_cloud( <a valid project id> ) #returns a dictionary
Then I decided to test it on the python hosting site: “PythonAnywhere”.
When I run it from there, some code runs OK (I can pull in User and general Project data, but when I run the above line, I get a warning “…_cloud.py…The Numpy module was reloaded…discouraged…” etc. (I omitted some words) and it returns an empty list.
Does anyone have any experience with PythonAnywhere or have any idea what may be going wrong? Thanks in advance.
cloud_var_dict = scratch3.get_cloud( <a valid project id> ) #returns a dictionary
Then I decided to test it on the python hosting site: “PythonAnywhere”.
When I run it from there, some code runs OK (I can pull in User and general Project data, but when I run the above line, I get a warning “…_cloud.py…The Numpy module was reloaded…discouraged…” etc. (I omitted some words) and it returns an empty list.
Does anyone have any experience with PythonAnywhere or have any idea what may be going wrong? Thanks in advance.
- -FreeEngines-
-
100+ posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
defenetly a pythonanywhere issue I have some scratchattach code that runs OK from my computer eg:
cloud_var_dict = scratch3.get_cloud( <a valid project id> ) #returns a dictionary
Then I decided to test it on the python hosting site: “PythonAnywhere”.
When I run it from there, some code runs OK (I can pull in User and general Project data, but when I run the above line, I get a warning “…_cloud.py…The Numpy module was reloaded…discouraged…” etc. (I omitted some words) and it returns an empty list.
Does anyone have any experience with PythonAnywhere or have any idea what may be going wrong? Thanks in advance.
- grandpasp
-
20 posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
Thanks. I'll message them directly. I'm guessing that they are pre-loading NumPy as part of their python interperator environment and then Tim loads it again in _Cloud.py. Since I am in over my head here, I was hoping someone had seen something like this before so that I could explain it better. Thanks again.defenetly a pythonanywhere issue I have some scratchattach code that runs OK from my computer eg:
cloud_var_dict = scratch3.get_cloud( <a valid project id> ) #returns a dictionary
Then I decided to test it on the python hosting site: “PythonAnywhere”.
When I run it from there, some code runs OK (I can pull in User and general Project data, but when I run the above line, I get a warning “…_cloud.py…The Numpy module was reloaded…discouraged…” etc. (I omitted some words) and it returns an empty list.
Does anyone have any experience with PythonAnywhere or have any idea what may be going wrong? Thanks in advance.
- RichieRules
-
16 posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
Is there a tutorial on how to set it up? I made a Fortnite game and I want to be able to send people Vbucks (R-Bucks)
I already have python downloaded.
I already have python downloaded.
ENTER MY DMC
- Knightbot63
-
1000+ posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
Setup the program? Or the code for it? Is there a tutorial on how to set it up? I made a Fortnite game and I want to be able to send people Vbucks (R-Bucks)
I already have python downloaded.
This is a Signature, I am allowed to advertise or put whatever is appropriate.
Good Song
Check out my website if you could!
Fun Fact: If you follow me when reading this, you get good luck for the rest of your life!
See my shop!
Cheats, Coming Soon for Stickman Quest(Useful):
C&MBLECTRL
X&RVSE
Must be in the Name Enter Screen
- Crystxl-
-
6 posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
@wvzack
Should be:
import os
os.system(“pip install scratchattach”)
import scratchattach as scratch3
instead
Sorry, I don't have time to format this post but wishing you good luck on whatever you're trying to create
Should be:
import os
os.system(“pip install scratchattach”)
import scratchattach as scratch3
instead
Sorry, I don't have time to format this post but wishing you good luck on whatever you're trying to create

ᴄʏxʟ-
- wvzack
-
100+ posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
i get a syntax error @wvzack
Should be:
import os
os.system(“pip install scratchattach”)
import scratchattach as scratch3
instead
Sorry, I don't have time to format this post but wishing you good luck on whatever you're trying to create
- -FreeEngines-
-
100+ posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
Is there a tutorial on how to set it up? I made a Fortnite game and I want to be able to send people Vbucks (R-Bucks)
I already have python downloaded.
what is this syntax error? i would guess its something like pip is not recognized as an internal or external command. in this case you have to download pip, which is pythons package mangaer. it essentially allows you to install external “packages”, also called libaries, into python and use code they bring with them. Installing it varies on the device you are oni get a syntax error @wvzack
Should be:
import os
os.system(“pip install scratchattach”)
import scratchattach as scratch3
instead
Sorry, I don't have time to format this post but wishing you good luck on whatever you're trying to create
- Mast_Scratch
-
100+ posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
ummm I forgot, how do I install scratchattach on desktop? (not desktop desktop I mean the folder) it says pip isn't a command (shortened form of something big)
EDIT : I REALLY FORGOT
EDIT : I THINK I FOUND A WAY
EDIT : NOPE, The term ‘pip’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1 what should I do? (I forgot as I said before)
EDIT : I REALLY FORGOT
EDIT : I THINK I FOUND A WAY
EDIT : NOPE, The term ‘pip’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1 what should I do? (I forgot as I said before)
Last edited by Mast_Scratch (Jan. 29, 2023 09:20:39)


- Redstone1080
-
1000+ posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
(#1422)are you using a venv? that shouldn't happen if so..
ummm I forgot, how do I install scratchattach on desktop? (not desktop desktop I mean the folder) it says pip isn't a command (shortened form of something big)
EDIT : I REALLY FORGOT
EDIT : I THINK I FOUND A WAY
EDIT : NOPE, The term ‘pip’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1 what should I do? (I forgot as I said before)
using a venv can resolve this. for more info, read the docs.
if you're not using one, WHAT ARE YOU DOING WITH YOUR LIFE VENVS CAN SOLVE: DEPENDENCY CONFLICTS, LET YOU CHOOSE A DIFFERENT PYTHON VERSION ETC!! ok sorry for screaming but seriously, use. venvs.
- Erti36
-
13 posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
Is it possible to find out the number of your (or not your) subscribers. ??????
