Hello, I am attempting to acquire data from the plot generated by this 
code, but when I attempt to export it via the right click menu I get the 
following error:

>>> Traceback (most recent call last):
  File 
"C:\Users\KevinBrockman\AppData\Local\Continuum\Anaconda2\lib\site-packages\pyqtgraph\exporters\Exporter.py",
 
line 72, in fileSaveFinished
    self.export(fileName=fileName, **self.fileDialog.opts)
  File 
"C:\Users\KevinBrockman\AppData\Local\Continuum\Anaconda2\lib\site-packages\pyqtgraph\exporters\CSVExporter.py",
 
line 48, in export
    numRows = reduce(max, [len(d[0]) for d in data])
TypeError: object of type 'NoneType' has no len()

If anyone could help me get the export working it would be greatly 
appreciated.

from pyqtgraph.Qt import QtGui, QtCore
import numpy as np
import pyqtgraph as pg
import serial


app = QtGui.QApplication([])

p = pg.plot()
p.setWindowTitle('live plot from serial')
curve = p.plot()

data = [0]
raw=serial.Serial(8,115200)
#raw.open()

def update():
    global curve, data
    line = raw.readline()
    data.append(float(line))
    xdata = np.array(data, dtype='float64')
    curve.setData(xdata)
    app.processEvents()

timer = QtCore.QTimer()
timer.timeout.connect(update)
timer.start(0)

if __name__ == '__main__':
    import sys
    if (sys.flags.interactive != 1) or not hasattr(QtCore, 'PYQT_VERSION'):
        QtGui.QApplication.instance().exec_()



-- 
You received this message because you are subscribed to the Google Groups 
"pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyqtgraph/71be39ee-a74b-42a6-baf7-c3510d741bfb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to