bad display dvipng - python-3.x

import sys
from PyQt5.QtWidgets import *
from matplotlib.figure import Figure
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib import rc
rc("text", usetex=True)
app = QApplication(sys.argv)
fen = QDialog()
figure = Figure()
canvas = FigureCanvas(figure)
text_edit = QTextEdit()
list_widget = QListWidget()
layout = QHBoxLayout()
layout.addWidget(canvas)
layout.addWidget(text_edit)
fen.setLayout(layout)
def change():
text = figure.suptitle(
r'{}'.format(text_edit.toPlainText()),
x=0.0,
y=1.0,
horizontalalignment='left',
verticalalignment='top'
)
canvas.draw()
text_edit.textChanged.connect(change)
fen.show()
app.exec_()
I have this error:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/matplotlib/texmanager.py", line 486, in make_png
stderr=subprocess.STDOUT)
File "/usr/lib/python3.6/subprocess.py", line 356, in check_output
**kwargs).stdout
File "/usr/lib/python3.6/subprocess.py", line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['dvipng', '-bg', 'Transparent', '-D', '100.0', '-T', 'tight', '-o', 'b31418787d5e331336f86388cc930ab9.png', 'c073de3d59bf9cbb888f5b9c550ef4f8.dvi']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/loic/Application_math/test.py", line 31, in change
canvas.draw()
File "/usr/lib/python3/dist-packages/matplotlib/backends/backend_qt5agg.py", line 127, in draw
super(FigureCanvasQTAggBase, self).draw()
File "/usr/lib/python3/dist-packages/matplotlib/backends/backend_agg.py", line 430, in draw
self.figure.draw(self.renderer)
File "/usr/lib/python3/dist-packages/matplotlib/artist.py", line 55, in draw_wrapper
return draw(artist, renderer, *args, **kwargs)
File "/usr/lib/python3/dist-packages/matplotlib/figure.py", line 1299, in draw
renderer, self, artists, self.suppressComposite)
File "/usr/lib/python3/dist-packages/matplotlib/image.py", line 138, in _draw_list_compositing_images
a.draw(renderer)
File "/usr/lib/python3/dist-packages/matplotlib/artist.py", line 55, in draw_wrapper
return draw(artist, renderer, *args, **kwargs)
File "/usr/lib/python3/dist-packages/matplotlib/text.py", line 762, in draw
mtext=mtext)
File "/usr/lib/python3/dist-packages/matplotlib/backends/backend_agg.py", line 250, in draw_tex
Z = texmanager.get_grey(s, size, self.dpi)
File "/usr/lib/python3/dist-packages/matplotlib/texmanager.py", line 545, in get_grey
pngfile = self.make_png(tex, fontsize, dpi)
File "/usr/lib/python3/dist-packages/matplotlib/texmanager.py", line 493, in make_png
exc.output.decode("utf-8"))))
RuntimeError: dvipng was not able to process the following string:
b''
Here is the full report generated by dvipng:
c073de3d59bf9cbb888f5b9c550ef4f8.dvi: No such file or directory
This is dvipng 1.16 Copyright 2002-2015, 2019 Jan-Ake Larsson
rc("text", usetex=True)
This line causes the error but I don't see how to correct it.
I tried to install/uninstall MiKTeX 10 times and nothing changes I still have the error.
Same issue here RuntimeError: LaTeX was not able to process the following string: r'lb' But no solution for me
I found what doesn't fit.
It's just the blank lines.
There's a way to pass empty lines? if I can't air it out its not very useful ^^

Related

Strange occurance of error: "No module named 'kivymd.button'"

