Serwer terminali Winflector - alternatywa dla aplikacji Zdalny Pulpit, Citrix XenApp

Forum > Product technical support > Python EXE using PySimpleGUI does not display on Laptop

Autor: Mark
Data: 2023-10-17 11:35:22

Since we encountered an issue running an Interactive Batch file with multiple windows being spawned <https://www.winflector.com/store/forum/topic-view/id/602>, we attempted to migrate the same to Python.

While the complied EXE works fine when accessed directly, or via Winflector on a desktop - the GUI fails to display when accessed via Winflector on a laptop. The issue appears to be specific to the using of PySimpleGUI, as a simple test of "Hello World" popup works perfectly fine.

An extract of the sample code to demonstrate is as follows:

import PySimpleGUI as sg

import sys

options = ['Option A','Option B','Option C','Option D']

layout = [ 

            [sg.Text('Select One ->'), sg.Listbox(options,select_mode=sg.LISTBOX_SELECT_MODE_SINGLE,size=(20,len(options)))],

            [sg.Button('Ok'), sg.Button('Cancel')]

        ]

window = sg.Window('Options', layout, icon=r'mstsc.ico')

while True:

    event, values = window.read()

    if event is None or event == 'Ok' or event == 'Cancel':

        break

window.close()

if values[0] == ['Option A']:

    sg.popup_auto_close( "You selected Option A", icon=r'mstsc.ico' )

elif values[0] == ['Option B']:

    sg.popup_auto_close( "You selected Option B", icon=r'mstsc.ico' )

elif values[0] == ['Option C']:

    sg.popup_auto_close( "You selected Option C", icon=r'mstsc.ico' )

elif values[0] == ['Option D']:

    sg.popup_auto_close( "You selected Option D", icon=r'mstsc.ico' )

else:

    sys.exit()

Any ideas are most appreciated.

Autor: Jacek (staff)
Data: 2023-10-17 14:52:07

Hi Mark,

 

What OS is installed on the desktop with Winflector server where sample works fine?

What OS is installed on the laptop with Winflector server where sample doesn't work?

 

Jacek

 

Autor: Mark
Data: 2023-10-17 15:05:59

Microsoft Windows 10 Pro 22H2 on all machines - Winflector Server, Winflector Client (User Desktop as well as User Laptop) and Winflector 4.0.0.1c

Autor: Jacek (staff)
Data: 2023-10-17 20:17:36

Not sure about you architecture. My understanding is you have three machines:

- machine A where Winflector server and your EXE is installed

- machine B called "desktop" where Winflector client is installed

- machine C called "laptop" where Winflector client is installed

 

1. Now you start your EXE from desktop client (B -> A) and it works correctly

2. Then you start your EXE from laptop client (C->A) and it doesn't display GUI

 

It that correct?

 

Autor: Mark
Data: 2023-10-18 10:05:14

Yes Jacek - your understanding is correct.

In fact we have done some more testing in an attempt to put a finger on the cause of the issue - the results are summarised in the tabulation below.

Trust the same will help clarify, and hopefully help us in finding a resolution.

Autor: Jacek (staff)
Data: 2023-10-18 15:05:51

I need log files from Winflector\server\applogs directory. Please do as follows:

- remove all files from Winflector\server\applogs directory

- start your test from 'desktop' machine then exit

- start your test from 'laptop' machine then exit

- send to support@winflector.com log files from Winflector\server\applogs directory

Thanks

Autor: Mark
Data: 2023-10-20 08:04:31

Thanks Jacek for your close follow-up on this case. Have forwarded the logs (as well as sample compiled executable) to support@winflector.com.

You may wish to note that the issue does not appear to be limited to PySimpleGUI, as using tkinter instead gives a similar result ... works on desktop (even Android Mobile), but not laptop - though simple popup works fine.

Appreciate if you can acknowledge receipt of the logs, and advice if Winflector Team were able to duplicate the issue.

1


Zaloguj się aby móc pisać na forum.