Discuss Scratch

inoking
Scratcher
1000+ posts

scratchclient - A scratch API wrapper for python

DogCatPuppyLover wrote:

inoking wrote:

DogCatPuppyLover wrote:

I installed Visual C++, and then added cl.exe to my path to fix another error, but I'm getting this error now:
Cannot open include file: 'io.h': No such file or directory
I have Visual Studio Build Tools and Windows SDK, I ran the command in the Visual Studio 2019 Developer Command Prompt among other command prompts, I restarted my computer, and I added io.h to my path and include, but nothing has fixed it. I'm using Windows 10. Does anyone know how to fix this?
This information may help you.
https://social.msdn.microsoft.com/Forums/vstudio/en-US/7004ee52-98de-40a3-9b18-e27ca480e928/what-happened-to-ioh
I did find io.h, but putting it in my INCLUDE didn't seem to fix the problem.
Could you show me the command line which you issued, and the part of the result of set command?

e.g.
> cl /I \my\include foo.c

> set
:
INCLUDE=***
:

これは署名と呼ばれるもので投稿本文とは関係ありません。
Scratch は「世界最大の子ども向けコーディングコミュニティーで、シンプルなビジュアルインターフェースを持ったコーディング言語」
 つまり「子ども SNS」ではない

・「傾向」とは単に一定の基準で作品を並びかえただけのもので、ランキングでもなんでもないナンバーワンよりオンリーワンを目指してみては?
・「フォロー」とは他の Scratcher が何をしているかを簡単に確認するためのもので、「フォロワー」は「ファン」ではない
・「スタジオ」とは特定のテーマに沿って作品をまとめたり共同制作したりするための場所
・「星」や「ハート」などを何かの見返りとすることは Scratch チームによって禁止されている
nini2009ph
Scratcher
87 posts

scratchclient - A scratch API wrapper for python

vikkcd wrote:

This might sound noob as I'm about to try to learn python in about 48 hours but can you change list variables with Scratchclient? Thanks
no sorry but you can send the data to a varible and then add it to the list
nini2009ph
Scratcher
87 posts

scratchclient - A scratch API wrapper for python

Verixion wrote:

nini2009ph wrote:

<scratchclient.User.User object at 0x000001B34B1AD730>
add a .username before the closing bracket in the print statement
do you know how to do the same with projects?
Chiroyce
Scratcher
1000+ posts

scratchclient - A scratch API wrapper for python

nini2009ph wrote:

do you know how to do the same with projects?
.title may work.







April Fools' topics:
New Buildings in Scratch's headquarters
Give every Scratcher an M1 MacBook Air
Scratch should let users edit other Scratchers' projects
Make a statue for Jeffalo
Scratch Tech Tips™
Make a Chiroyce statue emoji


<img src=“x” onerror=“alert('XSS vulnerability discovered')”>

this is a test sentence
vikkcd
Scratcher
500+ posts

scratchclient - A scratch API wrapper for python

nini2009ph wrote:

vikkcd wrote:

This might sound noob as I'm about to try to learn python in about 48 hours but can you change list variables with Scratchclient? Thanks
no sorry but you can send the data to a varible and then add it to the list
So let's say I have Variable A which is a cloud variable in project B. Then I have Variable B which is in Project A (head server). I want to request data so I send a username through Variable A. Then my python code will get the variable and will set the cloud variable B to Cloud variable A in the other project. Then I store the request in a list let's say. Would this work?
Also Variable B is also a cloud variable

Last edited by vikkcd (Oct. 24, 2021 14:01:43)


Coder, Animator, Artist
Love Michael Jackson and OK GO music.

forever
Fold Origami
Listen to Michael Jackson and OK GO
Play guitar
end
nini2009ph
Scratcher
87 posts

scratchclient - A scratch API wrapper for python

Chiroyce wrote:

nini2009ph wrote:

do you know how to do the same with projects?
.title may work.
ok thx
nini2009ph
Scratcher
87 posts

scratchclient - A scratch API wrapper for python

Chiroyce wrote:

nini2009ph wrote:

do you know how to do the same with projects?
.title may work.
it dosen't work (and how can i get the id)
Chiroyce
Scratcher
1000+ posts

scratchclient - A scratch API wrapper for python

nini2009ph wrote:

it dosen't work (and how can i get the id)
according to the source code, it should work.







April Fools' topics:
New Buildings in Scratch's headquarters
Give every Scratcher an M1 MacBook Air
Scratch should let users edit other Scratchers' projects
Make a statue for Jeffalo
Scratch Tech Tips™
Make a Chiroyce statue emoji


<img src=“x” onerror=“alert('XSS vulnerability discovered')”>

this is a test sentence
nini2009ph
Scratcher
87 posts

scratchclient - A scratch API wrapper for python

Chiroyce wrote:

nini2009ph wrote:

it dosen't work (and how can i get the id)
according to the source code, it should work.
data = session.get_user(“nini2009ph”).get_projects
print(data.title) —-> AttributeError: ‘function’ object has no attribute ‘title’
nini2009ph
Scratcher
87 posts

