Compile error for "some" example Python codes in TASK V.3.1.5

I am using TASK V.3.1.5 on a Windows 10 PC, and just found an issue with its MicroPython Editor/Compiler:

  1. Downloading ROBOTIS example Python codes for MAX-E2, Autobot and Strider is OK.

  2. When downloading ROBOTIS example Python codes for Commando and Scorpi, it gave a “Compile” error message, but it does not show which code line is getting the error. I did not change anything inside these 2 example codes.

@Tech_Support, @willson

I have found some more issues and some workarounds too. Below is a screenshot of a small MicroPython program:

  1. This program works properly when the console is set to “const.UART” as shown in Line 5.
  2. When this constant is changed to “const.USB” then the program will start OK, I can see the printed message and hear the buzzer. Then the system hung up, seemingly at Line 11. It seemed that OLLO functions and Console(USB) somehow are not compatible with each other.
  3. Another issue related to my first post about “Does not compile” issue. If I loaded this little program from a file on the hard disk. TASK 3.1.5 will read it in OK, but when I tried to download it, it will say “Downloading” and then “Failed to compile” but will not provide any error message. However if I cut and paste this whole program into TASK Python Editor, it will be “compiled” and “downloaded” OK. So it looks like that not all “Editor” bugs had been resolved with V. 3.1.5 yet, but at least I got a work around that I can use for a while.

@Tech_Support, @willson

I figured out the 3rd issue and it has to do with the way the Python Editor pulls in a file from hard disk:

  1. On Line 8, I happened to use “double-quotes” to denote a string. And on Lines 15 and 16 I used “single-quotes” to denote a string.
  2. So when the Python Editor pulls this file in from the hard disk, it stripped out the “double-quotes” and replaced them with “nothing”, thus the message “failed to compile” and it does not tell the user where the error happened.
  3. However, when I copy and paste the entire program, the “double-quotes” stay in the edited program, and the Python engine can compile the “double-quotes” fine (if they had remained in the code). So now you guys know to fix your Python Editor tool. For the users side, we better stick to “single-quotes” for strings.

The OLLO/USB issue is for real though.

@Tech_Support, @willson

So far, I have found that if my MicroPython code has syntax errors:

  1. TASK V.3.1.3 will say “Failed to compile” and then tells me what kind of errors and which line(s) the error is at.
  2. TASK V.3.1.5 will say “Failed to compile” but does not tell me anything about my errors.
  3. During run-time TASK V.3.1.5 will tell me where the runtime error comes from, though.

So for now I have to bounce between V. 3.1.3 and V. 3.1.5 to get my work done. But with my new Windows 10 Update to 21H1, V. 3.1.3 is crashing often now. So my options are getting limited!

Thank you for reporting the issues regarding the Task 3.
I’ll have our software developer review these items and get back to you.
Thank you!

Hello @roboteer

