Skip to content

"ser" is not defined #1

Open
Open

Description

@davideciarrocchi

data = ser.readline()
NameError: name 'ser' is not defined

Activity

  1. shyney7 commented on Apr 17, 2024

    @shyney7

    @weewStack
    I have a similar issue:

    Closing the window and exiting the program...
    Exception in Tkinter callback
    Traceback (most recent call last):
      File "c:\Users\olivei_m\Documents\Projects\PMX_GroundStation_Visualizer\Serial_Com_ctrl.py", line 45, in SerialClose
        if self.ser.is_open:
           ^^^^^^^^
    AttributeError: 'SerialCtrl' object has no attribute 'ser'
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "C:\Users\olivei_m\AppData\Local\Programs\Python\Python312\Lib\tkinter\__init__.py", line 1962, in __call__
        return self.func(*args)
               ^^^^^^^^^^^^^^^^
      File "c:\Users\olivei_m\Documents\Projects\PMX_GroundStation_Visualizer\GUI_Master.py", line 24, in close_window
        self.serial.SerialClose()
      File "c:\Users\olivei_m\Documents\Projects\PMX_GroundStation_Visualizer\Serial_Com_ctrl.py", line 49, in SerialClose      
        self.ser.status = False
        ^^^^^^^^
    AttributeError: 'SerialCtrl' object has no attribute 'ser'
  2. weewStack commented on Apr 18, 2024

    @weewStack
    Owner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions