A MemoryError indicates you're out of memory for some reason, so the traceback may not be all that helpful in determining why it's happening (np.clip may just happen to be where numpy tried to allocate some memory and failed). A more complete example that reproduces the error would be helpful, but I understand if that's not feasible (problem may go away outside the context of the bigger application). Any additional information on the structure of your program and how you're generating data would be useful in figuring out what's going on. It also couldn't hurt to have the output of `conda list` as well.
On Tuesday, November 5, 2019 at 5:41:45 AM UTC-8, [email protected] wrote: > > in fact the error is the following : > > > > Traceback (most recent call last): > > > File > "C:\ProgramData\Anaconda3\lib\site-packages\pyqtgraph\graphicsItems\ImageItem.py", > > line 411, in paint > > self.render() > > > File > "C:\ProgramData\Anaconda3\lib\site-packages\pyqtgraph\graphicsItems\ImageItem.py", > > line 403, in render > > argb, alpha = fn.makeARGB(image, lut=lut, levels=levels) > > > File "C:\ProgramData\Anaconda3\lib\site-packages\pyqtgraph\functions.py", > line 1013, in makeARGB > > data = rescaleData(data, scale/(maxVal-minVal), minVal, dtype=dtype) > > > File "C:\ProgramData\Anaconda3\lib\site-packages\pyqtgraph\functions.py", > line 877, in rescaleData > > d2 = np.clip(d2, lim.min, lim.max) > > > File > "C:\ProgramData\Anaconda3\lib\site-packages\numpy\core\fromnumeric.py", > line 1958, in clip > > return _wrapfunc(a, 'clip', a_min, a_max, out=out) > > > File > "C:\ProgramData\Anaconda3\lib\site-packages\numpy\core\fromnumeric.py", > line 56, in _wrapfunc > > return getattr(obj, method)(*args, **kwds) > > > MemoryError > > > > > > Le samedi 26 octobre 2019 16:30:13 UTC+2, Julien Gautier a écrit : >> >> hi >> >> I have sometime a memory error when i using setImage >> this is an example of my code : >> >> self.Image=pg.GrraphicsLayoutWidget() >> self.p1=self.winImage.addPlot() >> self.imh=pg.ImageItem() >> self.p1.addItem(self.imh) >> >> while true : >> >> self.imh.setImage(data.astype(float),autoLevels=True,autoDownsample=True) >> >> >> >> >> and the error: >> MemoryERROR: >> traceback(....) >> file "./pyqtgraph/graphicsItems/ImageItem" , inn paint >> self.render() >> >> >> Thanks >> >> -- 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/b7ff0f4f-e5a6-43f7-a00d-c7d8b648ea14%40googlegroups.com.
