Comments (4)
Hi @jadasse, thanks for the report. Could you share the project on Scratch so that I can look into it and run the converter myself? From you code snippet, it looks like there is a problem with our converter, as Scratch seems to allow numbers as variable names which are of course not allowed in Python. I will check the respective code, we have to make sure that only valid Python variable names are created.
from pystage.
@jadasse I fixed the problem in the converter, please try the new version 0.0.16. It should help. If not, please answer here with the link to the project.
from pystage.
New costume: backdrop1 -> images/backdrop1.svg
New code block registered: when_i_receive_1-0
Bound to broadcast message 'ntsctopal': when_i_receive_1-0
New code block registered: when_i_receive_2-1
Bound to broadcast message 'paltontsc': when_i_receive_2-1
New code block registered: when_i_receive_3-2
Bound to broadcast message '33to45': when_i_receive_3-2
New code block registered: when_i_receive_4-3
Bound to broadcast message '45to78': when_i_receive_4-3
New code block registered: when_i_receive_5-4
Bound to broadcast message '33to78': when_i_receive_5-4
New code block registered: when_i_receive_6-5
Bound to broadcast message '45to33': when_i_receive_6-5
New code block registered: when_i_receive_7-6
Bound to broadcast message '78to33': when_i_receive_7-6
New code block registered: when_i_receive_8-7
Bound to broadcast message '78to45': when_i_receive_8-7
New code block registered: when_i_receive_9-8
Bound to broadcast message 'reset': when_i_receive_9-8
New code block registered: when_key_pressed_10-9
Traceback (most recent call last):
File "C:\Users\dlada\Documents\scratch\wth_1\wth.py", line 79, in
stage.when_key_pressed("left arrow", when_key_pressed_10)
File "C:\Users\dlada\AppData\Roaming\Python\Python310\site-packages\pystage\en\stage.py", line 365, in when_key_pressed
return self._core.event_whenkeypressed(key, generator_function, name, no_refresh)
File "C:\Users\dlada\AppData\Roaming\Python\Python310\site-packages\pystage\core_events.py", line 26, in event_whenkeypressed
raise ValueError(f"Bad key: {key}. Only a-z, 0-9 and space are allowed.")
ValueError: Bad key: left arrow. Only a-z, 0-9 and space are allowed.
Still crashed on me; this is the project I am converting: https://turbowarp.org/635074434
from pystage.
Please share the project on Scratch, I can't see the code on turbowarp. Alternatively upload the sb3 file here.
from pystage.
Related Issues (20)
- Translate eror HOT 1
- NameError: name 'self' is not defined HOT 1
- Error says can;t find file HOT 1
- Missing block: Custom functions HOT 1
- Missing blocks: Clones, Point Towards, Sensing of Object HOT 1
- I have a porblem with export. HOT 1
- Missing block: Change Effect To HOT 1
- Touching Objects HOT 1
- Sensing touching does not have a API for converting HOT 3
- Clones missing HOT 4
- Comments on blocks are not in the converted code
- A hat block with nothing attached causes bad output in the python file
- Conversion script generates: NO API method for func.opcode incorrectly. HOT 1
- repeat block with no contents generates bad output HOT 1
- uninitialized if block generates bad output HOT 1
- Think/say for seconds
- Some nested blocks of ___ of __ block, e.g. tan of 90 not work well. HOT 1
- I cant load pystage HOT 5
- Sound Problem HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pystage.