(Solved) – python 3.7 converting script to .exe using pyinstaller Dictionary issues

  • by
(solved)-–-python-37-converting-script-to.exe-using-pyinstaller-dictionary-issues

`
Public Sub StartExeWithArgument(strArgument As String)

Dim strProgramName As String
Dim RetVal

MsgBox strArgument
strProgramName = "C:UsersADocumentsDEFTdistmake_dict2make_dict2.exe"



Call Shell("""" & strProgramName & """ """ & strArgument & """", vbNormalFocus)

End Sub

`When i run the script using Spyder i get the correct outputs, when i run the .exe from vba it does not save the dictionary. the objective is to pass data blocks from excel into python process them, run some compute and create a dictionary. when i run the .exe from excel, it reads in the string, converts it to a list but then it doesn’t separate the pieces by line so the dictionary processing never happens.

this is the output from spyder which works

Executing Keyword Update…
Topic ,Keyword 1,Keyword 2

Enter a value for the number of Top N Topics to display||% %|| per row||% %|| in the commentary export. Example value of 10 means only the Top 10 Topics||% %|| based on occurrence in the comment||% %|| will be displayed on each row.,,

10,,

Start entering Topic & Keywords after this row. Enter only one Keyword in each column.,,

Chedder,yellow,white
goouda,brown,aged
aged,munster,gorg

..Text to List Start
[‘Topic ,Keyword 1,Keyword 2’, ‘#Enter a value for the number of Top N Topics to display||% %|| per row||% %|| in the commentary export. Example value of 10 means only the Top 10 Topics||% %|| based on occurrence in the comment||% %|| will be displayed on each row.,,’, ’10,,’, ‘#Start entering Topic & Keywords after this row. Enter only one Keyword in each column.,,’, ‘Chedder,yellow,white’, ‘goouda,brown,aged’, ‘aged,munster,gorg’, ”]

..Extract keywords from List Start

this is the dictionary

{‘Chedder’: [‘white’, ‘yellow’], ‘goouda’: [‘brown’, ‘aged’], ‘aged’: [‘gorg’, ‘munster’]}

Saving Dicionary…

enter image description here

Leave a Reply

Your email address will not be published. Required fields are marked *