Code Monkey home page Code Monkey logo

scratch2python's Introduction

I no longer use GitHub

I will stop distributing projects on GitHub myself. I have created an alternative software called Roundabout that does git hosting in a way I can control.

Of course, it's going to be free software (open source) under the AGPL and will be released shortly. The URL for the official server is https://roundabout-host.com.

Project moved to a roundabout

scratch2python's People

Contributors

allcontributors[bot] avatar secret-chest avatar superscratch444tre avatar tigercoding56 avatar win-ini avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

scratch2python's Issues

Traceback

Error:

Scratch2Python M13 (development version) running on linux
Loading project
DEBUG: New position (0, 0) set for sprite Stage
DEBUG: New position (240, 0) set for sprite test4
DEBUG: New position (0, 195.5) set for sprite test3
Extracting project
Traceback (most recent call last):
  File "main.py", line 156, in <module>
    class SizeDialog(tkinter.simpledialog.Dialog):
  File "main.py", line 160, in SizeDialog
    def body(self, master) -> tuple[str, str]:
TypeError: 'type' object is not subscriptable

I don't what else to say, but my config file uses the default options.

Contributors list! :sparkles: Powered by all-contributors

Comment here to get added to the contributors list.

The comment should be similar to this:

@all-contributors add @yourself for <contributions>

For <contributions>, you will most likely use one of these: (separate with commas if there are more)

  • a11y
  • bug
  • code
  • data
  • design
  • doc
  • ideas
  • infra
  • maintenance
  • plugin
  • projectManagement
  • question
  • review
  • security
  • test
  • tool
  • translation
  • tutorial

The full list is here.

Modular blocks

Blocks should be modularised and split into separate plugins.

Cannot have multiple event handlers for one key

What did you expect to happen?

Two hat blocks with the same key selected to simultaneously run

What did actually happen?

Scratch2Python crashed

How did you make that happen?

Trying to have two hat blocks with the same key selected and pressing the key

Python errors

not now

Latest version

  • I am running the latest version

Variable support

Support variables and variable reporters and make classes for them. Needs #7

Make a GUI

Make a GUI.

I'm going to use GTK+ 3 and bundle it on Windows (with an aproppiate theme).

image

(Glade mockup)

Some SVGs don't show up correctly

Describe the bug
Some SVGs show up in the wrong position

To Reproduce
Sample project Cake.sb3

Expected behavior
The background should be centered

Screenshots
image

Additional context

scratch-render-fonts fonts

Scratch2Python should render these fonts in SVGs. Note that they have generic names in the Scratch project editor and in the SVGs (Noto Sans Medium is "Sans Serif", Source Serif Pro is "Serif", Knewave is "Marker", Grand9K-Pixel is "Pixel", Handlee is "Handwriting" and Griffy is "Curly".

The Scratch font won't be added due to licensing issues.

Uniform page size for all sprite images

Place the sprite images (costumes) on a transparent image the size of the stage. This should allow easier rotation centre handling. Additionally, images should be optionally scaled to allow for better resolution.

Block support

Support Scratch blocks. More will be added when these are about to be finished.

Note: Rotation is rendered but blocks using it are not supported, so no linked issue.

  • when flag clicked
  • set x/y
  • change x/y
  • go to x, y
  • x position (nneds #5)
  • y position (needs #5)
  • point in direction
  • point towards mouse
  • point towards sprite
  • turn left
  • turn right
  • direction (needs #5)
  • go to mouse
  • mouse x (needs #5)
  • mouse y (needs #5)
  • wait seconds
  • wait until
  • go to sprite
  • when key pressed (needs #7)
  • key pressed? (needs #7, #5)
  • if then
  • if then else
  • repeat until
  • repeat
  • forever
  • set size
  • change size
  • variable (needs #5, #6)
  • set variable (needs #6)
  • change variable (needs #6)
  • touching? (needs #5)
  • touching color? (needs #5)
  • equals (needs #5)
  • greater than (needs #5)
  • less than (needs #5)
  • + (needs #5)
  • - (needs #5)
  • * (needs #5)
  • / (needs #5)
  • mod (needs #5)
  • random (needs #5)
  • go to random

Milestone 12 errors

Screenshots
image

Additional context
These errors did not appear in Milestone 11.

Bug report

What did you expect to happen?

Last login: Fri Oct 6 21:36:57 on console
zain@Kholoods-MacBook-Pro ~ % alias python=python3

zain@Kholoods-MacBook-Pro ~ % alias pip=pip3

zain@Kholoods-MacBook-Pro ~ % git clone https://github.com/Secret-chest/scratch2python.git
Cloning into 'scratch2python'...
remote: Enumerating objects: 1582, done.
remote: Counting objects: 100% (376/376), done.
remote: Compressing objects: 100% (202/202), done.
remote: Total 1582 (delta 264), reused 240 (delta 163), pack-reused 1206
Receiving objects: 100% (1582/1582), 21.78 MiB | 12.06 MiB/s, done.
Resolving deltas: 100% (961/961), done.
zain@Kholoods-MacBook-Pro ~ % cd scratch2python
zain@Kholoods-MacBook-Pro scratch2python % pip install -r requirements.txt
Defaulting to user installation because normal site-packages is not writeable
ERROR: Ignored the following versions that require a different python version: 1.21.2 Requires-Python >=3.7,<3.11; 1.21.3 Requires-Python >=3.7,<3.11; 1.21.4 Requires-Python >=3.7,<3.11; 1.21.5 Requires-Python >=3.7,<3.11; 1.21.6 Requires-Python >=3.7,<3.11
ERROR: Could not find a version that satisfies the requirement numpy~=1.21.2 (from versions: 1.3.0, 1.4.1, 1.5.0, 1.5.1, 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.8.1, 1.8.2, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.10.0.post2, 1.10.1, 1.10.2, 1.10.4, 1.11.0, 1.11.1, 1.11.2, 1.11.3, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 1.13.3, 1.14.0, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.14.5, 1.14.6, 1.15.0, 1.15.1, 1.15.2, 1.15.3, 1.15.4, 1.16.0, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.16.6, 1.17.0, 1.17.1, 1.17.2, 1.17.3, 1.17.4, 1.17.5, 1.18.0, 1.18.1, 1.18.2, 1.18.3, 1.18.4, 1.18.5, 1.19.0, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.19.5, 1.20.0, 1.20.1, 1.20.2, 1.20.3, 1.21.0, 1.21.1, 1.22.0, 1.22.1, 1.22.2, 1.22.3, 1.22.4, 1.23.0rc1, 1.23.0rc2, 1.23.0rc3, 1.23.0, 1.23.1, 1.23.2, 1.23.3, 1.23.4, 1.23.5, 1.24.0rc1, 1.24.0rc2, 1.24.0, 1.24.1, 1.24.2, 1.24.3, 1.24.4, 1.25.0rc1, 1.25.0, 1.25.1, 1.25.2, 1.26.0b1, 1.26.0rc1, 1.26.0)
ERROR: No matching distribution found for numpy~=1.21.2
zain@Kholoods-MacBook-Pro scratch2python %

What did actually happen?

Last login: Fri Oct 6 21:36:57 on console
zain@Kholoods-MacBook-Pro ~ % alias python=python3

zain@Kholoods-MacBook-Pro ~ % alias pip=pip3

zain@Kholoods-MacBook-Pro ~ % git clone https://github.com/Secret-chest/scratch2python.git
Cloning into 'scratch2python'...
remote: Enumerating objects: 1582, done.
remote: Counting objects: 100% (376/376), done.
remote: Compressing objects: 100% (202/202), done.
remote: Total 1582 (delta 264), reused 240 (delta 163), pack-reused 1206
Receiving objects: 100% (1582/1582), 21.78 MiB | 12.06 MiB/s, done.
Resolving deltas: 100% (961/961), done.
zain@Kholoods-MacBook-Pro ~ % cd scratch2python
zain@Kholoods-MacBook-Pro scratch2python % pip install -r requirements.txt
Defaulting to user installation because normal site-packages is not writeable
ERROR: Ignored the following versions that require a different python version: 1.21.2 Requires-Python >=3.7,<3.11; 1.21.3 Requires-Python >=3.7,<3.11; 1.21.4 Requires-Python >=3.7,<3.11; 1.21.5 Requires-Python >=3.7,<3.11; 1.21.6 Requires-Python >=3.7,<3.11
ERROR: Could not find a version that satisfies the requirement numpy~=1.21.2 (from versions: 1.3.0, 1.4.1, 1.5.0, 1.5.1, 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.8.1, 1.8.2, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.10.0.post2, 1.10.1, 1.10.2, 1.10.4, 1.11.0, 1.11.1, 1.11.2, 1.11.3, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 1.13.3, 1.14.0, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.14.5, 1.14.6, 1.15.0, 1.15.1, 1.15.2, 1.15.3, 1.15.4, 1.16.0, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.16.6, 1.17.0, 1.17.1, 1.17.2, 1.17.3, 1.17.4, 1.17.5, 1.18.0, 1.18.1, 1.18.2, 1.18.3, 1.18.4, 1.18.5, 1.19.0, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.19.5, 1.20.0, 1.20.1, 1.20.2, 1.20.3, 1.21.0, 1.21.1, 1.22.0, 1.22.1, 1.22.2, 1.22.3, 1.22.4, 1.23.0rc1, 1.23.0rc2, 1.23.0rc3, 1.23.0, 1.23.1, 1.23.2, 1.23.3, 1.23.4, 1.23.5, 1.24.0rc1, 1.24.0rc2, 1.24.0, 1.24.1, 1.24.2, 1.24.3, 1.24.4, 1.25.0rc1, 1.25.0, 1.25.1, 1.25.2, 1.26.0b1, 1.26.0rc1, 1.26.0)
ERROR: No matching distribution found for numpy~=1.21.2
zain@Kholoods-MacBook-Pro scratch2python %

How did you make that happen?

Last login: Fri Oct 6 21:36:57 on console
zain@Kholoods-MacBook-Pro ~ % alias python=python3

zain@Kholoods-MacBook-Pro ~ % alias pip=pip3

zain@Kholoods-MacBook-Pro ~ % git clone https://github.com/Secret-chest/scratch2python.git
Cloning into 'scratch2python'...
remote: Enumerating objects: 1582, done.
remote: Counting objects: 100% (376/376), done.
remote: Compressing objects: 100% (202/202), done.
remote: Total 1582 (delta 264), reused 240 (delta 163), pack-reused 1206
Receiving objects: 100% (1582/1582), 21.78 MiB | 12.06 MiB/s, done.
Resolving deltas: 100% (961/961), done.
zain@Kholoods-MacBook-Pro ~ % cd scratch2python
zain@Kholoods-MacBook-Pro scratch2python % pip install -r requirements.txt
Defaulting to user installation because normal site-packages is not writeable
ERROR: Ignored the following versions that require a different python version: 1.21.2 Requires-Python >=3.7,<3.11; 1.21.3 Requires-Python >=3.7,<3.11; 1.21.4 Requires-Python >=3.7,<3.11; 1.21.5 Requires-Python >=3.7,<3.11; 1.21.6 Requires-Python >=3.7,<3.11
ERROR: Could not find a version that satisfies the requirement numpy~=1.21.2 (from versions: 1.3.0, 1.4.1, 1.5.0, 1.5.1, 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.8.1, 1.8.2, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.10.0.post2, 1.10.1, 1.10.2, 1.10.4, 1.11.0, 1.11.1, 1.11.2, 1.11.3, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 1.13.3, 1.14.0, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.14.5, 1.14.6, 1.15.0, 1.15.1, 1.15.2, 1.15.3, 1.15.4, 1.16.0, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.16.6, 1.17.0, 1.17.1, 1.17.2, 1.17.3, 1.17.4, 1.17.5, 1.18.0, 1.18.1, 1.18.2, 1.18.3, 1.18.4, 1.18.5, 1.19.0, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.19.5, 1.20.0, 1.20.1, 1.20.2, 1.20.3, 1.21.0, 1.21.1, 1.22.0, 1.22.1, 1.22.2, 1.22.3, 1.22.4, 1.23.0rc1, 1.23.0rc2, 1.23.0rc3, 1.23.0, 1.23.1, 1.23.2, 1.23.3, 1.23.4, 1.23.5, 1.24.0rc1, 1.24.0rc2, 1.24.0, 1.24.1, 1.24.2, 1.24.3, 1.24.4, 1.25.0rc1, 1.25.0, 1.25.1, 1.25.2, 1.26.0b1, 1.26.0rc1, 1.26.0)
ERROR: No matching distribution found for numpy~=1.21.2
zain@Kholoods-MacBook-Pro scratch2python %

Python errors

Last login: Fri Oct  6 21:36:57 on console
zain@Kholoods-MacBook-Pro ~ % alias python=python3


zain@Kholoods-MacBook-Pro ~ % alias pip=pip3      


zain@Kholoods-MacBook-Pro ~ % git clone https://github.com/Secret-chest/scratch2python.git
Cloning into 'scratch2python'...
remote: Enumerating objects: 1582, done.
remote: Counting objects: 100% (376/376), done.
remote: Compressing objects: 100% (202/202), done.
remote: Total 1582 (delta 264), reused 240 (delta 163), pack-reused 1206
Receiving objects: 100% (1582/1582), 21.78 MiB | 12.06 MiB/s, done.
Resolving deltas: 100% (961/961), done.
zain@Kholoods-MacBook-Pro ~ % cd scratch2python
zain@Kholoods-MacBook-Pro scratch2python % pip install -r requirements.txt
Defaulting to user installation because normal site-packages is not writeable
ERROR: Ignored the following versions that require a different python version: 1.21.2 Requires-Python >=3.7,<3.11; 1.21.3 Requires-Python >=3.7,<3.11; 1.21.4 Requires-Python >=3.7,<3.11; 1.21.5 Requires-Python >=3.7,<3.11; 1.21.6 Requires-Python >=3.7,<3.11
ERROR: Could not find a version that satisfies the requirement numpy~=1.21.2 (from versions: 1.3.0, 1.4.1, 1.5.0, 1.5.1, 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.8.1, 1.8.2, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.10.0.post2, 1.10.1, 1.10.2, 1.10.4, 1.11.0, 1.11.1, 1.11.2, 1.11.3, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 1.13.3, 1.14.0, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.14.5, 1.14.6, 1.15.0, 1.15.1, 1.15.2, 1.15.3, 1.15.4, 1.16.0, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.16.6, 1.17.0, 1.17.1, 1.17.2, 1.17.3, 1.17.4, 1.17.5, 1.18.0, 1.18.1, 1.18.2, 1.18.3, 1.18.4, 1.18.5, 1.19.0, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.19.5, 1.20.0, 1.20.1, 1.20.2, 1.20.3, 1.21.0, 1.21.1, 1.22.0, 1.22.1, 1.22.2, 1.22.3, 1.22.4, 1.23.0rc1, 1.23.0rc2, 1.23.0rc3, 1.23.0, 1.23.1, 1.23.2, 1.23.3, 1.23.4, 1.23.5, 1.24.0rc1, 1.24.0rc2, 1.24.0, 1.24.1, 1.24.2, 1.24.3, 1.24.4, 1.25.0rc1, 1.25.0, 1.25.1, 1.25.2, 1.26.0b1, 1.26.0rc1, 1.26.0)
ERROR: No matching distribution found for numpy~=1.21.2
zain@Kholoods-MacBook-Pro scratch2python %

Latest version

  • I am running the latest version

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.