Threading exception from live plotting and changes prompt font to black
Open
Nobody has claimed this yet.
Qt
- Dominant language
- Python
- Stars
- 459
- Forks
- 359
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 73
Description
Steps to reproduce
- Run live plot (QtPlot). In this case, for debugging purposes, I ran the 1D loop example (https://github.com/QCoDeS/Qcodes/blob/master/docs/examples/Tutorial.ipynb) with live plotting and it throws a threading exception.
- Live plot displays and runs correctly during data acquisition
- After live plot ends upon sweep completion, Python throws an exception and changes to font to black in the anaconda prompt window.
Expected behaviour
The live plot should complete without throwing an exception. In some cases, the threading exception is thrown before the rest of the sequence can be completed.
Actual behaviour
The exception thrown is:
Exception in thread Thread-2:
Traceback (most recent call last):
File "C:\Users\llamper\AppData\Local\Continuum\Anaconda3\envs\Python_3_5_ENV\lib\threading.py", line 914, in _bootstrap_inner
self.run()
File "C:\Users\llamper\AppData\Local\Continuum\Anaconda3\envs\Python_3_5_ENV\lib\site-packages\pyqtgraph\multiprocess\processes.py", line 469, in run
cprint.cerr(self.color, line, -1)
File "C:\Users\llamper\AppData\Local\Continuum\Anaconda3\envs\Python_3_5_ENV\lib\site-packages\pyqtgraph\util\cprint.py", line 100, in cerr
cprint('stderr', *args)
File "C:\Users\llamper\AppData\Local\Continuum\Anaconda3\envs\Python_3_5_ENV\lib\site-packages\pyqtgraph\util\cprint.py", line 79, in cprint
kwds = WIN[arg]
KeyError: b'C:\\Users\\llamper\\AppData\\Local\\Continuum\\Anaconda3\\envs\\Python_3_5_ENV\\lib\\site-packages\\pyqtgraph\\graphicsItems\\PlotCurveItem.py:131: RuntimeWarning: All-NaN axis encountered\r\n'
Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\Users\llamper\AppData\Local\Continuum\Anaconda3\envs\Python_3_5_ENV\lib\threading.py", line 914, in _bootstrap_inner
self.run()
File "C:\Users\llamper\AppData\Local\Continuum\Anaconda3\envs\Python_3_5_ENV\lib\site-packages\pyqtgraph\multiprocess\processes.py", line 464, in run
cprint.cout(self.color, line, -1)
File "C:\Users\llamper\AppData\Local\Continuum\Anaconda3\envs\Python_3_5_ENV\lib\site-packages\pyqtgraph\util\cprint.py", line 96, in cout
cprint('stdout', *args)
File "C:\Users\llamper\AppData\Local\Continuum\Anaconda3\envs\Python_3_5_ENV\lib\site-packages\pyqtgraph\util\cprint.py", line 79, in cprint
kwds = WIN[arg]
KeyError: b''
System
Win 10
Master
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with QtPlot using docs/examples/Tutorial.ipynb and the 1D loop example on Windows. Start by examining the pyqtgraph multiprocess cprint paths shown in the traceback and the All-NaN warning from PlotCurveItem.py. Done means the sweep completes without threading exceptions and the Anaconda prompt font remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100