Discuss Scratch

nampinanathali
Scratcher
1000+ posts

scratchattach - A Scratch API wrapper (Python)

 Caught error in request 'searchusername': Expecting value: line 1 column 1 (char 0) 


can you help me



mom when look at my browser history
carter2210
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

I need help, im trying to add cloud requests but it won't seem to work.
The problem is it won't add the “pong” in the response list.
Here is the python code:
import scratchattach as scratch3

session = scratch3.login(“carter2210”, “YOU ARE NOT GETTING MEH PASWORD”)
conn = session.connect_cloud(project_id=“717546662”)

client = scratch3.CloudRequests(conn)

@client.request
def ping():
print(“Ping request received”)
return “pong” #sends back ‘pong’ to the Scratch project

@client.event
def on_ready():
print(“Request handler is ready”)

client.run()
I think it could be the “import scratchattach as scratch3” part but probably not IDK halp

Last edited by carter2210 (July 27, 2022 22:44:09)



ඞඞඞ
ඞඞඞඞඞ
ඞඞඞඞඞඞඞ
ඞඞඞඞඞඞ
ඞඞඞඞඞඞඞ
ඞඞඞ
ඞඞඞඞඞ
Mini Cremat Protec Siggy

Quote of the IDK : “patrick day ovr ono”
(Note: Quote of the IDK Changes Randomly, Hence the Name.)
if there is red text on my pfp that means i am temp blocked

OTHER ACCOUNTS: Roblox, Minecraft, Steam.

PEOPLE YOU SHOULD CHECK OUT: My little sister, some of my friends.

COOL PROJECTS I MADE/HELP MADE/CONTRIBUTED TO: (By @1000epicc) (By @flowers_girl_2255)
-FreeEngines-
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

DXStr1ke wrote:

brandontwinzone wrote:

Thanks for the package! I'll use it for my future python projects
Also, is it available on PyCharm? I don't have pip.
If you don't have pip/pypi, TMC also said he put it on GitHub, so yes, you can still use it if you don't have pip installed.
people do not understand.. pycharm is an editor, not a custom python installation
ScratchTheCoder12345
Scratcher
500+ posts

scratchattach - A Scratch API wrapper (Python)

-FreeEngines- wrote:

DXStr1ke wrote:

brandontwinzone wrote:

Thanks for the package! I'll use it for my future python projects
Also, is it available on PyCharm? I don't have pip.
If you don't have pip/pypi, TMC also said he put it on GitHub, so yes, you can still use it if you don't have pip installed.
people do not understand.. pycharm is an editor, not a custom python installation
I know right. Python is an IDE NOT A “custom python installation”

Hello, I'm Brandon a Python developer who loves math and coding.
he/him
Feel free to message me with any questions
TheReal_BestGamer
Scratcher
33 posts

scratchattach - A Scratch API wrapper (Python)

