Skip to content

import pyqtgraph.canvas fails. #2838

@zapta

Description

@zapta

Short description

Importing pyqtgraph.canvas causes the program to abort and exit with an error code..

Code to reproduce

print("Mark 0", flush=True)
import time
print("Mark 1", flush=True)
import pyqtgraph.canvas
print("Mark 2", flush=True)
time.sleep(10)
print("Mark 3", flush=True)

Expected behavior

  1. The program should print out all the markers four ,0 to 3, with a 10 seconds delay between marker 2 and 3.
  2. The program should exit with status code 0 (ok)

Real behavior

  1. The program prints only markers 0 and 1.
  2. The program exist with status code 127 (error)

An error occurred?

No error messages were noticed. The program just exits when it tries to import pyqtgraph.canvas.

Tested environment(s)

  • PyQtGraph version: 0.13.3
  • Qt Python binding: PyQt6 6.5.2 Qt 6.5.2
  • Python version: 3.12.0
  • NumPy version: 1.26.0
  • Operating system: Windows 10, Ryzen
  • Installation method: pip

Additional context

The issue is discussed here in the pyinstaller repository pyinstaller/pyinstaller#7991 (comment)

Swapping the two lines of CanvasManager as described the link above seems to fix the problem.

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