When I run my program from PyCharm, it runs without any problems. However, when building an exe using PyInstaller I am getting a very strange error, especially as this error message is referencing a line number that does not exist.
Here is the full error message:
Traceback (most recent call last):
File "ngcmain.py", line 441, in <module>
File "pdesigner.py", line 1253, in showhome
File "kivy\app.py", line 950, in run
File "kivy\base.py", line 582, in runTouchApp
File "kivy\base.py", line 347, in mainloop
File "kivy\base.py", line 391, in idle
File "kivy\base.py", line 342, in dispatch_input
File "kivy\base.py", line 308, in post_dispatch_input
File "kivy\_event.pyx", line 709, in kivy._event.EventDispatcher.dispatch
File "kivy\uix\behaviors\button.py", line 179, in on_touch_up
File "kivy\_event.pyx", line 705, in kivy._event.EventDispatcher.dispatch
File "kivy\_event.pyx", line 1248, in kivy._event.EventObservers.dispatch
File "kivy\_event.pyx", line 1132, in kivy._event.EventObservers._dispatch
File "kivy\lang\builder.py", line 57, in custom_callback
File "<string>", line 279, in <module>
File "pdesigner.py", line 201, in show_procguides
File "PyInstaller\loader\pyimod03_importers.py", line 546, in exec_module
File "procguides.py", line 18, in <module>
ModuleNotFoundError: No module named 'kivymd.button'
The error refers to line 18 in procguides.py, but this line does not exist as you can see in the following code fragment:
from kivy.uix.screenmanager import Screen
from kivy.lang import Builder
from procguideskv import style
Builder.load_string(style)
class ProcguidesScreen(Screen):
def __init__(self, **kwargs):
super(ProcguidesScreen, self).__init__(**kwargs)
def on_enter(self):
pass
Also there is no reference to kivymd.button in the procguideskv.py file:
style = r'''
<ProcguidesScreen>
name: 'ProcguidesScreen'
id: procguidesscreen
procguidesscreen:procguidesscreen
BoxLayout:
canvas.before:
Color:
rgb: 1,1,1
Rectangle:
pos: self.pos
size: self.size
'''
I am using the following packages/versions:
Python 3.9.5
Kivy 2.0.0
kivymd 0.104.2
pyinstaller 4.5.1
pyinstaller-hooks-contrib 2021.2
What am I missing here? What is going wrong?
Thanks in advance for your help. Much appreciated.

Python3.8--Cartopy/Fiona error: shapefile not recognized as a supported file format