scratchclient - A scratch API wrapper for python

nini2009ph wrote:

Chiroyce wrote:

nini2009ph wrote:

it dosen't work (and how can i get the id)
according to the source code, it should work.
data = session.get_user(“nini2009ph”).get_projects
print(data.title) —-> AttributeError: AttributeError: ‘function’ object has no attribute ‘title’ has no attribute ‘title’
is it a project class? ('function' object)
Chiroyce
Scratcher
1000+ posts

scratchclient - A scratch API wrapper for python

nini2009ph wrote:

data = session.get_user(“nini2009ph”).get_projects
print(data.title) —-> AttributeError: ‘function’ object has no attribute ‘title’
the first line gets all the projects not just one.







April Fools' topics:
New Buildings in Scratch's headquarters
Give every Scratcher an M1 MacBook Air
Scratch should let users edit other Scratchers' projects
Make a statue for Jeffalo
Scratch Tech Tips™
Make a Chiroyce statue emoji


<img src=“x” onerror=“alert('XSS vulnerability discovered')”>

this is a test sentence
DogCatPuppyLover
Scratcher
100+ posts

scratchclient - A scratch API wrapper for python

inoking wrote:

DogCatPuppyLover wrote:

inoking wrote:

DogCatPuppyLover wrote:

I installed Visual C++, and then added cl.exe to my path to fix another error, but I'm getting this error now:
Cannot open include file: 'io.h': No such file or directory
I have Visual Studio Build Tools and Windows SDK, I ran the command in the Visual Studio 2019 Developer Command Prompt among other command prompts, I restarted my computer, and I added io.h to my path and include, but nothing has fixed it. I'm using Windows 10. Does anyone know how to fix this?
This information may help you.
https://social.msdn.microsoft.com/Forums/vstudio/en-US/7004ee52-98de-40a3-9b18-e27ca480e928/what-happened-to-ioh
I did find io.h, but putting it in my INCLUDE didn't seem to fix the problem.
Could you show me the command line which you issued, and the part of the result of set command?

e.g.
> cl /I \my\include foo.c

> set
:
INCLUDE=***
:
I don't remember the exact path, but the path of io.h is {io.h-path}:
> set INCLUDE={io.h-path}
It's fine, though; my program is almost finished. I just used the source code as a reference.

Isla • trans/queer • leftist • gender abolitionist • programmer • lead manager of the LGBTQ+ studio • she/her

#RevertManagerRestrictions: https://scratch.mit.edu/projects/551194490

https://scratch.mit.edu/discuss/topic/526523/

Your text to link here…
nini2009ph
Scratcher
87 posts

scratchclient - A scratch API wrapper for python

Chiroyce wrote:

nini2009ph wrote:

data = session.get_user(“nini2009ph”).get_projects
print(data.title) —-> AttributeError: ‘function’ object has no attribute ‘title’
the first line gets all the projects not just one.
the data var is: <bound method User.get_projects of <scratchclient.User.User object at 0x000001D106590490>>
ScratchCatHELLO
Scratcher
1000+ posts

scratchclient - A scratch API wrapper for python

nini2009ph wrote:

Chiroyce wrote:

nini2009ph wrote:

data = session.get_user(“nini2009ph”).get_projects
print(data.title) —-> AttributeError: ‘function’ object has no attribute ‘title’
the first line gets all the projects not just one.
the data var is: <bound method User.get_projects of <scratchclient.User.User object at 0x000001D106590490>>
you forgot to execute the method. instead of getting a project title, you’re trying to get the “title” attribute of the “get_user” method, which of course doesn’t work.
data = session.get_user("nini2009ph").get_projects()
print(data[0].title)
this is untested, but it should work.
edit: removed dumb quotes

Last edited by ScratchCatHELLO (Oct. 24, 2021 15:48:04)






ScratchCatHELLO
I have 5600+ posts, I've been on scratch for 5 1/2 years, I'm a Forum Helper™ and I have a Scratch Wiki account!
I like: Python, CSS, Javascript, Rust



Python 3 Text Adventure
cool new browser game - cursed laughing-crying emoji - Illuminati - you know waterbenders, but do you know stock-imagebenders? - snek - vibin' - Bump song (vevo) - Speed bump - yee - fred - m i c k e y
nini2009ph
Scratcher
87 posts

scratchclient - A scratch API wrapper for python

ScratchCatHELLO wrote:

nini2009ph wrote:

Chiroyce wrote:

nini2009ph wrote:

data = session.get_user(“nini2009ph”).get_projects
print(data.title) —-> AttributeError: ‘function’ object has no attribute ‘title’
the first line gets all the projects not just one.
the data var is: <bound method User.get_projects of <scratchclient.User.User object at 0x000001D106590490>>
you forgot to execute the method. instead of getting a project title, you’re trying to get the “title” attribute of the “get_user” method, which of course doesn’t work.
data = session.get_user("nini2009ph").get_projects()
print(data[0].title)
this is untested, but it should work.
edit: removed dumb quotes
ok thx!!
nini2009ph
Scratcher
87 posts

