Export Error

73 views
Skip to first unread message

moonlig...@gmail.com

unread,
Jan 16, 2017, 2:17:02 AM1/16/17
to pyqtgraph
I want to export plot as png or jpeg. Python 2.7 But i cant save file

Traceback (most recent call last):
  File "/home/qssha/.local/lib/python2.7/site-packages/pyqtgraph/exporters/Exporter.py", line 77, in fileSaveFinished
    self.export(fileName=fileName, **self.fileDialog.opts)
  File "/home/qssha/.local/lib/python2.7/site-packages/pyqtgraph/exporters/ImageExporter.py", line 70, in export
    bg = np.empty((self.params['width'], self.params['height'], 4), dtype=np.ubyte)
TypeError: 'float' object cannot be interpreted as an index

WIth Python 3.5 works fine:(

moonlig...@gmail.com

unread,
Jan 17, 2017, 11:58:12 PM1/17/17
to pyqtgraph
bg = np.empty((int(self.params['width']), int(self.params['height']), 4), dtype=np.ubyte)
works fine!

понедельник, 16 января 2017 г., 10:17:02 UTC+3 пользователь moonlig...@gmail.com написал:
Reply all
Reply to author
Forward
0 new messages