PySimpleGUIで// Use IntelliSense to learn about possible attributes.とエラーが出る
概要
背景
PySimpleGUIのDemo_Demo_Programs_Browser.pyを実行しようとした際に以下のエラーが発生しました。
File "/Users/username/Documents/venvname/code/PySimpleGUI/.vscode/launch.json", line 2
// Use IntelliSense to learn about possible attributes.
^
SyntaxError: invalid syntax
詳細
原因
Python3.9かM1の影響かは不明ですがiconのPathがうまく通っておらず、エラーが起きてしまうようです。Window設定時に指定するiconをNoneにして処理をスキップをすることで実行できるようになりました。
# --------------------------------- Create Window ---------------------------------
#window = sg.Window('PySimpleGUI Demo Program Browser', layout, icon=icon)
window = sg.Window('PySimpleGUI Demo Program Browser', layout, icon=None)
sg.cprint_set_output_destination(window, ML_KEY)
return window