scratchclient - A scratch API wrapper for python

ScratchCatHELLO wrote:

nini2009ph wrote:

Chiroyce wrote:

nini2009ph wrote:

data = session.get_user(“nini2009ph”).get_projects
print(data.title) —-> AttributeError: ‘function’ object has no attribute ‘title’
the first line gets all the projects not just one.
the data var is: <bound method User.get_projects of <scratchclient.User.User object at 0x000001D106590490>>
you forgot to execute the method. instead of getting a project title, you’re trying to get the “title” attribute of the “get_user” method, which of course doesn’t work.
data = session.get_user("nini2009ph").get_projects()
print(data[0].title)
this is untested, but it should work.
edit: removed dumb quotes
AttributeError: ‘list’ object has no attribute ‘update’
ScratchCatHELLO
Scratcher
1000+ posts

scratchclient - A scratch API wrapper for python

nini2009ph wrote:

ScratchCatHELLO wrote:

nini2009ph wrote:

Chiroyce wrote:

nini2009ph wrote:

data = session.get_user(“nini2009ph”).get_projects
print(data.title) —-> AttributeError: ‘function’ object has no attribute ‘title’
the first line gets all the projects not just one.
the data var is: <bound method User.get_projects of <scratchclient.User.User object at 0x000001D106590490>>
you forgot to execute the method. instead of getting a project title, you’re trying to get the “title” attribute of the “get_user” method, which of course doesn’t work.
data = session.get_user("nini2009ph").get_projects()
print(data[0].title)
this is untested, but it should work.
edit: removed dumb quotes
AttributeError: ‘list’ object has no attribute ‘update’

can you post the whole traceback?





ScratchCatHELLO
I have 5600+ posts, I've been on scratch for 5 1/2 years, I'm a Forum Helper™ and I have a Scratch Wiki account!
I like: Python, CSS, Javascript, Rust



Python 3 Text Adventure
cool new browser game - cursed laughing-crying emoji - Illuminati - you know waterbenders, but do you know stock-imagebenders? - snek - vibin' - Bump song (vevo) - Speed bump - yee - fred - m i c k e y
Sid72020123
Scratcher
500+ posts

scratchclient - A scratch API wrapper for python

nini2009ph wrote:

vikkcd wrote:

This might sound noob as I'm about to try to learn python in about 48 hours but can you change list variables with Scratchclient? Thanks
no sorry but you can send the data to a varible and then add it to the list
But ScratchConnect library has a option to encode/decode whole lists! LOL

Sid72020123
Sid72020123
Scratcher
500+ posts

scratchclient - A scratch API wrapper for python

ScratchCatHELLO wrote:

JackK211424 wrote:

DogCatPuppyLover wrote:

I installed Visual C++, and then added cl.exe to my path to fix another error, but I'm getting this error now:
Cannot open include file: 'io.h': No such file or directory
I have Visual Studio Build Tools and Windows SDK, I ran the command in the Visual Studio 2019 Developer Command Prompt among other command prompts, I restarted my computer, and I added io.h to my path and include, but nothing has fixed it. I'm using Windows 10. Does anyone know how to fix this?
This is python not C++?

you need visual c++ to install this module for some reason
Now in scratchconnect you don't even need to install wsaccel and websocket to set cloud variables! My library only uses websocket-client!

Sid72020123
nini2009ph
Scratcher
87 posts

scratchclient - A scratch API wrapper for python

ScratchCatHELLO wrote:

nini2009ph wrote:

ScratchCatHELLO wrote:

nini2009ph wrote:

Chiroyce wrote:

nini2009ph wrote:

data = session.get_user(“nini2009ph”).get_projects
print(data.title) —-> AttributeError: ‘function’ object has no attribute ‘title’
the first line gets all the projects not just one.
the data var is: <bound method User.get_projects of <scratchclient.User.User object at 0x000001D106590490>>
you forgot to execute the method. instead of getting a project title, you’re trying to get the “title” attribute of the “get_user” method, which of course doesn’t work.
data = session.get_user("nini2009ph").get_projects()
print(data[0].title)
this is untested, but it should work.
edit: removed dumb quotes
AttributeError: ‘list’ object has no attribute ‘update’

can you post the whole traceback?
Traceback (most recent call last):
File “c:\Users\phili\Desktop\Python\Scratch\s4.py”, line 5, in <module>
data = session.get_user(“nini2009ph”).get_projects()
File “C:\Users\phili\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\scratchclient\User.py”, line 54, in get_projects
dict_merge(
File “C:\Users\phili\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\scratchclient\User.py”, line 8, in <lambda>
dict_merge = lambda a,b: a.update(b) or a
AttributeError: ‘list’ object has no attribute ‘update’

Powered by DjangoBB