Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

All was going fine until.....



  • Hello all
    Still tinkering and learning. It has been going quite well.
    Had a forced Win 10 Update this afternoon (I DON'T WANT MS EDGE MICROSOFT), and now for some reason... my Python routine freezes when I connect to my Arduino.
    Might not be the update... but it has worked fine up until now, and I have not changed anything.

    The error is as follows, but I just can't seem to fix it. Any ideas what might have changed in an update?
    Last line is obviously the actual issue.

    Traceback (most recent call last):
      File "D:\Python\My Python projects\Sentry gun\UA571C v10\Cam_mod_v10.py", line 834, in <module>
        ex = App()
      File "D:\Python\My Python projects\Sentry gun\UA571C v10\Cam_mod_v10.py", line 99, in __init__
        self.initUI()                                               # set up UI( see below )
      File "D:\Python\My Python projects\Sentry gun\UA571C v10\Cam_mod_v10.py", line 200, in initUI
        self.record()                                                # Start recording
      File "D:\Python\My Python projects\Sentry gun\UA571C v10\Cam_mod_v10.py", line 690, in record
        self.move_servos()                                                                                          # move servos
      File "D:\Python\My Python projects\Sentry gun\UA571C v10\Cam_mod_v10.py", line 769, in move_servos
        self.updateUNO()
      File "D:\Python\My Python projects\Sentry gun\UA571C v10\Cam_mod_v10.py", line 817, in updateUNO
        self.ard.runTest(data_to_send)                                                    # This asks for a data reply from the UNO and will wait there until it gets the information
      File "D:\Python\My Python projects\Sentry gun\UA571C v10\comm_ard.py", line 72, in runTest
        dataRecvd = self.recvFromArduino()                                      # SPLIT STRING INTO INT TO HAVE USABLE DATA
      File "D:\Python\My Python projects\Sentry gun\UA571C v10\comm_ard.py", line 42, in recvFromArduino
        x = self.ser.read()                                                     # loop until start marker found
      File "D:\Python\lib\site-packages\serial\serialwin32.py", line 293, in read
        raise SerialException("GetOverlappedResult failed ({!r})".format(ctypes.WinError()))
    serial.serialutil.SerialException: GetOverlappedResult failed (PermissionError(13, 'Access is denied.', None, 5))
    


  • @Stevolution said in All was going fine until.....:

    Hey, the permission error usually only shows up when another software has the serial com open.
    Are you running the Arudino serial monitor together with the python app?



  • Win 10 update trashed my USB ports. Took hours to sort it out

    New issue.....

    When I compile my finished code into an .exe file, it has decided to no longer include any of the graphics in my QT Designer GUI.
    It was working, but something has changed and I am not sure what.

    I go to the .py directory and enter: pyinstaller --onefile - w filename

    This usually works. It makes the file, but the png images are missing (yes, I have moved those images to the dist folder).
    Any ideas?



  • If I run the program from Idle, its fine.

    If I assemble the code as .exe, the graphics are missing, so I need to add the path somewhere? Not sure why I suddenly need to do that.
    I have multiple versions of this code as I have developed it, and the earlier ones compile correctly? (Seems odd, as they all share the same directory).


  • Lifetime Qt Champion

    Hi,

    Where you using Qt resources system ?



  • @SGaist said in All was going fine until.....:

    Hi,

    Where you using Qt resources system ?

    Not sure I understand that question.

    I have folder of my project. Within that project there are 10 sub folders of the project as it has developed v1 - v10.
    V1 to v5 work. v6 onwards doesn't.
    The files are the same in all the folders. If I edit the QT GUI design, then it gets saved at .ui in the current working folder.

    Just not sure why some folders are not compiling correctly


  • Lifetime Qt Champion

    What process are you using to create your executable ?



  • Go into command prompt

    Change to the directory of the .PY file, .UI file and all of its graphics

    pyinstaller --onefile -w filename.py


  • Lifetime Qt Champion

    What exactly did change between v5 and v6 ?


Log in to reply