[Removed - please don't quote the main post]
How are you able to connect to the Scratch servers? Don't they encrypt data or at least have very minimal protection against this?

Last edited by Harakou (July 30, 2022 16:36:49)

TimMcCool
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

Update - v0.8.4

New features:

Cloud requests

- Get request metadata (requester, request timestamp) in your requests.
You can now use these functions in your requests:
client.get_requester() #Returns the user who sent the request
client.get_timestamp() #Returns the timestamp of the request
This can be useful to prevent cloud hacking.

- More new features in this new section of the documentation: https://github.com/TimMcCool/scratchattach#cloud-requests—advanced

Bug fixes:

- Cloud requests will no longer print out the word “respond” and the cloud logs

Developer of scratchattach, the most popular Python Scratch API wrapper
Mast_Scratch
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

TimMcCool wrote:

Update - v0.8.4

New features:

Cloud requests

- Get request metadata (requester, request timestamp) in your requests.
You can now use these functions in your requests:
client.get_requester() #Returns the user who sent the request
client.get_timestamp() #Returns the timestamp of the request
This can be useful to prevent cloud hacking.

- More new features in this new section of the documentation: https://github.com/TimMcCool/scratchattach#cloud-requests—advanced

Bug fixes:

- Cloud requests will no longer print out the word “respond” and the cloud logs

First one to see this post and :O niceeeeeee


MrCloudGame
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

TimMcCool wrote:

Update - v0.8.4

New features:

Cloud requests

- Get request metadata (requester, request timestamp) in your requests.
You can now use these functions in your requests:
client.get_requester() #Returns the user who sent the request
client.get_timestamp() #Returns the timestamp of the request
This can be useful to prevent cloud hacking.

- More new features in this new section of the documentation: https://github.com/TimMcCool/scratchattach#cloud-requests—advanced

Bug fixes:

- Cloud requests will no longer print out the word “respond” and the cloud logs



nice
Mast_Scratch
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

ok why was this not acitve


Nigthmare_27
Scratcher
37 posts

scratchattach - A Scratch API wrapper (Python)

carter2210 wrote:

I need help, im trying to add cloud requests but it won't seem to work.
The problem is it won't add the “pong” in the response list.
Here is the python code:
import scratchattach as scratch3

session = scratch3.login(“carter2210”, “YOU ARE NOT GETTING MEH PASWORD”)
conn = session.connect_cloud(project_id=“717546662”)

client = scratch3.CloudRequests(conn)

@client.request
def ping():
print(“Ping request received”)
return “pong” #sends back ‘pong’ to the Scratch project

@client.event
def on_ready():
print(“Request handler is ready”)

client.run()
I think it could be the “import scratchattach as scratch3” part but probably not IDK halp
You have to delete the client.event() part, the “client” variable is defined for cloud requests, not for events.
lecxouroblox
Scratcher
35 posts

scratchattach - A Scratch API wrapper (Python)

My browser / operating system: Windows NT 10.0, Chrome 103.0.0.0, Flash 32.0 (release 0)
(ChromeOS sucks for personal things.)
TimMcCool
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

Update - v0.8.5

Improvements:
- Cloud Requests will now always print out the full exception if there is an error in a request
- Requests don't send anything back to the Scratch project if they return None

Last edited by TimMcCool (Aug. 3, 2022 23:10:20)


Developer of scratchattach, the most popular Python Scratch API wrapper
Mast_Scratch
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

TimMcCool wrote:

Update - v0.8.5

Improvements:
- Cloud Requests will now always print out the full exception if there is an error in a request
- Requests don't send anything back to the Scratch project if they return None

FIRST AGAIN AND WOW!!


infintyrussia
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

Is it possible to reduce the amount of cloud vars scratchattach uses? Like leave 2 cloud vars for the server and then the rest are free for me to use.


-FreeEngines-
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

TheReal_BestGamer wrote:

[Removed - please don't quote the main post]
How are you able to connect to the Scratch servers? Don't they encrypt data or at least have very minimal protection against this?
how would they?
Like anytime you send a request to the servers, the encryption etc. would have to be done client sided, which means you can replicate it. what would encrypting do anyways? and how would they have protection
-FreeEngines-
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

infintyrussia wrote:

Is it possible to reduce the amount of cloud vars scratchattach uses? Like leave 2 cloud vars for the server and then the rest are free for me to use.
no, the only way you could do that is by modifying tims code rapidly.
GentleX
Scratcher
94 posts

scratchattach - A Scratch API wrapper (Python)

Blackout32 wrote:

QuadCat wrote:

MonkeyBean2 wrote:

QuadCat wrote:

MonkeyBean2 wrote:

QuadCat wrote:

TimMcCool wrote:

-snipped-
I cannot install scratchattach. Can you please help? I tried every way you listed. Python just says that there is a syntax error. Or when I try putting this at the beginning of the code file:

“import os
os.system(”pip install scratchattach“)

import scratchattach as scratch3”

And then putting the code, python says:

“Traceback (most recent call last):
File ”C:\Users\*****\Downloads\install scratchattach.py“, line 4, in <module>
import scratchattach as scratch3
ModuleNotFoundError: No module named ‘scratchattach’”


Or if I try to type“pip install scratchattach”, I get:
SyntaxError: invalid syntax

Can you please help me install scratchattach?

(I am on python 3.10.2, by the way)
Thanks!
You're supposed to type
pip install scratchattach
in your terminal


Yes. I did! Everywhere possible: Python, IDLE, …..
Does not work.


Step #1: Open finder, and navigate to the applications folder.
Step #2: Locate the utilities folder in the applications folder.
Step #3: Click on the utilities folder.
Step #4: Find the app called “terminal”.
Step #5: If you failed to find the app called “terminal”, search for “terminal” in the search box
Step #6: Double-click on the app called “terminal”.
Step #7: Type `pip install scratchattach` and press enter
Step #8: If the previous command fails, run `pip3 install scratchattach` and press enter.

It should look something like this: (I had already installed it, so it will be a bit different)


Don't mind my slow typing - I am not sitting properly, in a chair

>>> pip install scratchattach
File “<stdin>”, line 1
pip install scratchattach
^^^^^^^
SyntaxError: invalid syntax


(((((((((((((((((((((((
Do you have pip installed?
He might not have pip

GentleX

“In a gentle way, you can shake the world.”

Mahatma Gandhi

fries09
Scratcher
61 posts

scratchattach - A Scratch API wrapper (Python)

Make this for Brain(f-word)

Hello.
<[My brain cells] < [-100]>
triple_pog
Scratcher
9 posts

scratchattach - A Scratch API wrapper (Python)

.

Last edited by triple_pog (Aug. 5, 2022 05:58:20)

ZZC12345
Scratcher
500+ posts

scratchattach - A Scratch API wrapper (Python)

fries09 wrote:

Make this for Brain(f-word)
Does Brain[word] even have network support?

Last edited by ZZC12345 (Aug. 5, 2022 06:17:34)


This is my signature. Go check out my GitHub if you want to!
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Make sure to check out these cool projects, written in real code! (outdated, sorry)
Aviate - Itinerary - Scratch Auth - Orange OS Linux Distro - ocular - Leopard - PyHelp - My GitHub

Powered by DjangoBB