mBot 2 (Neo) and Python (Second Post)


#1

Hello Tech_support,

I would like to achieve the following:

  1. create a program with mBlock.
  2. transfer it to the Python editor.
  3. make a few changes there.
  4. upload the program into the mBot.

On 28 May I described the following problem in a post.

Unfortunately, I have not received an answer yet. Since the post will be closed shortly, here is a second attempt:

When I then switch to the python editor and press Run, the following message appears:

grafik

When I then press Yes, it appears:

grafik

After Check Log I Get:

Looking in indexes: https://mirrors.aliyun.com/pypi/simple/:\Public\Programs\mblock\resources\app\mlink-v2\exec\python-env\win\python.exe
Collecting event
Downloading https://mirrors.aliyun.com/pypi/packages/d7/e9/3f88290f7a6add3e150b04d61cd989d07b0e5394c37f8bbc32d5a2ee263f/event-0.4.3.zip (56 kB)
| β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Œ | 20 kB 1.4 MB / s eta 0:00:01
| β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ | 56 kB 393 kB / s
ERROR: Command errored out with exit status 1: command: β€˜C: \ Public \ Programs \ mblock \ resources \ app \ mlink-v2 \ exec \ python-env \ win \ python.exe’ -c β€˜import sys, setuptools, tokenize; sys.argv [0] = β€˜"’" β€˜C: \ Guenther \ AppData \ Local \ Temp \ pip-install-6qj09oie \ event \ setup.py’ β€œβ€™β€β€™; file __ = β€˜"’" β€˜C: \ Guenther \ AppData \ Local \ Temp \ pip-install-6qj09oie \ event \ setup.py’ β€œβ€™β€β€™; f = getattr (tokenize, ’ β€œβ€™β€β€™ open β€˜"’" ', open) ( file __); code = f.read (). replace (’ β€œβ€™β€β€™ \ r \ n β€˜"’" β€˜,’ β€œβ€™β€β€™ \ n ’ β€œβ€™β€β€™); f.close (); exec (compile (code, file, β€˜"’" β€˜exec’ β€œβ€™β€β€™)) β€˜egg_info --egg-base’ C: \ Guenther \ AppData \ Local \ Temp \ pip-install-6qj09oie \ event \ pip-egg-info 'cwd: C: \ Guenther \ AppData \ Local \ Temp \ pip-install-6qj09oie \ event \ Complete output (6 lines): Traceback (most recent call last ): File β€œβ€, line 1, in File β€œC: \ Guenther \ AppData \ Local \ Temp \ pip-install-6qj09oie \ event \ setup.py”, line 20 print 'found libevent build directory β€˜, best ^ SyntaxError: Missing parentheses in call to’ print '. Did you mean print (β€˜found libevent build directory’, best)? ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

I also have this error with all other example scripts. I think it is a problem with my Windows or the installation of mBlock.

What can I do?

Hope, you can help.

phg1


#2

very simple to do.

Just create the program in mblock5 using the blocks then click on the </> at the top right to see the python code the blocks created then just copy the code then close the tab that show the python code then click on the python tab and paste the code in there then make your changes and click on upload


#3

Hello OutoftheBOTS,

Thanks for your effort, but it doesn’t work:

I then went to the control panel, called up programmes and got this screen:

There I clicked on β€œTest programme” and behold: It works!!!

Many thanks for your indirect help


#4

Your just not doing it right see my video here https://www.youtube.com/watch?v=ao6_a-vyuEk


#5

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.