Bug 86791 - LibreLogo Typed Command Execution Fails, Error When Syntax Highlighting Button Used
Summary: LibreLogo Typed Command Execution Fails, Error When Syntax Highlighting Butto...
Status: RESOLVED DUPLICATE of bug 101603
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.1.2 release
Hardware: All macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-27 16:04 UTC by m_edwards
Modified: 2016-11-27 20:42 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description m_edwards 2014-11-27 16:04:38 UTC
Libre Office Version: 4.3.1.2 

Build ID: 958349dc3b25111dbca392fbc281a05559ef6848

Platform: OS X 10.9.5

LibreLogo Problems:

1. Pressing enter after typing commands into the input bar has no effect.

2. Executing a program written in an editor page has no effect.

3. Pressing the Start Logo button deposits the example code on the canvas and does not execute it.

4. Pressing the Syntax Highlighting button causes the following error:

com.sun.star.uno.RuntimeExceptionError during invoking function __translate__ in module file:///Applications/LibreOffice.app/Contents/share/Scripts/python/LibreLogo/LibreLogo.py (<class 'TypeError'>: 'NoneType' object is not subscriptable
  /Applications/LibreOffice.app/Contents/share/Scripts/python/LibreLogo/LibreLogo.py:355 in function __translate__() [lq = '\'' + lang['LEFTSTRING'].replace("|", "")]
  /Applications/LibreOffice.app/Contents/MacOS/pythonscript.py:869 in function invoke() [ret = self.func( *args )]
)

5. The turtle moving icons work as normal, pendown. Home and Clear screen buttons work as normal for drawings constructed with the turtle moving icons.

6. At least 1 and 2 above also occur on OS X Yosemite 10.10.? (unknown LO Version or build) as well.
Comment 1 Cor Nouws 2014-11-27 19:07:18 UTC
Hi mEdwards,

I can confirm the sluggish behaviour.
Tested on 4.3.5.1

When I add another image to the background of the page, it's some faster. 

Best,
Cor
Comment 2 Cor Nouws 2014-11-27 19:08:06 UTC
(In reply to Cor Nouws from comment #1)
> I can confirm the sluggish behaviour.

Sorry, wrong issue :(
Comment 3 Cor Nouws 2014-11-27 19:08:22 UTC
still needs to be confirmed
Comment 4 Cor Nouws 2014-11-27 19:19:44 UTC
I confirm that it gives the errors you wrote.
In 4.4.0beta1 and 4.3.5.1 in Ubuntu
Comment 5 Julien Nabet 2015-12-05 22:34:28 UTC
On pc Debian x86-64 with master sources updated today, I could type and make work some Logo commands.
Could you give a try with last stable LO version 5.0.3? (+if needed a brand new LO profile by renaming the LO directory profile, see https://wiki.documentfoundation.org/UserProfile#Mac_OS_X)
Comment 6 Cor Nouws 2015-12-07 11:53:48 UTC
@m edwards,
I found out later that the errors I got were because I used the wrong commands, was confused by the localization and picked up the wrong terms.
Could that be related to your problem too?
Comment 7 m_edwards 2015-12-15 15:28:14 UTC
(In reply to Julien Nabet from comment #5)
> On pc Debian x86-64 with master sources updated today, I could type and make
> work some Logo commands.
> Could you give a try with last stable LO version 5.0.3? (+if needed a brand
> new LO profile by renaming the LO directory profile, see
> https://wiki.documentfoundation.org/UserProfile#Mac_OS_X)

Libre Office Version: 5.0.3.2

Build ID: e5f16313668ac592c1bfb310f4390624e3dbfb7

Platform: OS X 10.9.5

The first two issues mentioned before are still there, namely:

1. Pressing enter after typing commands into the input bar has no effect.
2. Executing a program written in an editor page has no effect.


The third issue is still present but in modified form:

3. Pressing the Start Logo button NO LONGER deposits the example code on the canvas BUT STILL does not execute it.


The fourth issue is still present, though the error message is slightly different, apparently only a result of updating LO:

4. Pressing the Syntax Highlighting button causes the following error:

com.sun.star.uno.RuntimeExceptionError during invoking function __translate__ in module file:///Applications/LibreOffice%205.03.app/Contents/Resources/Scripts/python/LibreLogo/LibreLogo.py (<class 'TypeError'>: 'NoneType' object is not subscriptable
  /Applications/LibreOffice 5.03.app/Contents/Resources/Scripts/python/LibreLogo/LibreLogo.py:357 in function __translate__() [lq = '\'' + lang['LEFTSTRING'].replace("|", "")]
  /Applications/LibreOffice 5.03.app/Contents/Resources/pythonscript.py:869 in function invoke() [ret = self.func( *args )]
)
Comment 8 m_edwards 2015-12-15 15:39:40 UTC
(In reply to Cor Nouws from comment #6)
> @m edwards,
> I found out later that the errors I got were because I used the wrong
> commands, was confused by the localization and picked up the wrong terms.
> Could that be related to your problem too?

I don't think this is what caused the problem. I issued commands in English, and as far as I understand it, these commands should be acceptable regardless of locale. (I have Locale: en-US (en.UTF-8), so I believe that English commands should work anyway.)

If you still think localization could be the cause, could you give more details of your solution, specifically that it was a solution on OS X, as I have no problem on Windows 7 and Julian Nabet reports no problems in a minimal test on pc Debian x86-64.
Comment 9 Julien Nabet 2015-12-15 20:21:22 UTC
Alex: would you have some time to give it a try? Indeed, it might a specific bug to MacOs.
Comment 10 Alex Thurgood 2015-12-18 16:36:29 UTC
(In reply to Julien Nabet from comment #9)
> Alex: would you have some time to give it a try? Indeed, it might a specific
> bug to MacOs.

Hi Julien,

I have no idea how to use this bundled extension code, but I can have a look.


Alex
Comment 11 Alex Thurgood 2015-12-18 16:40:01 UTC
Well, a quick look through the menus in Writer and Draw didn't show any LibreLogo entrie, so where is it ? How do I start it ?
Comment 12 Alex Thurgood 2015-12-18 16:52:25 UTC
OK, so I found it in Views Toolbar Logo.
The LibreLogo toolbar doesn't show up on my screen, I had to maximize the LO window to OSX fullscreen mode in order to see anything (1028*768 monitor).

The navigation buttons work.

I see no Command Line entry dialog/window when I click on the activate command line.

If I type commands into the Writer document from the wiki example page, then press either Execute or Command Line, nothing happens.

I don't see any error messages.
Comment 13 Alex Thurgood 2015-12-18 16:52:42 UTC
TEsted with LO 5032 and OSX 10.11.2
Comment 14 Alex Thurgood 2015-12-18 17:08:16 UTC
So, I tried again with a fresh Writer document. This time the toolbar was inserted on the left hand side in front of the standard one (sigh).

None of the buttons other than move forward, back, left and right, seem to do anything useful. If I click on Run button, which is supposed to introduce an example code and run it, the code gets inserted, but nothing else happens.

If I click on the "Go to beginning" button, the cursor moves to the end of the typed text !

Command line activation button does nothing that I can see.

Clear screen button does nothing (but maybe it expects the turtle to have moved in order to work ?)

Confirming at least points 1, 2, and 3 of original report.
Comment 15 Julien Nabet 2015-12-18 17:49:34 UTC
(In reply to Alex Thurgood from comment #14)
> So, I tried again with a fresh Writer document. This time the toolbar was
> inserted on the left hand side in front of the standard one (sigh).
> 
> None of the buttons other than move forward, back, left and right, seem to
> do anything useful. If I click on Run button, which is supposed to introduce
> an example code and run it, the code gets inserted, but nothing else happens.
> 
The main problem is here, do you get some useful messages (warn/error...) on console?

"HOME" button puts the turtle at the first location, so it's not related with cursor.
"STOP" stops the turtle to run the program
"CLEARSCREEN" erases the draw done by the turtle

I must recognize I don't understand well "ABC" button

> If I click on the "Go to beginning" button, the cursor moves to the end of
> the typed text !
I don't see "Go to the beginning" perhaps corresponds to "HOME"?

> Command line activation button does nothing that I can see.
Do you mean the blank bar to at right of ABC icon? If yes, just type the command then enter and it moves accordingly the turtle.

> Clear screen button does nothing (but maybe it expects the turtle to have
> moved in order to work ?)
I suppose it indeed expects the turtle to have moved so you can erase something.
Comment 16 Julien Nabet 2016-11-27 20:42:21 UTC
The bug was MacOs specific.
It's been fixed on tdf#101603 from future 5.3.0. The patch for 5.2 branch is on gerrit review

If you need to use it now without waiting for the last LO version, you can change your LibreLogo.py by following what's done in the patch https://cgit.freedesktop.org/libreoffice/core/commit/?id=ab3b5b0dfb0c92aa5e94a0f417950724c694ac57

*** This bug has been marked as a duplicate of bug 101603 ***