Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » scratchattach - A Scratch API wrapper (Python)
- TimMcCool
- Scratcher
100+ posts
scratchattach - A Scratch API wrapper (Python)
in the future, asyncio will be introduced to this library's cloud requests framework to improve resource efficiency
Developer of scratchattach, the most popular Python Scratch API wrapper
- TimMcCool
- Scratcher
100+ posts
scratchattach - A Scratch API wrapper (Python)
you probably need to 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:@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
update scratchattach to the latest version
Developer of scratchattach, the most popular Python Scratch API wrapper
- wvzack
- Scratcher
500+ posts
scratchattach - A Scratch API wrapper (Python)
I did that and when I runyou probably need to
update scratchattach to the latest version
pip3.11 show scratchattach
Last edited by wvzack (May 26, 2024 19:54:32)
- cs845962
- Scratcher
10 posts
scratchattach - A Scratch API wrapper (Python)
Hello there! I just started with Scratchattach and have a basic level of python experience, but when I run the import scratchattach and session code in my program, the python shell returns that in cloud.py module, line 2, it can't locate the module named websocket. Does anyone know where I can download these modules? Are they supposed to be build into python and did my python version get corrupted? Or is there a general python library that I am supposed to get? Any help is much appreciated! Thank you!
- wvzack
- Scratcher
500+ posts
scratchattach - A Scratch API wrapper (Python)
What is the exact error? Hello there! I just started with Scratchattach and have a basic level of python experience, but when I run the import scratchattach and session code in my program, the python shell returns that in cloud.py module, line 2, it can't locate the module named websocket. Does anyone know where I can download these modules? Are they supposed to be build into python and did my python version get corrupted? Or is there a general python library that I am supposed to get? Any help is much appreciated! Thank you!
- FishHoue
- Scratcher
16 posts
scratchattach - A Scratch API wrapper (Python)
Do you have sys? Hello there! I just started with Scratchattach and have a basic level of python experience, but when I run the import scratchattach and session code in my program, the python shell returns that in cloud.py module, line 2, it can't locate the module named websocket. Does anyone know where I can download these modules? Are they supposed to be build into python and did my python version get corrupted? Or is there a general python library that I am supposed to get? Any help is much appreciated! Thank you!
If you don't, use ‘import sys’, then 'print(“.sys.version”).
- cs845962
- Scratcher
10 posts
scratchattach - A Scratch API wrapper (Python)
Traceback (most recent call last):What is the exact error? Hello there! I just started with Scratchattach and have a basic level of python experience, but when I run the import scratchattach and session code in my program, the python shell returns that in cloud.py module, line 2, it can't locate the module named websocket. Does anyone know where I can download these modules? Are they supposed to be build into python and did my python version get corrupted? Or is there a general python library that I am supposed to get? Any help is much appreciated! Thank you!
File “/Users/~/Documents/Python Programs/Scratchattach/Testing.py”, line 1, in <module>
import scratchattach as scratch3
File “/Users/~/Documents/Python Programs/Scratchattach/scratchattach/__init__.py”, line 1, in <module>
from .cloud import *
File “/Users/~/Documents/Python Programs/Scratchattach/scratchattach/cloud.py”, line 2, in <module>
import websocket
ModuleNotFoundError: No module named ‘websocket’
- wvzack
- Scratcher
500+ posts
scratchattach - A Scratch API wrapper (Python)
Ok so i am not sure if this will fix your problem but there are a couple things in python that you shouldn't name your project. Scratchattach is one of them as instead of finding the scratchattach module it just gets its self because its named scratchattach. And try what the other person said.Traceback (most recent call last):What is the exact error? Hello there! I just started with Scratchattach and have a basic level of python experience, but when I run the import scratchattach and session code in my program, the python shell returns that in cloud.py module, line 2, it can't locate the module named websocket. Does anyone know where I can download these modules? Are they supposed to be build into python and did my python version get corrupted? Or is there a general python library that I am supposed to get? Any help is much appreciated! Thank you!
File “/Users/~/Documents/Python Programs/Scratchattach/Testing.py”, line 1, in <module>
import scratchattach as scratch3
File “/Users/~/Documents/Python Programs/Scratchattach/scratchattach/__init__.py”, line 1, in <module>
from .cloud import *
File “/Users/~/Documents/Python Programs/Scratchattach/scratchattach/cloud.py”, line 2, in <module>
import websocket
ModuleNotFoundError: No module named ‘websocket’
Last edited by wvzack (May 26, 2024 20:36:21)
- cs845962
- Scratcher
10 posts
scratchattach - A Scratch API wrapper (Python)
Yes I have it. 3.12.3 (v3.12.3:f6650f9ad7, Apr 9 2024, 08:18:47)Do you have sys? Hello there! I just started with Scratchattach and have a basic level of python experience, but when I run the import scratchattach and session code in my program, the python shell returns that in cloud.py module, line 2, it can't locate the module named websocket. Does anyone know where I can download these modules? Are they supposed to be build into python and did my python version get corrupted? Or is there a general python library that I am supposed to get? Any help is much appreciated! Thank you!
If you don't, use ‘import sys’, then 'print(“.sys.version”).
- cs845962
- Scratcher
10 posts
scratchattach - A Scratch API wrapper (Python)
Hmm… I think I understand what you are saying. I changed the folder name, but it didn't fix my module problem. Thanks anyway!Ok so i am not sure if this will fix your problem but there are a couple things in python that you shouldn't name your project. Scratchattach is one of them as instead of finding the scratchattach module it just gets its self because its named scratchattach. And try what the other person said.Traceback (most recent call last):What is the exact error? Hello there! I just started with Scratchattach and have a basic level of python experience, but when I run the import scratchattach and session code in my program, the python shell returns that in cloud.py module, line 2, it can't locate the module named websocket. Does anyone know where I can download these modules? Are they supposed to be build into python and did my python version get corrupted? Or is there a general python library that I am supposed to get? Any help is much appreciated! Thank you!
File “/Users/~/Documents/Python Programs/Scratchattach/Testing.py”, line 1, in <module>
import scratchattach as scratch3
File “/Users/~/Documents/Python Programs/Scratchattach/scratchattach/__init__.py”, line 1, in <module>
from .cloud import *
File “/Users/~/Documents/Python Programs/Scratchattach/scratchattach/cloud.py”, line 2, in <module>
import websocket
ModuleNotFoundError: No module named ‘websocket’
Traceback (most recent call last):
File “/Users/~/Documents/Python Programs/Scratch_Test_Project/Testing.py”, line 1, in <module>
import scratchattach as scratch3
File “/Users/~/Documents/Python Programs/Scratch_Test_Project/scratchattach/__init__.py”, line 1, in <module>
from .cloud import *
File “/Users/~/Documents/Python Programs/Scratch_Test_Project/scratchattach/cloud.py”, line 2, in <module>
import websocket
ModuleNotFoundError: No module named ‘websocket’
- wvzack
- Scratcher
500+ posts
scratchattach - A Scratch API wrapper (Python)
Okay try asking on stackoverflow if you want. Sometimes naming stuff certain names will make the modules not work.Hmm… I think I understand what you are saying. I changed the folder name, but it didn't fix my module problem. Thanks anyway!Ok so i am not sure if this will fix your problem but there are a couple things in python that you shouldn't name your project. Scratchattach is one of them as instead of finding the scratchattach module it just gets its self because its named scratchattach. And try what the other person said.Traceback (most recent call last):What is the exact error? Hello there! I just started with Scratchattach and have a basic level of python experience, but when I run the import scratchattach and session code in my program, the python shell returns that in cloud.py module, line 2, it can't locate the module named websocket. Does anyone know where I can download these modules? Are they supposed to be build into python and did my python version get corrupted? Or is there a general python library that I am supposed to get? Any help is much appreciated! Thank you!
File “/Users/~/Documents/Python Programs/Scratchattach/Testing.py”, line 1, in <module>
import scratchattach as scratch3
File “/Users/~/Documents/Python Programs/Scratchattach/scratchattach/__init__.py”, line 1, in <module>
from .cloud import *
File “/Users/~/Documents/Python Programs/Scratchattach/scratchattach/cloud.py”, line 2, in <module>
import websocket
ModuleNotFoundError: No module named ‘websocket’
Traceback (most recent call last):
File “/Users/~/Documents/Python Programs/Scratch_Test_Project/Testing.py”, line 1, in <module>
import scratchattach as scratch3
File “/Users/~/Documents/Python Programs/Scratch_Test_Project/scratchattach/__init__.py”, line 1, in <module>
from .cloud import *
File “/Users/~/Documents/Python Programs/Scratch_Test_Project/scratchattach/cloud.py”, line 2, in <module>
import websocket
ModuleNotFoundError: No module named ‘websocket’
- nexoalex
- Scratcher
79 posts
scratchattach - A Scratch API wrapper (Python)
pip install websocket run itHmm… I think I understand what you are saying. I changed the folder name, but it didn't fix my module problem. Thanks anyway!Ok so i am not sure if this will fix your problem but there are a couple things in python that you shouldn't name your project. Scratchattach is one of them as instead of finding the scratchattach module it just gets its self because its named scratchattach. And try what the other person said.Traceback (most recent call last):What is the exact error? Hello there! I just started with Scratchattach and have a basic level of python experience, but when I run the import scratchattach and session code in my program, the python shell returns that in cloud.py module, line 2, it can't locate the module named websocket. Does anyone know where I can download these modules? Are they supposed to be build into python and did my python version get corrupted? Or is there a general python library that I am supposed to get? Any help is much appreciated! Thank you!
File “/Users/~/Documents/Python Programs/Scratchattach/Testing.py”, line 1, in <module>
import scratchattach as scratch3
File “/Users/~/Documents/Python Programs/Scratchattach/scratchattach/__init__.py”, line 1, in <module>
from .cloud import *
File “/Users/~/Documents/Python Programs/Scratchattach/scratchattach/cloud.py”, line 2, in <module>
import websocket
ModuleNotFoundError: No module named ‘websocket’
Traceback (most recent call last):
File “/Users/~/Documents/Python Programs/Scratch_Test_Project/Testing.py”, line 1, in <module>
import scratchattach as scratch3
File “/Users/~/Documents/Python Programs/Scratch_Test_Project/scratchattach/__init__.py”, line 1, in <module>
from .cloud import *
File “/Users/~/Documents/Python Programs/Scratch_Test_Project/scratchattach/cloud.py”, line 2, in <module>
import websocket
ModuleNotFoundError: No module named ‘websocket’
Last edited by nexoalex (May 26, 2024 23:19:31)
Hello i am teh epik duck coder
YT: https://www.youtube.com/channel/UCCZqvGQ8D5mZ5l4ls6jEFMg
WEBSITE: https://nexoalex.w3spaces.com
- cs845962
- Scratcher
10 posts
scratchattach - A Scratch API wrapper (Python)
It is not letting me run the command. It says that there is a syntax error, and it highlights the “i” Come to think of it, it didn't let me run pip install -U scratchattach either, and for the same reasons!pip install websocket run itHmm… I think I understand what you are saying. I changed the folder name, but it didn't fix my module problem. Thanks anyway!Ok so i am not sure if this will fix your problem but there are a couple things in python that you shouldn't name your project. Scratchattach is one of them as instead of finding the scratchattach module it just gets its self because its named scratchattach. And try what the other person said.Traceback (most recent call last):What is the exact error? Hello there! I just started with Scratchattach and have a basic level of python experience, but when I run the import scratchattach and session code in my program, the python shell returns that in cloud.py module, line 2, it can't locate the module named websocket. Does anyone know where I can download these modules? Are they supposed to be build into python and did my python version get corrupted? Or is there a general python library that I am supposed to get? Any help is much appreciated! Thank you!
File “/Users/~/Documents/Python Programs/Scratchattach/Testing.py”, line 1, in <module>
import scratchattach as scratch3
File “/Users/~/Documents/Python Programs/Scratchattach/scratchattach/__init__.py”, line 1, in <module>
from .cloud import *
File “/Users/~/Documents/Python Programs/Scratchattach/scratchattach/cloud.py”, line 2, in <module>
import websocket
ModuleNotFoundError: No module named ‘websocket’
Traceback (most recent call last):
File “/Users/~/Documents/Python Programs/Scratch_Test_Project/Testing.py”, line 1, in <module>
import scratchattach as scratch3
File “/Users/~/Documents/Python Programs/Scratch_Test_Project/scratchattach/__init__.py”, line 1, in <module>
from .cloud import *
File “/Users/~/Documents/Python Programs/Scratch_Test_Project/scratchattach/cloud.py”, line 2, in <module>
import websocket
ModuleNotFoundError: No module named ‘websocket’
- wvzacktest
- Scratcher
9 posts
scratchattach - A Scratch API wrapper (Python)
ok so are you on windows?It is not letting me run the command. It says that there is a syntax error, and it highlights the “i” Come to think of it, it didn't let me run pip install -U scratchattach either, and for the same reasons!pip install websocket run itHmm… I think I understand what you are saying. I changed the folder name, but it didn't fix my module problem. Thanks anyway!Ok so i am not sure if this will fix your problem but there are a couple things in python that you shouldn't name your project. Scratchattach is one of them as instead of finding the scratchattach module it just gets its self because its named scratchattach. And try what the other person said.Traceback (most recent call last):What is the exact error? Hello there! I just started with Scratchattach and have a basic level of python experience, but when I run the import scratchattach and session code in my program, the python shell returns that in cloud.py module, line 2, it can't locate the module named websocket. Does anyone know where I can download these modules? Are they supposed to be build into python and did my python version get corrupted? Or is there a general python library that I am supposed to get? Any help is much appreciated! Thank you!
File “/Users/~/Documents/Python Programs/Scratchattach/Testing.py”, line 1, in <module>
import scratchattach as scratch3
File “/Users/~/Documents/Python Programs/Scratchattach/scratchattach/__init__.py”, line 1, in <module>
from .cloud import *
File “/Users/~/Documents/Python Programs/Scratchattach/scratchattach/cloud.py”, line 2, in <module>
import websocket
ModuleNotFoundError: No module named ‘websocket’
Traceback (most recent call last):
File “/Users/~/Documents/Python Programs/Scratch_Test_Project/Testing.py”, line 1, in <module>
import scratchattach as scratch3
File “/Users/~/Documents/Python Programs/Scratch_Test_Project/scratchattach/__init__.py”, line 1, in <module>
from .cloud import *
File “/Users/~/Documents/Python Programs/Scratch_Test_Project/scratchattach/cloud.py”, line 2, in <module>
import websocket
ModuleNotFoundError: No module named ‘websocket’
- cs845962
- Scratcher
10 posts
scratchattach - A Scratch API wrapper (Python)
No. I'm on mac, but I finally figured it out. I didn't have pip installed. I followed the steps here: https://packaging.python.org/en/latest/tutorials/installing-packages/ and it is now working. Thank you so much. I should have guessed that it was pip…ok so are you on windows?It is not letting me run the command. It says that there is a syntax error, and it highlights the “i” Come to think of it, it didn't let me run pip install -U scratchattach either, and for the same reasons!pip install websocket run itHmm… I think I understand what you are saying. I changed the folder name, but it didn't fix my module problem. Thanks anyway!Ok so i am not sure if this will fix your problem but there are a couple things in python that you shouldn't name your project. Scratchattach is one of them as instead of finding the scratchattach module it just gets its self because its named scratchattach. And try what the other person said.Traceback (most recent call last):What is the exact error? Hello there! I just started with Scratchattach and have a basic level of python experience, but when I run the import scratchattach and session code in my program, the python shell returns that in cloud.py module, line 2, it can't locate the module named websocket. Does anyone know where I can download these modules? Are they supposed to be build into python and did my python version get corrupted? Or is there a general python library that I am supposed to get? Any help is much appreciated! Thank you!
File “/Users/~/Documents/Python Programs/Scratchattach/Testing.py”, line 1, in <module>
import scratchattach as scratch3
File “/Users/~/Documents/Python Programs/Scratchattach/scratchattach/__init__.py”, line 1, in <module>
from .cloud import *
File “/Users/~/Documents/Python Programs/Scratchattach/scratchattach/cloud.py”, line 2, in <module>
import websocket
ModuleNotFoundError: No module named ‘websocket’
Traceback (most recent call last):
File “/Users/~/Documents/Python Programs/Scratch_Test_Project/Testing.py”, line 1, in <module>
import scratchattach as scratch3
File “/Users/~/Documents/Python Programs/Scratch_Test_Project/scratchattach/__init__.py”, line 1, in <module>
from .cloud import *
File “/Users/~/Documents/Python Programs/Scratch_Test_Project/scratchattach/cloud.py”, line 2, in <module>
import websocket
ModuleNotFoundError: No module named ‘websocket’
- wvzacktest
- Scratcher
9 posts
scratchattach - A Scratch API wrapper (Python)
Okay and if you have problems installing scratchattach go to your files (this is how you do it on windows but im sure its not that different on mac) look up pip.exe if pip.exe does not exist there might be something like pip11.3.exe after that instead of doing pip install -U scratchattach try pip(in my case “pip11.3” basically the numbers you see after pip) install -U scratchattachNo. I'm on mac, but I finally figured it out. I didn't have pip installed. I followed the steps here: https://packaging.python.org/en/latest/tutorials/installing-packages/ and it is now working. Thank you so much. I should have guessed that it was pip…ok so are you on windows?It is not letting me run the command. It says that there is a syntax error, and it highlights the “i” Come to think of it, it didn't let me run pip install -U scratchattach either, and for the same reasons!pip install websocket run itHmm… I think I understand what you are saying. I changed the folder name, but it didn't fix my module problem. Thanks anyway!Ok so i am not sure if this will fix your problem but there are a couple things in python that you shouldn't name your project. Scratchattach is one of them as instead of finding the scratchattach module it just gets its self because its named scratchattach. And try what the other person said.Traceback (most recent call last):What is the exact error? Hello there! I just started with Scratchattach and have a basic level of python experience, but when I run the import scratchattach and session code in my program, the python shell returns that in cloud.py module, line 2, it can't locate the module named websocket. Does anyone know where I can download these modules? Are they supposed to be build into python and did my python version get corrupted? Or is there a general python library that I am supposed to get? Any help is much appreciated! Thank you!
File “/Users/~/Documents/Python Programs/Scratchattach/Testing.py”, line 1, in <module>
import scratchattach as scratch3
File “/Users/~/Documents/Python Programs/Scratchattach/scratchattach/__init__.py”, line 1, in <module>
from .cloud import *
File “/Users/~/Documents/Python Programs/Scratchattach/scratchattach/cloud.py”, line 2, in <module>
import websocket
ModuleNotFoundError: No module named ‘websocket’
Traceback (most recent call last):
File “/Users/~/Documents/Python Programs/Scratch_Test_Project/Testing.py”, line 1, in <module>
import scratchattach as scratch3
File “/Users/~/Documents/Python Programs/Scratch_Test_Project/scratchattach/__init__.py”, line 1, in <module>
from .cloud import *
File “/Users/~/Documents/Python Programs/Scratch_Test_Project/scratchattach/cloud.py”, line 2, in <module>
import websocket
ModuleNotFoundError: No module named ‘websocket’
- nexoalex
- Scratcher
79 posts
scratchattach - A Scratch API wrapper (Python)
pip install pipIt is not letting me run the command. It says that there is a syntax error, and it highlights the “i” Come to think of it, it didn't let me run pip install -U scratchattach either, and for the same reasons!pip install websocket run itHmm… I think I understand what you are saying. I changed the folder name, but it didn't fix my module problem. Thanks anyway!Ok so i am not sure if this will fix your problem but there are a couple things in python that you shouldn't name your project. Scratchattach is one of them as instead of finding the scratchattach module it just gets its self because its named scratchattach. And try what the other person said.Traceback (most recent call last):What is the exact error? Hello there! I just started with Scratchattach and have a basic level of python experience, but when I run the import scratchattach and session code in my program, the python shell returns that in cloud.py module, line 2, it can't locate the module named websocket. Does anyone know where I can download these modules? Are they supposed to be build into python and did my python version get corrupted? Or is there a general python library that I am supposed to get? Any help is much appreciated! Thank you!
File “/Users/~/Documents/Python Programs/Scratchattach/Testing.py”, line 1, in <module>
import scratchattach as scratch3
File “/Users/~/Documents/Python Programs/Scratchattach/scratchattach/__init__.py”, line 1, in <module>
from .cloud import *
File “/Users/~/Documents/Python Programs/Scratchattach/scratchattach/cloud.py”, line 2, in <module>
import websocket
ModuleNotFoundError: No module named ‘websocket’
Traceback (most recent call last):
File “/Users/~/Documents/Python Programs/Scratch_Test_Project/Testing.py”, line 1, in <module>
import scratchattach as scratch3
File “/Users/~/Documents/Python Programs/Scratch_Test_Project/scratchattach/__init__.py”, line 1, in <module>
from .cloud import *
File “/Users/~/Documents/Python Programs/Scratch_Test_Project/scratchattach/cloud.py”, line 2, in <module>
import websocket
ModuleNotFoundError: No module named ‘websocket’
Hello i am teh epik duck coder
YT: https://www.youtube.com/channel/UCCZqvGQ8D5mZ5l4ls6jEFMg
WEBSITE: https://nexoalex.w3spaces.com
- dynamicsofscratch
- Scratcher
1000+ posts
scratchattach - A Scratch API wrapper (Python)
(#2485)the latest pip scratchattach version is 1.7.3. try downloading from guthibI did that and when I runyou probably need to
update scratchattach to the latest versionit says im on version 1.7.3pip3.11 show scratchattach
aII toasters toast toast, but what happens when there are no longer toasters being produced? will their technology simply become obsolete, with humans moving onto bigger, better things? will toast become a distant memory, written in textbooks of the future as foods us simpler generations ate? who's to say! society is constantly moving, changing, evolving, ideas being built upon, improved upon, theories being proven or disproven. are we but a blip on the timeline? sure, our names may not be remembered, but that's not the point. you can make a change. you can make a difference. you can make the world better, even if you don't know yet. and the first step is to go for it. even if you are afraid of failure. going back to the example of toasters, do you know off the top of your head who invented them? no? have you used one? probably. so, even if you don't remember my name, if I was able to help awnser your question, that is enough. if I was able to help you, even in the slightest way, this could push you to continue with scratch and not give up after the program crashes, and maybe one day learn other programming languages and change the world. everything is a cause and effect reaction, new inventions lead to the technology of the future, and even as the generations of the past are slowly forgotten, their influence lives on to this day, affecting how the world eventually turned out and how it will be for generations to come.
and, without toasters, we wouldn't have toast.
and, without toasters, we wouldn't have toast.
Regards
dynamicsofscratch
Anything above that grey line is a signature!
Also, anything can be put in your signature, (also referred as a siggy) including ads but! You cannot do anything else that violates the community guidelines as, you will be reported and you could be banned/muted.
Computer enthusiast, coder, designer and a offline veteran.
700th post
- nexoalex
- Scratcher
79 posts
scratchattach - A Scratch API wrapper (Python)
good job for troubleshouting like a master (also first on this page)No. I'm on mac, but I finally figured it out. I didn't have pip installed. I followed the steps here: https://packaging.python.org/en/latest/tutorials/installing-packages/ and it is now working. Thank you so much. I should have guessed that it was pip…ok so are you on windows?It is not letting me run the command. It says that there is a syntax error, and it highlights the “i” Come to think of it, it didn't let me run pip install -U scratchattach either, and for the same reasons!pip install websocket run itHmm… I think I understand what you are saying. I changed the folder name, but it didn't fix my module problem. Thanks anyway!Ok so i am not sure if this will fix your problem but there are a couple things in python that you shouldn't name your project. Scratchattach is one of them as instead of finding the scratchattach module it just gets its self because its named scratchattach. And try what the other person said.Traceback (most recent call last):What is the exact error? Hello there! I just started with Scratchattach and have a basic level of python experience, but when I run the import scratchattach and session code in my program, the python shell returns that in cloud.py module, line 2, it can't locate the module named websocket. Does anyone know where I can download these modules? Are they supposed to be build into python and did my python version get corrupted? Or is there a general python library that I am supposed to get? Any help is much appreciated! Thank you!
File “/Users/~/Documents/Python Programs/Scratchattach/Testing.py”, line 1, in <module>
import scratchattach as scratch3
File “/Users/~/Documents/Python Programs/Scratchattach/scratchattach/__init__.py”, line 1, in <module>
from .cloud import *
File “/Users/~/Documents/Python Programs/Scratchattach/scratchattach/cloud.py”, line 2, in <module>
import websocket
ModuleNotFoundError: No module named ‘websocket’
Traceback (most recent call last):
File “/Users/~/Documents/Python Programs/Scratch_Test_Project/Testing.py”, line 1, in <module>
import scratchattach as scratch3
File “/Users/~/Documents/Python Programs/Scratch_Test_Project/scratchattach/__init__.py”, line 1, in <module>
from .cloud import *
File “/Users/~/Documents/Python Programs/Scratch_Test_Project/scratchattach/cloud.py”, line 2, in <module>
import websocket
ModuleNotFoundError: No module named ‘websocket’
Last edited by nexoalex (May 27, 2024 16:06:47)
Hello i am teh epik duck coder
YT: https://www.youtube.com/channel/UCCZqvGQ8D5mZ5l4ls6jEFMg
WEBSITE: https://nexoalex.w3spaces.com
- cs845962
- Scratcher
10 posts
scratchattach - A Scratch API wrapper (Python)
Hehe… I think this is a TimMcCool level question. My code seemed to work, and I successfully invited one curator to a studio, but as soon as I tried to invite two, I got this monster of an error. I can't make any sense of it. Any help is appreciated.
Traceback (most recent call last):Again, I got one invite to work (confirmed), but as soon as I tried to send two (two users, one studio) the script failed. Thanks!
File “/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/requests/models.py”, line 963, in json
return complexjson.loads(self.content.decode(encoding), **kwargs)
File “/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/json/__init__.py”, line 346, in loads
return _default_decoder.decode(s)
File “/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/json/decoder.py”, line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/json/decoder.py”, line 355, in raw_decode
raise JSONDecodeError(“Expecting value”, s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 2 column 1 (char 1)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/Users/~/Documents/Python Programs/Scratch_Test_Project/scratchattach/studio.py”, line 285, in invite_curator
).json()
File “/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/requests/models.py”, line 971, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 2 column 1 (char 1)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/Users/~/Documents/Python Programs/Scratch_Test_Project/Testing.py”, line 17, in <module>
studio.invite_curator(username)
File “/Users/~/Documents/Python Programs/Scratch_Test_Project/scratchattach/studio.py”, line 287, in invite_curator
raise(_exceptions.Unauthorized)
NameError: name ‘_exceptions’ is not defined. Did you mean: ‘exceptions’?