Discuss Scratch

DifferentDance8
Scratcher
1000+ posts

scratchattach - A Scratch API wrapper | v1.0 released (Python)

cjp123456789 wrote:

which one to use pls help me
?

~ this signature was deleted by a benevolent tomato ~
NeonG4
Scratcher
100+ posts

scratchattach - A Scratch API wrapper | v1.0 released (Python)

Can I import this into replit or github, or do I have to use the official python compiler?

If you reply to my post, please comment on my profile and link the conversation!
Links:
My profile
My project I've been working on, PLS CHECK IT OUT
Kitten-da-Cat
Scratcher
1000+ posts

scratchattach - A Scratch API wrapper | v1.0 released (Python)

Scratchattack lol

Signed:
J. N.

Here is my cute cat:
MonkeyBean2
Scratcher
100+ posts

scratchattach - A Scratch API wrapper | v1.0 released (Python)

NeonG4 wrote:

Can I import this into replit or github, or do I have to use the official python compiler?
Python is not a complied language (there is a compilation-like step, before interpretation, but that doesn't really count). Replit uses the official python interpreter. Github does not have a VM, or any way of running python (to my knowlege).


9NAwRfSR-%dWFS$a$g&zBMTj2?;jvS?L5%^X%qpCX|A<*paJ=lU07c)wmt$v{TxL5



NeonG4
Scratcher
100+ posts

scratchattach - A Scratch API wrapper | v1.0 released (Python)

I just got scratchattach on replit, but it gave me an error. I don't quite understand it though, but its not in my code.
Traceback (most recent call last):
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/numpy/core/__init__.py”, line 23, in <module>
from . import multiarray
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/numpy/core/multiarray.py”, line 10, in <module>
from . import overrides
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/numpy/core/overrides.py”, line 6, in <module>
from numpy.core._multiarray_umath import (
ModuleNotFoundError: No module named ‘numpy.core._multiarray_umath’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “main.py”, line 1, in <module>
import scratchattach as scratch3
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/scratchattach/__init__.py”, line 1, in <module>
from ._cloud import *
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/scratchattach/_cloud.py”, line 2, in <module>
from numpy import var
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/numpy/__init__.py”, line 140, in <module>
from . import core
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/numpy/core/__init__.py”, line 49, in <module>
raise ImportError(msg)
ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

Traceback (most recent call last):
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/numpy/core/__init__.py”, line 23, in <module>
from . import multiarray
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/numpy/core/multiarray.py”, line 10, in <module>
from . import overrides
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/numpy/core/overrides.py”, line 6, in <module>
from numpy.core._multiarray_umath import (
ModuleNotFoundError: No module named ‘numpy.core._multiarray_umath’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “main.py”, line 1, in <module>
import scratchattach as scat
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/scratchattach/__init__.py”, line 1, in <module>
from ._cloud import *
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/scratchattach/_cloud.py”, line 2, in <module>
from numpy import var
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/numpy/__init__.py”, line 140, in <module>
from . import core
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/numpy/core/__init__.py”, line 49, in <module>
raise ImportError(msg)
ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

Traceback (most recent call last):
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/numpy/core/__init__.py”, line 23, in <module>
from . import multiarray
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/numpy/core/multiarray.py”, line 10, in <module>
from . import overrides
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/numpy/core/overrides.py”, line 6, in <module>
from numpy.core._multiarray_umath import (
ModuleNotFoundError: No module named ‘numpy.core._multiarray_umath’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “main.py”, line 1, in <module>
import scratchattach
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/scratchattach/__init__.py”, line 1, in <module>
from ._cloud import *
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/scratchattach/_cloud.py”, line 2, in <module>
from numpy import var
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/numpy/__init__.py”, line 140, in <module>
from . import core
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/numpy/core/__init__.py”, line 49, in <module>
raise ImportError(msg)
ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

Traceback (most recent call last):
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/numpy/core/__init__.py”, line 23, in <module>
from . import multiarray
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/numpy/core/multiarray.py”, line 10, in <module>
from . import overrides
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/numpy/core/overrides.py”, line 6, in <module>
from numpy.core._multiarray_umath import (
ModuleNotFoundError: No module named ‘numpy.core._multiarray_umath’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “main.py”, line 1, in <module>
import scratchattach as scratch3
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/scratchattach/__init__.py”, line 1, in <module>
from ._cloud import *
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/scratchattach/_cloud.py”, line 2, in <module>
from numpy import var
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/numpy/__init__.py”, line 140, in <module>
from . import core
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/numpy/core/__init__.py”, line 49, in <module>
raise ImportError(msg)
ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

* The Python version is: Python3.8 from “/home/runner/Scratch-attach/venv/bin/python”
* The NumPy version is: “1.23.1”

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: No module named ‘numpy.core._multiarray_umath’
can someone help pls?

Last edited by NeonG4 (Aug. 12, 2022 19:21:57)


If you reply to my post, please comment on my profile and link the conversation!
Links:
My profile
My project I've been working on, PLS CHECK IT OUT
MonkeyBean2
Scratcher
100+ posts

scratchattach - A Scratch API wrapper | v1.0 released (Python)

NeonG4 wrote:

I just got scratchattach on replit, but it gave me an error. I don't quite understand it though, but its not in my code.
Traceback (most recent call last):
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/numpy/core/__init__.py”, line 23, in <module>
from . import multiarray
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/numpy/core/multiarray.py”, line 10, in <module>
from . import overrides
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/numpy/core/overrides.py”, line 6, in <module>
from numpy.core._multiarray_umath import (
ModuleNotFoundError: No module named ‘numpy.core._multiarray_umath’

During handling of the above exception, another exception occurred:

… CLIPPED …

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “main.py”, line 1, in <module>
import scratchattach as scratch3
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/scratchattach/__init__.py”, line 1, in <module>
from ._cloud import *
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/scratchattach/_cloud.py”, line 2, in <module>
from numpy import var
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/numpy/__init__.py”, line 140, in <module>
from . import core
File “/home/runner/Scratch-attach/venv/lib/python3.10/site-packages/numpy/core/__init__.py”, line 49, in <module>
raise ImportError(msg)
ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

* The Python version is: Python3.8 from “/home/runner/Scratch-attach/venv/bin/python”
* The NumPy version is: “1.23.1”

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: No module named ‘numpy.core._multiarray_umath’
can someone help pls?
It gave you a link: https://numpy.org/devdocs/user/troubleshooting-importerror.html Try looking at that first.

Last edited by MonkeyBean2 (Aug. 13, 2022 09:36:42)



9NAwRfSR-%dWFS$a$g&zBMTj2?;jvS?L5%^X%qpCX|A<*paJ=lU07c)wmt$v{TxL5



NeonG4
Scratcher
100+ posts

scratchattach - A Scratch API wrapper | v1.0 released (Python)

MonkeyBean2 wrote:

clipped
I tried the
pip install numpy -upgrade
and it didn't resolve the error. help?

If you reply to my post, please comment on my profile and link the conversation!
Links:
My profile
My project I've been working on, PLS CHECK IT OUT
ZZC12345
Scratcher
500+ posts

scratchattach - A Scratch API wrapper | v1.0 released (Python)

NeonG4 wrote:

MonkeyBean2 wrote:

clipped
I tried the
pip install numpy -upgrade
and it didn't resolve the error. help?
Did you still uninstalling and reinstalling numpy (or even Python)?

This is my signature. Contrary to popular belief, you do not need scratchblocks to protect against evil kumquats.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Hours and hours of time have gone into creating cool projects like the ones below on the ATs! Support them!
Aviate - Itinerary - Scratch Auth - Orange OS Linux Distro - ocular - Leopard - PyHelp
DifferentDance8
Scratcher
1000+ posts

scratchattach - A Scratch API wrapper | v1.0 released (Python)

ZZC12345 wrote:

Did you still uninstalling and reinstalling numpy
That would be the most likely thing to fix your problem.

ZZC12345 wrote:

(or even Python)?
That would break stuff beyond repair, because that would also mean uninstalling EVERY module on your computer, and you then would have to reinstall every module as well.

~ this signature was deleted by a benevolent tomato ~
NeonG4
Scratcher
100+ posts

scratchattach - A Scratch API wrapper | v1.0 released (Python)

ZZC12345 wrote:

Did you still uninstalling and reinstalling numpy
I tried that, stuff happened, it uninstalled, I reinstalled numpy, and error was still there. my numpy version is 1.23.1, is that up to date?

If you reply to my post, please comment on my profile and link the conversation!
Links:
My profile
My project I've been working on, PLS CHECK IT OUT
Blackout32
Scratcher
500+ posts

scratchattach - A Scratch API wrapper | v1.0 released (Python)

-FreeEngines- wrote:

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
Isn't changing a cloud variable an http request or am I wrong?
QuestExplorer123
Scratcher
1 post

scratchattach - A Scratch API wrapper | v1.0 released (Python)

Very helpful! thank you timmccool
ZZC12345
Scratcher
500+ posts

scratchattach - A Scratch API wrapper | v1.0 released (Python)

Blackout32 wrote:

-FreeEngines- wrote:

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
Isn't changing a cloud variable an http request or am I wrong?
It's sort of an HTTP request. Cloud vars use the WebSocket protocol (it used to use HTTP, but to improve latency the ST switched it). I wrote a post a while ago about this: https://scratch.mit.edu/discuss/post/6510239/

ZZC12345 wrote:

I don't think so. Scratch cloud variables use WebSockets to set information. Using WebSockets, the server sends data whenever it wants (in this case, when there's an update in the cloud var) and so does the client (though Scratch probably rate limits you in the client-side code), so there should be no “updates” when a variable gets read, it's just reading internal state.
(probably, I haven't looked at the relevant code).
And about encryption, Scratch and (I hope) scratchattach use the version of the protocol that uses encryption (WSS), just like how there's HTTP and HTTPS.

NeonG4 wrote:

ZZC12345 wrote:

Did you still uninstalling and reinstalling numpy
I tried that, stuff happened, it uninstalled, I reinstalled numpy, and error was still there. my numpy version is 1.23.1, is that up to date?
What CPU do you have? Perhaps it doesn't support part of the C part of NumPy.

This is my signature. Contrary to popular belief, you do not need scratchblocks to protect against evil kumquats.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Hours and hours of time have gone into creating cool projects like the ones below on the ATs! Support them!
Aviate - Itinerary - Scratch Auth - Orange OS Linux Distro - ocular - Leopard - PyHelp
MonkeyBean2
Scratcher
100+ posts

scratchattach - A Scratch API wrapper | v1.0 released (Python)

NeonG4 wrote:

ZZC12345 wrote:

Did you still uninstalling and reinstalling numpy
I tried that, stuff happened, it uninstalled, I reinstalled numpy, and error was still there. my numpy version is 1.23.1, is that up to date?
Try installing an earlier version.


9NAwRfSR-%dWFS$a$g&zBMTj2?;jvS?L5%^X%qpCX|A<*paJ=lU07c)wmt$v{TxL5



Mast_Scratch
Scratcher
100+ posts

scratchattach - A Scratch API wrapper | v1.0 released (Python)

Update on what's happening, I was not on scratch for 2-3 days straight

I am Mast_Scratch. Join Rear OS!!!
MonkeyBean2
Scratcher
100+ posts

scratchattach - A Scratch API wrapper | v1.0 released (Python)

ZZC12345 wrote:

TheReal_BestGamer wrote:

-clipped-
Isn't changing a cloud variable an http request or am I wrong?
It's sort of an HTTP request. Cloud vars use the WebSocket protocol (it used to use HTTP, but to improve latency the ST switched it). I wrote a post a while ago about this: https://scratch.mit.edu/discuss/post/6510239/

A WebSocket connection is initiated with an HTTP(S) request, and the server responds with HTTP response code 101 (switching protocols), that tells the browser to switch to use the Websocket protocol.

And about encryption, Scratch and (I hope) scratchattach use the version of the protocol that uses encryption (WSS), just like how there's HTTP and HTTPS.

I bet it would upgrade the connection to WSS if you tried to connect with WS… And, modern browsers won't let you use WS on HTTPS pages, for security reasons.

What CPU do you have? Perhaps it doesn't support part of the C part of NumPy.

C is compiled…So it would probably be the compiler which is having trouble. I doubt it would be the CPU.


9NAwRfSR-%dWFS$a$g&zBMTj2?;jvS?L5%^X%qpCX|A<*paJ=lU07c)wmt$v{TxL5



Kessel_Run
Scratcher
11 posts

scratchattach - A Scratch API wrapper | v1.0 released (Python)


I installed it using

pip install scratchattach

and it worked. I have a folder called “scratchattach” and a folder called “scratchattach-0.9.9.dist-info” in my Python39/Lib/site-packages. But I can't import it into my program. I typed

import scratchattach as scratch3

and it threw this error:

ModuleNotFoundError: No module named ‘scratchattach’

VOTE ELVIS THE PIG
ELVIS WANTS YOUR VOTE!!!1!!!
VOTE TODAY FOR ELVISSSSSSSSSS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'







or else




{/b]
MonkeyBean2
Scratcher
100+ posts

scratchattach - A Scratch API wrapper | v1.0 released (Python)

Kessel_Run wrote:

I installed it using

pip install scratchattach

and it worked. I have a folder called “scratchattach” and a folder called “scratchattach-0.9.9.dist-info” in my Python39/Lib/site-packages. But I can't import it into my program. I typed

import scratchattach as scratch3

and it threw this error:

ModuleNotFoundError: No module named ‘scratchattach’
Gosh, that's weird!

Make sure running it with python3.
Run python3 –version, and see what it's version is.
Installing it with pip3 should make no difference.

Last edited by MonkeyBean2 (Aug. 14, 2022 17:12:36)



9NAwRfSR-%dWFS$a$g&zBMTj2?;jvS?L5%^X%qpCX|A<*paJ=lU07c)wmt$v{TxL5



NeonG4
Scratcher
100+ posts

scratchattach - A Scratch API wrapper | v1.0 released (Python)

For whoever is wondering, I have chrome. I am not as fluent in chrome os than windows os, so idk how to check full os.

If you reply to my post, please comment on my profile and link the conversation!
Links:
My profile
My project I've been working on, PLS CHECK IT OUT
m4th154w350m3
Scratcher
100+ posts

scratchattach - A Scratch API wrapper | v1.0 released (Python)

NeonG4 wrote:

For whoever is wondering, I have chrome. I am not as fluent in chrome os than windows os, so idk how to check full os.
ok, but what does that have to do with scratchattach

apparently that evil kumquat never ate my signature
when green flag clicked
forever
play sound [Undertale OST 100 - Megalovania v] until done
end
Shift down lol

Za-Chary wrote:

go pico go go pico yeah
anyways… i'm kinda random tbh
yall gotta cope seethe mald and dilate

Powered by DjangoBB

Standard | Mobile