Running into trouble here making a simple plot with Cartopy. Well, the issue suddenly arose out of a more complicated plot, but it comes down to simply having Cartopy ingest a shapefile of state boundaries.
Quick code snapshot:
#!/home/fewx/anaconda3/bin/python3.8
import matplotlib.pyplot as plt
import xarray as xr
import cartopy.crs as ccrs
import cartopy.feature as cfeature
from cartopy.io.shapereader import Reader
from cartopy.feature import ShapelyFeature
import cartopy
import geopandas as gpd
import matplotlib.ticker as mticker
from cartopy.mpl.gridliner import LONGITUDE_FORMATTER, LATITUDE_FORMATTER
ax = plt.axes(projection=ccrs.PlateCarree())
ax.set_extent([235., 290., 20., 55.])
ax.add_feature(cfeature.COASTLINE.with_scale('110m'), linewidth=0.5)
ax.add_feature(cfeature.STATES.with_scale('110m'), linewidth=0.5)
##Print default location of needed natural earth datasets
path = cartopy.config['data_dir']
print(path)
# Display the plot
#plt.show()
plt.savefig('cartopy_test.png')
The coastline shapefile plots perfectly fine, but I fail when trying to access the necessary state shapefile, 'ne_110m_admin_1_states_provinces_lakes.shp', with the error:
ERROR:fiona._env:`/home/fewx/.local/share/cartopy/shapefiles/natural_earth/cultural/ne_110m_admin_1_states_provinces_lakes.shp' not recognized as a supported file format.
Traceback (most recent call last):
File "fiona/_shim.pyx", line 83, in fiona._shim.gdal_open_vector
File "fiona/_err.pyx", line 291, in fiona._err.exc_wrap_pointer
fiona._err.CPLE_OpenFailedError: '/home/fewx/.local/share/cartopy/shapefiles/natural_earth/cultural/ne_110m_admin_1_states_provinces_lakes.shp' not recognized as a supported file format.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./plot_cartopy_contourf.py", line 35, in <module>
plt.savefig('cartopy_test.png')
File "/home/fewx/anaconda3/lib/python3.8/site-packages/matplotlib/pyplot.py", line 859, in savefig
res = fig.savefig(*args, **kwargs)
File "/home/fewx/anaconda3/lib/python3.8/site-packages/matplotlib/figure.py", line 2311, in savefig
self.canvas.print_figure(fname, **kwargs)
File "/home/fewx/anaconda3/lib/python3.8/site-packages/matplotlib/backends/backend_qt5agg.py", line 81, in print_figure
super().print_figure(*args, **kwargs)
File "/home/fewx/anaconda3/lib/python3.8/site-packages/matplotlib/backend_bases.py", line 2210, in print_figure
result = print_method(
File "/home/fewx/anaconda3/lib/python3.8/site-packages/matplotlib/backend_bases.py", line 1639, in wrapper
return func(*args, **kwargs)
File "/home/fewx/anaconda3/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py", line 509, in print_png
FigureCanvasAgg.draw(self)
File "/home/fewx/anaconda3/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py", line 407, in draw
self.figure.draw(self.renderer)
File "/home/fewx/anaconda3/lib/python3.8/site-packages/matplotlib/artist.py", line 41, in draw_wrapper
return draw(artist, renderer, *args, **kwargs)
File "/home/fewx/anaconda3/lib/python3.8/site-packages/matplotlib/figure.py", line 1863, in draw
mimage._draw_list_compositing_images(
File "/home/fewx/anaconda3/lib/python3.8/site-packages/matplotlib/image.py", line 131, in _draw_list_compositing_images
a.draw(renderer)
File "/home/fewx/anaconda3/lib/python3.8/site-packages/matplotlib/artist.py", line 41, in draw_wrapper
return draw(artist, renderer, *args, **kwargs)
File "/home/fewx/anaconda3/lib/python3.8/site-packages/cartopy/mpl/geoaxes.py", line 479, in draw
return matplotlib.axes.Axes.draw(self, renderer=renderer, **kwargs)
File "/home/fewx/anaconda3/lib/python3.8/site-packages/matplotlib/artist.py", line 41, in draw_wrapper
return draw(artist, renderer, *args, **kwargs)
File "/home/fewx/anaconda3/lib/python3.8/site-packages/matplotlib/cbook/deprecation.py", line 411, in wrapper
return func(*inner_args, **inner_kwargs)
File "/home/fewx/anaconda3/lib/python3.8/site-packages/matplotlib/axes/_base.py", line 2747, in draw
mimage._draw_list_compositing_images(renderer, self, artists)
File "/home/fewx/anaconda3/lib/python3.8/site-packages/matplotlib/image.py", line 131, in _draw_list_compositing_images
a.draw(renderer)
File "/home/fewx/anaconda3/lib/python3.8/site-packages/matplotlib/artist.py", line 41, in draw_wrapper
return draw(artist, renderer, *args, **kwargs)
File "/home/fewx/anaconda3/lib/python3.8/site-packages/cartopy/mpl/feature_artist.py", line 155, in draw
geoms = self._feature.intersecting_geometries(extent)
File "/home/fewx/anaconda3/lib/python3.8/site-packages/cartopy/feature/__init__.py", line 302, in intersecting_geometries
return super(NaturalEarthFeature, self).intersecting_geometries(extent)
File "/home/fewx/anaconda3/lib/python3.8/site-packages/cartopy/feature/__init__.py", line 110, in intersecting_geometries
return (geom for geom in self.geometries() if
File "/home/fewx/anaconda3/lib/python3.8/site-packages/cartopy/feature/__init__.py", line 287, in geometries
geometries = tuple(shapereader.Reader(path).geometries())
File "/home/fewx/anaconda3/lib/python3.8/site-packages/cartopy/io/shapereader.py", line 197, in __init__
with fiona.open(filename) as f:
File "/home/fewx/anaconda3/lib/python3.8/site-packages/fiona/env.py", line 417, in wrapper
return f(*args, **kwargs)
File "/home/fewx/anaconda3/lib/python3.8/site-packages/fiona/__init__.py", line 256, in open
c = Collection(path, mode, driver=driver, encoding=encoding,
File "/home/fewx/anaconda3/lib/python3.8/site-packages/fiona/collection.py", line 162, in __init__
self.session.start(self, **kwargs)
File "fiona/ogrext.pyx", line 540, in fiona.ogrext.Session.start
File "fiona/_shim.pyx", line 90, in fiona._shim.gdal_open_vector
fiona.errors.DriverError: '/home/fewx/.local/share/cartopy/shapefiles/natural_earth/cultural/ne_110m_admin_1_states_provinces_lakes.shp' not recognized as a supported file format.
Note that the parent zip file for 'ne_110m_admin_1_states_provinces_lakes.shp' does not exist in the corresponding directly, mainly because NACISCDN is down (again), and I needed to pull the files from github.
Any ideas what would cause this? I'm a bit a newbie here...and this test code is running on a brand new conda-based installation of python that was built over the past week. Do I have incompatible versions of libraries (e.g. PROJ, GDAL, etc)? This error has seem to come out of nowhere with this newer installation.
Thanks for you help!
UPDATE::
I had success plotting states, but I needed to physically plot the 'ne_110m_admin_1_states_provinces_shp.shp' file that came in the cartopy_offlinedata package via Conda. This required creating a new, independent feature via cfeat.NaturalEarthFeature(), and specifying which shapefile to use:
states_provinces = cfeat.NaturalEarthFeature(
category='cultural',
name='admin_1_states_provinces_shp',
scale='110m',
facecolor='none')
ax.add_feature(states_provinces, edgecolor='black')
This makes me think I have corrupted shapefiles that I was trying to plot, causing the failure...but I won't know for sure until I can pull the full package down from NACISCDN--which is still down.

Kivy + multiprocessing throws a TypeError

Can someone explain why multiprocessing works so weird with kivy?
Minimum example:
from kivy.app import App
from kivy.uix.button import Button
from multiprocessing import Process
class myApp(App):
def f(self):
print('test')
def test(self, caller):
pr = Process(target=self.f)
pr.start()
def build(self):
btn = Button(text='Go')
btn.bind(on_press=self.test)
return btn
if __name__ == '__main__':
myApp().run()
I get the following error:
Traceback (most recent call last):
File "/Users/eab06/Desktop/WJB/PythonProjects/Boring Button/test.py", line 20, in <module>
myApp().run()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/kivy/app.py", line 950, in run
runTouchApp()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/kivy/base.py", line 582, in runTouchApp
EventLoop.mainloop()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/kivy/base.py", line 347, in mainloop
self.idle()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/kivy/base.py", line 391, in idle
self.dispatch_input()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/kivy/base.py", line 342, in dispatch_input
post_dispatch_input(*pop(0))
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/kivy/base.py", line 248, in post_dispatch_input
listener.dispatch('on_motion', etype, me)
File "_event.pyx", line 709, in kivy._event.EventDispatcher.dispatch
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/kivy/core/window/__init__.py", line 1412, in on_motion
self.dispatch('on_touch_down', me)
File "_event.pyx", line 709, in kivy._event.EventDispatcher.dispatch
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/kivy/core/window/__init__.py", line 1428, in on_touch_down
if w.dispatch('on_touch_down', touch):
File "_event.pyx", line 709, in kivy._event.EventDispatcher.dispatch
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/kivy/uix/behaviors/button.py", line 151, in on_touch_down
self.dispatch('on_press')
File "_event.pyx", line 705, in kivy._event.EventDispatcher.dispatch
File "_event.pyx", line 1248, in kivy._event.EventObservers.dispatch
File "_event.pyx", line 1172, in kivy._event.EventObservers._dispatch
File "/Users/eab06/Desktop/WJB/PythonProjects/Boring Button/test.py", line 11, in test
pr.start()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/context.py", line 283, in _Popen
return Popen(process_obj)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 32, in __init__
super().__init__(process_obj)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/popen_fork.py", line 19, in __init__
self._launch(process_obj)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 47, in _launch
reduction.dump(process_obj, fp)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
File "stringsource", line 2, in kivy._event.EventDispatcher.__reduce_cython__
TypeError: no default __reduce__ due to non-trivial __cinit__
The thing is, I swear I got this to work an hour ago, but I changed some things and forgot to fork. Any help/explanation would be appreciated.

I Can't create a window in pyglet

I have just installed pyglet on my machine. But I can't seem to create a window
here's what I tried
import pyglet
window = pyglet.window.Window()
pyglet.app.run()
and it gives me this error when I run
Traceback (most recent call last):
File "c:/Users/Public/Documents/vscode/python/Games/Pyglet/main.py", line 3, in <module>
window = pyglet.window.Window()
File "C:\Users\DELL\AppData\Roaming\Python\Python38\site-packages\pyglet\window\win32\__init__.py", line 132, in __init__
super(Win32Window, self).__init__(*args, **kwargs)
File "C:\Users\DELL\AppData\Roaming\Python\Python38\site-packages\pyglet\window\__init__.py", line 648, in __init__
self._create()
File "C:\Users\DELL\AppData\Roaming\Python\Python38\site-packages\pyglet\window\win32\__init__.py", line 274, in _create
self.context.attach(self.canvas)
File "C:\Users\DELL\AppData\Roaming\Python\Python38\site-packages\pyglet\gl\win32.py", line 238, in attach
raise gl.ContextException('Unable to share contexts.')
pyglet.gl.ContextException: Unable to share contexts.

Matplotlib provokes MemoryError on Ubuntu 18.04 but not on Windows 10

I am developing software on my Ubuntu machine for a Windows user.
What it does:
Making an object detection on thousands of images and compare the result to some measurement data (oscilloscope data: ~200MB, 50 million data values). In the end the result is plotted and saved. After this step, the program advances to the next dataset and so on. At the second dataset, I am getting the Error.
I have installed both Ubuntu and Windows 10 64-bit version. Python3 64bit should run on both OS.
To start the python script you just run it, and it does all the work in a large for loop. Basic steps:
Detect objects on images of dataset 1
Make some calculations
Plot results with matplotlib and save to file
Advance to next dataset
Detect objects on images of dataset 2
Make some calculations
Plot results [MemoryError]
Since just copying the whole ErrorMessage ends up in destroying its format, I have to insert newlines after every line to make it readable:
Progress: Datensatz 1/2 ; Sequenz 2/4 ; Frame 99/101
Progress: Datensatz 1/2 ; Sequenz 2/4 ; Frame 100/101
Progress: Datensatz 1/2 ; Sequenz 2/4 ; Frame 101/101
Progress: Plot...
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/pandas/core/indexing.py", line 1496, in _getbool_axis
return self.obj._take(inds, axis=axis)
File "/usr/local/lib/python3.6/dist-packages/pandas/core/generic.py", line 2789, in _take
verify=True)
File "/usr/local/lib/python3.6/dist-packages/pandas/core/internals.py", line 4539, in take
axis=axis, allow_dups=True)
File "/usr/local/lib/python3.6/dist-packages/pandas/core/internals.py", line 4421, in reindex_indexer
fill_tuple=(fill_value,))
File "/usr/local/lib/python3.6/dist-packages/pandas/core/internals.py", line 4501, in _slice_take_blocks_ax0
fill_tuple=None))
File "/usr/local/lib/python3.6/dist-packages/pandas/core/internals.py", line 1254, in take_nd
allow_fill=False)
File "/usr/local/lib/python3.6/dist-packages/pandas/core/algorithms.py", line 1653, in take_nd
out = np.empty(out_shape, dtype=dtype, order='F')
MemoryError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/artur/Desktop/UHF_Analyse_Artur/Firefly_Gesamt/UHF_Analyse.py", line 794, in <module>
plot(gap_list, deg_list, timestamp, trc)
File "/home/artur/Desktop/UHF_Analyse_Artur/Firefly_Gesamt/UHF_Analyse.py", line 306, in plot
xticks = np.arange(df_oszi.index[0], df_oszi.index[-1], 1))
File "/usr/local/lib/python3.6/dist-packages/pandas/plotting/_core.py", line 2941, in __call__
sort_columns=sort_columns, **kwds)
File "/usr/local/lib/python3.6/dist-packages/pandas/plotting/_core.py", line 1977, in plot_frame
**kwds)
File "/usr/local/lib/python3.6/dist-packages/pandas/plotting/_core.py", line 1804, in _plot
plot_obj.generate()
File "/usr/local/lib/python3.6/dist-packages/pandas/plotting/_core.py", line 258, in generate
self._compute_plot_data()
File "/usr/local/lib/python3.6/dist-packages/pandas/plotting/_core.py", line 363, in _compute_plot_data
"timedelta"])
File "/usr/local/lib/python3.6/dist-packages/pandas/core/frame.py", line 3091, in select_dtypes
return self.loc[com._get_info_slice(self, dtype_indexer)]
File "/usr/local/lib/python3.6/dist-packages/pandas/core/indexing.py", line 1472, in __getitem__
return self._getitem_tuple(key)
File "/usr/local/lib/python3.6/dist-packages/pandas/core/indexing.py", line 890, in _getitem_tuple
retval = getattr(retval, self.name)._getitem_axis(key, axis=i)
File "/usr/local/lib/python3.6/dist-packages/pandas/core/indexing.py", line 1868, in _getitem_axis
return self._getbool_axis(key, axis=axis)
File "/usr/local/lib/python3.6/dist-packages/pandas/core/indexing.py", line 1498, in _getbool_axis
raise self._exception(detail)
KeyError: MemoryError()
>>> Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python3.6/tkinter/__init__.py", line 1705, in __call__
return self.func(*args)
File "/usr/lib/python3.6/tkinter/__init__.py", line 749, in callit
func(*args)
File "/usr/local/lib/python3.6/dist-packages/matplotlib/backends/_backend_tk.py", line 346, in idle_draw
self.draw()
File "/usr/local/lib/python3.6/dist-packages/matplotlib/backends/backend_tkagg.py", line 9, in draw
super(FigureCanvasTkAgg, self).draw()
File "/usr/local/lib/python3.6/dist-packages/matplotlib/backends/backend_agg.py", line 402, in draw
self.figure.draw(self.renderer)
File "/usr/local/lib/python3.6/dist-packages/matplotlib/artist.py", line 50, in draw_wrapper
return draw(artist, renderer, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/matplotlib/figure.py", line 1649, in draw
renderer, self, artists, self.suppressComposite)
File "/usr/local/lib/python3.6/dist-packages/matplotlib/image.py", line 138, in _draw_list_compositing_images
a.draw(renderer)
File "/usr/local/lib/python3.6/dist-packages/matplotlib/artist.py", line 50, in draw_wrapper
return draw(artist, renderer, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/matplotlib/axes/_base.py", line 2610, in draw
mimage._draw_list_compositing_images(renderer, self, artists)
File "/usr/local/lib/python3.6/dist-packages/matplotlib/image.py", line 138, in _draw_list_compositing_images
a.draw(renderer)
File "/usr/local/lib/python3.6/dist-packages/matplotlib/artist.py", line 50, in draw_wrapper
return draw(artist, renderer, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/matplotlib/lines.py", line 736, in draw
self._transform_path(subslice)
File "/usr/local/lib/python3.6/dist-packages/matplotlib/lines.py", line 688, in _transform_path
_path = Path(np.asarray(xy).T,
File "/usr/local/lib/python3.6/dist-packages/numpy/core/numeric.py", line 492, in asarray
return array(a, dtype, copy=False, order=order)
MemoryError
The funny part about this is that I get the MemoryError on Ubuntu but not on Windows. I always thought python runs much more reliable on Linux. Any idea how to fix this?

Resources