Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » scratchattach - A Scratch API wrapper (Python)
- XMate-Tech
- Scratcher
25 posts
scratchattach - A Scratch API wrapper (Python)
I can't use it, please help!
***************************************************
Welcome to my signature….
“XMate”
_____________
A twelve year old coding professional who got hooked back in 2021, in his first account.
He now owns a Youtube Channel where he's posting Scratch tutorials and hacks.
_____________
I am now trying different things outside of Scratch, but don't worry! I do post games.
_____________
-XMate
12 June, 2024
(Signature Last Updated)20.png
- XMate-Tech
- Scratcher
25 posts
scratchattach - A Scratch API wrapper (Python)
please make a YT tutorial on scratchattach…
***************************************************
Welcome to my signature….
“XMate”
_____________
A twelve year old coding professional who got hooked back in 2021, in his first account.
He now owns a Youtube Channel where he's posting Scratch tutorials and hacks.
_____________
I am now trying different things outside of Scratch, but don't worry! I do post games.
_____________
-XMate
12 June, 2024
(Signature Last Updated)20.png
- FishHoue
- Scratcher
16 posts
scratchattach - A Scratch API wrapper (Python)
Hi! Does anyone know how to store data on python locally (like with a file) because this will be useful to make a data-storing project that saves the user's data. Thanks!
I think you can male an SQLite database, as said in another quote above. The reason is that webpages cannot display anything that is not HTML and so will probably not display your database or do anything with it unless you use Flask or another Python Framework.
_________________
Fishhoue's Signature
print(“FishHoue”)
- _NovaNebula_
- Scratcher
1000+ posts
scratchattach - A Scratch API wrapper (Python)
Oh, this is actually pretty cool. Is there a full list of everything it can access?
- wvzack
- Scratcher
500+ posts
scratchattach - A Scratch API wrapper (Python)
Is it possible to send information to the request template without the scratch project requesting it?
- wvzack
- Scratcher
500+ posts
scratchattach - A Scratch API wrapper (Python)
Also I suspect that this is because the servers are not working properly or python its self but when i try and login through scratch attach I get
if i try using scratchattach in a different directory it does not create this error.
Thanks!
partially initialized module 'scratchattach' has no attribute 'login' (most likely due to a circular import)
File "C:\Users\ehidDocuments\python banking\requests.py", line 4, in <module>
session = scratch3.login("wvzack", "#####################")
^^^^^^^^^^^^^^
File "C:\Users\jdwk\Documents\python banking\requests.py", line 1, in <module>
import scratchattach as scratch3
AttributeError: partially initialized module 'scratchattach' has no attribute 'login' (most likely due to a circular import)
if i try using scratchattach in a different directory it does not create this error.
Thanks!
Last edited by wvzack (May 25, 2024 22:22:45)
- TheCommCraft
- Scratcher
500+ posts
scratchattach - A Scratch API wrapper (Python)
(#2467)No, but there is another python library that can do something like that (which I can't mention)
Is it possible to send information to the request template without the scratch project requesting it?
- nexoalex
- Scratcher
79 posts
scratchattach - A Scratch API wrapper (Python)
guys i only have disco** to auth on free hosting websites but https://panel.sillydev.co.uk/'s only free node shut down any alternatives
Hello i am teh epik duck coder
YT: https://www.youtube.com/channel/UCCZqvGQ8D5mZ5l4ls6jEFMg
WEBSITE: https://nexoalex.w3spaces.com
- TheMobileGames
- Scratcher
100+ posts
scratchattach - A Scratch API wrapper (Python)
https://panel.sillydev.co.uk/'s only free node shut down any alternativesguys i only have disco** to auth on free hosting websites but
I’m trying to use danbot.host
—————————— —————————— —————————— —————————— ——————————
A way to make any game easily mobile (no remixing needed): https://scratch.mit.edu/discuss/topic/733837
My mobile engine (use to add buttons/controls to a game): https://scratch.mit.edu/projects/778848092/
—————————— —————————— —————————— —————————— ——————————
- wvzack
- Scratcher
500+ posts
scratchattach - A Scratch API wrapper (Python)
oh and i tried changing the directory but it still has the same error Also I suspect that this is because the servers are not working properly or python its self but when i try and login through scratch attach I getpartially initialized module 'scratchattach' has no attribute 'login' (most likely due to a circular import)
File "C:\Users\ehidDocuments\python banking\requests.py", line 4, in <module>
session = scratch3.login("wvzack", "#####################")
^^^^^^^^^^^^^^
File "C:\Users\jdwk\Documents\python banking\requests.py", line 1, in <module>
import scratchattach as scratch3
AttributeError: partially initialized module 'scratchattach' has no attribute 'login' (most likely due to a circular import)
if i try using scratchattach in a different directory it does not create this error.
Thanks!
- a_person31415
- Scratcher
7 posts
scratchattach - A Scratch API wrapper (Python)
cool!
but I found out that it can be dangerous, like hacking cloud of other games
but I found out that it can be dangerous, like hacking cloud of other games
- Blackout32
- Scratcher
500+ posts
scratchattach - A Scratch API wrapper (Python)
I'd probably also recommend PocketBase. Really great UI for managing databases and ships with sqlite by default (which you can hook up to python/scratchattach)Hi! Does anyone know how to store data on python locally (like with a file) because this will be useful to make a data-storing project that saves the user's data. Thanks!
I think you can male an SQLite database, as said in another quote above. The reason is that webpages cannot display anything that is not HTML and so will probably not display your database or do anything with it unless you use Flask or another Python Framework.
_________________
Fishhoue's Signature
print(“FishHoue”)
- Sid72020123
- Scratcher
500+ posts
scratchattach - A Scratch API wrapper (Python)
Also I suspect that this is because the servers are not working properly or python its self but when i try and login through scratch attach I getpartially initialized module 'scratchattach' has no attribute 'login' (most likely due to a circular import)
File "C:\Users\ehidDocuments\python banking\requests.py", line 4, in <module>
session = scratch3.login("wvzack", "#####################")
^^^^^^^^^^^^^^
File "C:\Users\jdwk\Documents\python banking\requests.py", line 1, in <module>
import scratchattach as scratch3
AttributeError: partially initialized module 'scratchattach' has no attribute 'login' (most likely due to a circular import)
if i try using scratchattach in a different directory it does not create this error.
Thanks!
Just don't name your Python file with something like “scratchattach.py” or “requests.py” or any other library scratchattach uses.
Renaming the file will fix the issue…
Sid72020123
- TimMcCool
- Scratcher
100+ posts
scratchattach - A Scratch API wrapper (Python)
check the documentation on github: Oh, this is actually pretty cool. Is there a full list of everything it can access?https://github.com/TimMcCool/scratchattach/wiki
Last edited by TimMcCool (May 26, 2024 08:48:32)
Developer of scratchattach, the most popular Python Scratch API wrapper
- fiosjeofo
- Scratcher
11 posts
scratchattach - A Scratch API wrapper (Python)
I knew how to do that, but thanks anyway! I found a new module called shelve that does it for you.Hi! Does anyone know how to store data on python locally (like with a file) because this will be useful to make a data-storing project that saves the user's data. Thanks!here I can help you further once you start making it. I done something like that before.
when green flag clicked
forever
keep coding
have fun
scratch on!
end
define scratch(attach v)
(is cool v)
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<(hi)>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
- fiosjeofo
- Scratcher
11 posts
scratchattach - A Scratch API wrapper (Python)
please can someone help me make an sqlite database (or mysql) because it's not really something i've done beforeHi! Does anyone know how to store data on python locally (like with a file) because this will be useful to make a data-storing project that saves the user's data. Thanks!
I think you can male an SQLite database, as said in another quote above. The reason is that webpages cannot display anything that is not HTML and so will probably not display your database or do anything with it unless you use Flask or another Python Framework.
_________________
Fishhoue's Signature
print(“FishHoue”)
when green flag clicked
forever
keep coding
have fun
scratch on!
end
define scratch(attach v)
(is cool v)
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<(hi)>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
- FishHoue
- Scratcher
16 posts
scratchattach - A Scratch API wrapper (Python)
I'm not sure I know how to do that, although I am only 2 grades/years away from learning SQLite databases.please can someone help me make an sqlite database (or mysql) because it's not really something i've done beforeHi! Does anyone know how to store data on python locally (like with a file) because this will be useful to make a data-storing project that saves the user's data. Thanks!
I think you can male an SQLite database, as said in another quote above. The reason is that webpages cannot display anything that is not HTML and so will probably not display your database or do anything with it unless you use Flask or another Python Framework.
_________________
Fishhoue's Signature
print(“FishHoue”)
I'll try to do make a starting database though.
_________________
Fishhoue's Signature
print(“FishHoue”)
- wvzack
- Scratcher
500+ posts
scratchattach - A Scratch API wrapper (Python)
Thanks I suspected it was something like this!Also I suspect that this is because the servers are not working properly or python its self but when i try and login through scratch attach I getpartially initialized module 'scratchattach' has no attribute 'login' (most likely due to a circular import)
File "C:\Users\ehidDocuments\python banking\requests.py", line 4, in <module>
session = scratch3.login("wvzack", "#####################")
^^^^^^^^^^^^^^
File "C:\Users\jdwk\Documents\python banking\requests.py", line 1, in <module>
import scratchattach as scratch3
AttributeError: partially initialized module 'scratchattach' has no attribute 'login' (most likely due to a circular import)
if i try using scratchattach in a different directory it does not create this error.
Thanks!
Just don't name your Python file with something like “scratchattach.py” or “requests.py” or any other library scratchattach uses.
Renaming the file will fix the issue…
- wvzacktest
- Scratcher
9 posts
scratchattach - A Scratch API wrapper (Python)
So I am getting a error when I use user.does_exist() even though it is a command and I have checked everything with pip3.11 show scratchattach and scratchattach is on version 1.7.3. Here is the part of my code where i am using it:
and here is the error I am getting:
Thanks
@client.request
def pay(to, amount): #called when client receives request
user = scratch3.get_user(to)
if not user.does_exist() == True:
return("account", to, "does not exist. You have been refunded.")
return_value = main.pay_user(client.get_requester(), to, amount)
return return_value #sends back balance to the Scratch project
and here is the error I am getting:
Caught error in request 'pay' - Full error below
Traceback (most recent call last):
File "c:\Users\###\AppData\Local\Programs\Python\Python311\Lib\site-packages\scratchattach\_cloud_requests.py", line
61, in call_request
output = req_obj["on_call"](*arguments)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\####\Desktop\python_banking\cloud handeler.py", line 23, in pay
if not user.does_exist() == True:
^^^^^^^^^^^^^^^
AttributeError: 'User' object has no attribute 'does_exist'
Thanks
- wvzack
- Scratcher
500+ posts
scratchattach - A Scratch API wrapper (Python)
I am also getting a weird response back to the scratch project as i am getting what i am supposed to get but also an error here is something i got
The first part is exactly what i am supposed to get but the last part is not!
('1', 'dollars has been given to ', 'yiuyiy')Error: Check the Python console