Problem of creating exe with pyinstaller of a python script using asana api


I created a QT interface with python with the module asana. This interface allows to create automatically asana tasks.
I tried to generate an exe with Pyinstaller but the problem is that the interface is reloaded automatically without stopping. After a list of verification, the problem is coming from asana and especially this command :“api_client = asana.ApiClient(configuration)”
FYI : If i remove the linecommand with connect to asana and making new tasks, the exe is functioning very well.

Do you have any solution to propose?

This is my script :

from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
import datetime
import asana

class MyWindow(QWidget):
def init(self):

def initUI(self):

    configuration = asana.Configuration()
    configuration.access_token = 'xxxxxxxxxx' # we put our key
    api_client = asana.ApiClient(configuration)  
    requesters = mem.get_team_memberships_for_team('xxxxxxxxx') # we put the team gid 
    requester_names = [ for e in]
    first_requester_names = requester_names[0]
    self.label = QLabel('Cliquez sur le bouton')
    self.button = QPushButton('Cliquez ici')

    layout = QVBoxLayout()



def buttonClicked(self):

    self.label.setText('Bouton cliqué')

if name == ‘main’:
app = QApplication(sys.argv)
fenetre =MyWindow(()

for generating exe i use this command :

pyinstaller --onefile --windowed

Hi @Khalil_Kechaou, thank you for the question.

Which version of Python client library do you use?
pip installs version 5, but the stable version was 3.2 until 5.0.4 and 5.0.5 were released very recently.
Would you try using version 3.2 and see if the issue is specific to version 5?

Hi @Shun_Sakurai,
Thanks for your reply!
I am using Python 3.11.4 with asana version 4.0.11.
I tried with asana 5.0.3 and i have the same problem!

1 Like

Thanks for checking @Khalil_Kechaou, how about Asana version 3.2?
A few weeks ago, I had an issue with version 5 and it was solved with 3.2.