I’ve shared your inquiries (#1, #2, #3) with our engineers,

In the mean time, may I ask you that the attached screenshot shows the basic example provided from R+Task 3.0 or your own custom source code? I assume it’s not. But to clarify it, I want to know.

And regarding the loss of “Double quotation” mark in the load of python code from your hard drive (I will say it’s computer), do you see the loss of single one either?

Hoping to hear you soon,

Thank you ,

@Tech_Support, @willson
For the screenshot, this was my own Python code.
On the same PC, TASK V.3.1.3 did not strip out the “double-quotes” when reading in the same file, but TASK V.3.1.5 will strip out the “double-quotes” and replace then with nothing. TASK V.3.1.5 keeps the “single-quotes” though.
Also please don’t forget that TASK V.3.1.5 “Failed to compile” your own ROBOTIS example codes Commando and Scorpi, but not the other ROBOTIS example codes. And the OLLO and console(USB) issue,

1 Like

Hello @roboteer,

Thank you for your additional information,

#1. Regarding the console(const.$Port_In_Use)

We’ve tested both USB, UART based on your code, and it seems working Okay.

Please check your application physically fine.

You can also apply the following code (Exclude const.)

A. For USB debugging


B. For LN101 debugging


C. For Bluethooth debugging


#2. Regarding the OLLO (PORT, Module) object, it seems okay, when we tested our own code.

I am not quite sure the cause of your program. Well, can you perform more test and find the cause? You can attach your code here.

#3. Regarding the loss of double quotation mart when loading a file to R+Task 3.0

The issue will be address within this weekend and it might be updated ASAP.

#4. The basic example (Scorpi, Commando) compile issue.

Similarly #3 (Loss of the quotation mark), the code excludes the double quotation mark.

For Commando,

Go to Line 732


Replace the code line with the below.


For Scorpi,

Go to Line 742

def Test2():
    # 버튼 눌림 체크
    # (English) Checking the button push    
    nNum0, nNum1, Event_Dn0, Event_Dn1, Event_Up0, Event_Up1, Btn0, Btn1 = GetButton(btnList)
    if (Event_Dn0) :
        print(Down0:{0}:{1}.format(nNum0, nNum1))
    if (Event_Dn1) :
        print(Down1:{0}:{1}.format(nNum0, nNum1))
    if (Event_Up0) :
        print(Up0:{0}:{1}.format(nNum0, nNum1))
    if (Event_Up1) :
        print(Up1:{0}:{1}.format(nNum0, nNum1))

Replace the line 742 to 749 with the below code.

def Test2():
    # 버튼 눌림 체크
    # (English) Checking the button push    
    nNum0, nNum1, Event_Dn0, Event_Dn1, Event_Up0, Event_Up1, Btn0, Btn1 = GetButton(btnList)
    if (Event_Dn0) :
        print("Down0:{0}:{1}".format(nNum0, nNum1))
    if (Event_Dn1) :
        print("Down1:{0}:{1}".format(nNum0, nNum1))
    if (Event_Up0) :
        print("Up0:{0}:{1}".format(nNum0, nNum1))
    if (Event_Up1) :
        print("Up1:{0}:{1}".format(nNum0, nNum1))

Thank you,

Thank you for the detailed responses, and to make a long story short. I recovered firmware on my CM-550 and checked on Manager, a different USB cable and several TASK + Python codes also. And this is what I found: on my Windows 10 PC, it looks like that I’ll have to coordinate what value I set in CM-550’s Address 35 (set to 2) and also use console(USB), for my Python code to work properly. Just setting Address 35 only, or setting console() only, did not work properly for my code. It is interesting that on your CM-550, you did not have to do that. Maybe I have an older CM-550?

See screen capture below:

It is great that you are going to fix the “double-quotes” issue soon. How about the issue of the 3.1.5 Editor not showing where syntax errors occurred during “compile” time? The 3.1.3 Editor does not have this problem.

Many Thanks

1 Like

Hi, @roboteer

The below is the sample code which works okay, and it does not seems to make difference with your code attached.


Regarding the syntax error report during the compile time, I do not guarantee that it is going to be fixed this time as our engineer will proceed to the hotfix in the first priority

But, the requested will be definitely considered to our update list.

Thank you,

Today, confirming that I do not have the “console(USB)” bug any more on my PC/CM-550. May be my CM-550 is getting old.

I am enclosing a screen shot of the current “compile error” issue which may help your fixing it when it gets to the top of the list.

The TASK window on the left is V. 3.1.3 and I created a syntax bug by omitting the “:” after “While True” on Line 20. You can see that V. 3.1.3 responded by telling me where the error was when I was trying to compile it.

The TASK window on the right is V. 3.1.5 and I made it compile the same bugged code and it only shows those symbols “???U-???U-” as if it was expecting a different format for those output strings?

So for now, I “compile” Python codes with V. 3.1.3 and “execute” them with V. 3.1.5 (when my codes are bug-free) as I am not beyond creating codes without syntax errors yet! :grin:

Thank you.

I am new to CM-550 but do have experience with micropython on other platforms. I have noticed your print to USB vs UART problem. This could be caused by a buffer over flow. The original code didn’t have any delay() in the loop but Tech_Support code does have a delay() in it. With print to USB micropython will add it to a buffer to be sent to USB then wait for a response back from the other end of USB before sending the next byte. If your printing faster than the responce back from the other end of USB you will get as buffer overflow. When printing to UART micropython will just send out the data not waiting for an ACK back.

The error is a syntax error, your missing the : try this
while True:

Thanks for catching that. I caught my own error after that post.