You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To help us understand and resolve your issue, please fill out the form to the best of your ability. You can feel free to delete the sections that do not apply.
Bug report
A short 1-2 sentences that succinctly describes the bug
get function of multiprocessing.AsyncResult fails in case of plotting pandas.DataFrame with using non-UTC DatetimeIndex
Code for reproduction
A minimum code snippet required to reproduce the bug, also minimizing the number of dependencies required
from multiprocessing.pool import Pool
import pandas as pd
from matplotlib import pyplot as plt
def func(df):
fig, ax = plt.subplots()
df.plot(ax=ax)
return 'title', fig
if __name__ == '__main__':
index = pd.DatetimeIndex(pd.date_range('2016-10-05', periods=10, freq='T', tz='UTC'))
index = index.tz_convert('America/Chicago')
df = pd.DataFrame(list(range(10)), index=index, columns=['a'])
with Pool(3) as pool:
proc = pool.apply_async(func, (df,))
title, fig = proc.get()
fig.savefig(r'.\test.png')
Actual outcome
The output produced by the above code, which may be a screenshot, console output, etc.
Traceback (most recent call last):
File "C:\miniconda\envs\p3\lib\threading.py", line 914, in _bootstrap_inner
self.run()
File "C:\miniconda\envs\p3\lib\threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "C:\miniconda\envs\p3\lib\multiprocessing\pool.py", line 429, in _handle_results
task = get()
File "C:\miniconda\envs\p3\lib\multiprocessing\connection.py", line 251, in recv
return ForkingPickler.loads(buf.getbuffer())
File "C:\miniconda\envs\p3\lib\site-packages\matplotlib\dates.py", line 730, in __getattr__
return getattr(self._rrule, name)
...
File "C:\miniconda\envs\p3\lib\site-packages\matplotlib\dates.py", line 730, in __getattr__
return getattr(self._rrule, name)
RecursionError: maximum recursion depth exceeded
Expected outcome
A description of the expected outcome from the code snippet
If this used to work in an earlier version of Matplotlib, please note the version it used to work on
it should save a valid figure to the test.png
Matplotlib version
Matplotlib version, Python version and Platform (Windows, OSX, Linux ...)
How did you install Matplotlib and Python (pip, anaconda, from source ...)
Matplotlib version:
matplotlib.version
'1.5.3'
Python version:
Python 3.5.2
Platform:
Windows
installed using mini-conda like:
conda install matplotlib
The text was updated successfully, but these errors were encountered:
the issue can be solved by adding the following code into rrulewrapper.__getattr__ function before the if namу in self.dict statement
matplotlib/dates.py line: 728
if name in ['__getstate__', '__setstate__']:
return object.__getattr__(self, name)
ahcub
added a commit
to ahcub/matplotlib
that referenced
this issue
Jan 17, 2017
To help us understand and resolve your issue, please fill out the form to the best of your ability. You can feel free to delete the sections that do not apply.
Bug report
get function of multiprocessing.AsyncResult fails in case of plotting pandas.DataFrame with using non-UTC DatetimeIndex
Code for reproduction
Actual outcome
Expected outcome
it should save a valid figure to the test.png
Matplotlib version
Matplotlib version:
Python version:
Python 3.5.2
Platform:
Windows
installed using mini-conda like:
conda install matplotlib
The text was updated successfully, but these errors were encountered: