Bug 101380 - Python scripts not visible or executable in Run Macro dialog
Summary: Python scripts not visible or executable in Run Macro dialog
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
5.3.0.0.alpha0+
Hardware: x86-64 (AMD64) macOS (All)
: highest critical
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2016-08-08 09:05 UTC by Alex Thurgood
Modified: 2016-08-10 07:04 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of Run Macro dialog (48.63 KB, image/png)
2016-08-08 09:08 UTC, Alex Thurgood
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Thurgood 2016-08-08 09:05:01 UTC
On my master build 

Version: 5.3.0.0.alpha0+
Build ID: 3e7a6544da370f641b21fd03a86a1c84d6ea6576
CPU Threads: 2; OS Version: Mac OS X 10.11.6; UI Render: default; 
Locale: fr-FR (fr.UTF-8); Calc: group

when I try to run a python script from the Run Macros dialog, I see a list of available script entries in the left hand pane of the the dialog, however, none of the python scripts are displayed in the right hand pane, which means one can not select them to be executed.
Comment 1 Alex Thurgood 2016-08-08 09:08:14 UTC
Created attachment 126666 [details]
Screenshot of Run Macro dialog
Comment 2 Alex Thurgood 2016-08-08 09:24:47 UTC
In lldb, I am seeing this when I try and descend the macro entry tree (left hadn window) :

Python exception: <class 'TypeError'>: Expected bytes object or ByteSequence, got <class 'str'> instead., traceback follows
  File "/Applications/LibreOfficeDev.app/Contents/Resources/pythonscript.py", line 596, in getChildNodes
    self.funcnames = self.provCtx.getFuncsByUrl( self.uri )
  File "/Applications/LibreOfficeDev.app/Contents/Resources/pythonscript.py", line 386, in getFuncsByUrl
    src = readTextFromStream( self.sfa.openFileRead( url ) )
  File "/Applications/LibreOfficeDev.app/Contents/Resources/pythonscript.py", line 156, in readTextFromStream
    code = uno.ByteSequence( "" )
  File "/Applications/LibreOfficeDev.app/Contents/Resources/uno.py", line 279, in __init__
    raise TypeError("Expected bytes object or ByteSequence, got %s instead." % type(value))
Comment 3 Alex Thurgood 2016-08-08 09:38:29 UTC
This works in LO5152
Comment 4 Alex Thurgood 2016-08-08 10:33:06 UTC
A long time ago, in bug 34699, there was also this exchange :

https://lists.freedesktop.org/archives/libreoffice/2011-February/008542.html

has this re-surfaced again ?
Comment 5 Alex Thurgood 2016-08-08 11:27:48 UTC
I have exatly the same problem with my Linux build from master

Version: 5.3.0.0.alpha0+
Build ID: 428a1da60b88415e7db21353a42bed85b8b76ed9
Threads CPU : 4; Version de l'OS :Linux 4.4; UI Render : par défaut; 
Locale : fr-FR (fr_FR.UTF-8); Calc: group

LinuxMint 18 Sarah
Comment 6 Alex Thurgood 2016-08-10 07:02:13 UTC
Now fixed in 

Version: 5.3.0.0.alpha0+
Build ID: 3a668616968dbce778c54ec56847828efa7bdb6d
CPU Threads: 2; OS Version: Mac OS X 10.11.6; UI Render: default; 
Locale: fr-FR (fr.UTF-8); Calc: group

Fixed by following commit :

https://cgit.freedesktop.org/libreoffice/core/commit/?id=adb9cbff1f6c380bfae85e7dd96ff6cff22ffbe9